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

Info iconThis 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
Background image of page 1

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

View Full DocumentRight 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 =
Background 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.
Background image of page 3

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

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

This note was uploaded on 02/14/2012 for the course ENGR 100-250 taught by Professor Peterchen during the Winter '12 term at University of Michigan.

Page1 / 34

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

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online