{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

e100 - General-purpose computers Stored-program computer...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
ENGR 100 1 Peter Chen General-purpose computers We’ve seen how to implement any algorithm as a digital cir- cuit But we usually can’t implement a new digital circuits for each algorithm. If we could implement only ONE algorithm as a digital circuit, what should that algorithm be? We’d like to use that algo- rithm to solve as many problems as possible. • what makes a calculator useful? Remarkably, it’s possible to implement a single algorithm, yet still have that one algorithm carry out any algorithm. We call the implementation of such an algorithm a general- purpose computer . • computer reads input (i.e. a program) that tells it how to carry out the other algorithms • computer is able to execute general programs, so it’s able to carry out general algorithms Stored-program computer The essence of what it means for a circuit to be a computer • input instructions into the computer, just as data can be input to the computer • by inputting a new program, we can implement different algorithms • computer manipulates the instructions in the same way it manipulates data We’re going to design a stored-program computer (processor) called the E100 • design the set of instructions that the computer can carry out • implement a circuit (datapath + control unit) that can carry out any sequence of E100 instructions • write algorithms as sequences of E100 instructions
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
ENGR 100 2 Peter Chen Designing the set of instructions Key question in computer design • what are the instructions for the computer (what can you tell the computer to do) • if you pick the wrong set of instructions, you might not be able to express the desired algorithm using those instructions, i.e. the computer won’t be general purpose • e.g. if the only instruction the computer can do is “incre- ment”, it’s going to be hard to tell it to compute A-B We’re going to design a small “set of instructions” that are simple, yet can be combined to compute arbitrary things • this is called the computer’s “instruction set”, or “instruc- tion set architecture”, or ISA Representing negative numbers (16 bit word) Bit 15 is worth -32768 (instead of 32768) What is the largest positive number you can represent in 16 bits? What is the largest negative number you can represent in 16 bits? What value does 1000 0000 0000 0001 represent? What value does 1111 1111 1111 1111 represent? E100 treats all numbers as signed • 16’hFFFF + 16’h0003 =
Image of page 2
ENGR 100 3 Peter Chen E100 instruction set architecture Word is 16 bits • data (i.e. variables) are 16 bits • memory address is 16 bits. Only 16384 words on Cyclone II FPGA, so only 14 bits of the address are used) Instructions and data are stored in memory Each instruction is 4 words • those 4 words describe what the instruction is to do E100 execution • starts by executing the instruction stored in memory[0], memory[1], memory[2], memory[3] • typically then executes the instruction stored in mem- ory[4], memory[5], memory[6], memory[7] Program counter (PC) contains the starting address of the cur- rent instruction • next instruction to be executed is usually the next one, i.e.
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern