Documente Academic
Documente Profesional
Documente Cultură
¸ Register File
ß Two read register addresses and one write register address (5 bits each)
ß Writing into a register occurs during positive clock edge.
ß Reading of registers is not clock driven.
¸ Verilog implementation
ß You can declare 32 32-bit registers (r0, r1, … , r31)
ß Use switch statement
ß Remember that when register $0 is read, it always reads 0
¸ Verilog implementation
ß Implement the 32 words in memory as 32 32-bit registers
ß Note that an address of 0000100 refers to register r1.
2
ECE 369 - Fundamentals of Computer Architecture
Single-cycle datapath
3
ECE 369 - Fundamentals of Computer Architecture
Multi-cycle datapath
4
ECE 369 - Fundamentals of Computer Architecture
5
ECE 369 - Fundamentals of Computer Architecture
¸ Some of the control signal can be implied (register file read are values in A
and B registers (actually A and B need not be registers at all)
Graphical specification
¸ How many state bits do we
require?
7
ECE 369 - Fundamentals of Computer Architecture
PLA Implementation
8
ECE 369 - Fundamentals of Computer Architecture
ROM implementation
¸ ROM = "Read Only Memory"
ß Values of memory locations are fixed ahead of time
¸ A ROM can be used to implement a truth table
ß If the address is m-bits, we can address 2m entries in the ROM.
ß Our outputs are the bits of data that the address points to.
0 0 0 0 0 1 1
0 0 1 1 1 0 0
m n 0 1 0 1 1 0 0
0 1 1 1 0 0 0
1 0 0 0 0 0 0
m is the "height", and n is the "width" 1 0 1 0 0 0 1
1 1 0 0 1 1 0
1 1 1 0 1 1 1
9
ECE 369 - Fundamentals of Computer Architecture
ROM implementation
¸ Rather wasteful, since for lots of the entries, the outputs are the
same
ß i.e., opcode is often ignored
10
ECE 369 - Fundamentals of Computer Architecture
ROM vs PLA
¸ Break up the table into two parts
ß 4 state bits tell you the 16 outputs, 24 x 16 bits of ROM
ß 10 bits tell you the 4 next state bits, 210 x 4 bits of ROM
ß Total: 4.3K bits of ROM
¸ PLA is much smaller
ß Can share product terms
ß Only need entries that produce an active output
ß Can take into account don't cares
¸ Size is (#inputs x #product-terms) + (#outputs x #product-terms)
ß For this example = (10x17)+(20x17) = 460 PLA cells
¸ PLA cells usually about the size of a ROM cell (slightly bigger)
11