Example Usage: Mov R2, R0 (R2 R0)
Example Usage: Mov R2, R0 (R2 R0)
sll DestinationReg, shiftamount (Left shifts data in register specified by register number in RDst field
by shift amount and moves back result to same register. Opcode for sll is 01)
j L1 (Jumps to an address generated by appending 2 MSB bits of PC+1 to the data specified in instruction
field (5:0). Opcode for j is 11)
Example usage: j L1 (Jump address is calculated using
Pseudo direct addressing)
Assume the register file contains 8 registers (R0-R7) each register can hold 8-bit data. On reset register
file should get initialized such that R0 = 0, R1 = 1, R2 = 2, R3 = 3 …etc. On reset assume that the
instruction memory gets initialized with four instructions.
mov Rx, Ry
sll Rx, 1
mov Ry, Rx
j L1
sll Ry, 3
L1: mov Rz, Ry
Where x, y, z are related to last 3 digits of your ID No.
If ID number: 20XXXXXXABCH, then x =A mod 8 (A%8),
y= (B+2) mod 8 ((B+2)%8),
z= (C+3) mod 8 ((C+3)%8),
A partial block level representation of 4-stage pipelined processor is shown below. Please note that for
registerfile implementation, both read and write are independent of CLK. Write operation depends
on control signal.
1. PDF version of this Document with all the Questions below answered with file name as
IDNO_NAME.pdf.
2. Design Verilog Files for all the Sub-modules (instruction fetch, Register file, forwarding unit).
_____________________________________________________________________________________
Name: ID No:
1. Draw the complete Datapath and show control signals of the 4-stage pipelined processor. A
sample Datapath for 5-stage pipelined MIPS processor has been discussed in class. A ppt named
Assignmenthelp.ppt contains this 5-stage processor and is uploaded in CMS. You can modify
this according to your specification.
Answer:
2. List the control signals used and also the values of control signals for different instructions.
Answer:
mov
sll
j
3. Implement the Instruction Fetch block. Copy the image of Verilog code of the Instruction fetch
block here
Answer:
4. Implement the Register File and copy the image of Verilog code of Register file unit here.
Answer:
Answer:
6. Implement the forwarding unit and copy the image of Verilog code of forwarding unit here.
Answer:
7. Implement complete processor in Verilog (using all the Datapath blocks). Copy the image of
Verilog code of the processor here. (Use comments to describe your Verilog implementation)
Answer:
8. Test the processor design by generating the appropriate clock and reset. Copy the image of your
testbench code here.
Answer:
9. Verify if the register file is getting updated according to the set of instructions (mentioned
earlier).
Copy verified Register file waveform here (show only the Registers that get updated, CLK, and RESET):
Unrelated Questions
What were the problems you faced during the implementation of the processor?
Answer:
Did you implement the processor on your own? If you took help from someone whose help did you
take? Which part of the design did you take help for?
Answer:
Name: Date:
ID No.: