Question: Goal: Create the datapath and control logic for a 6 - instruction CPU. Run your CPU with a self - checking testbench ( testbench .

Goal: Create the datapath and control logic for a 6-instruction CPU. Run your CPU with a
self-checking testbench (testbench.sv) with vectors from "Dmem_expected.tv" and executes
the first 5 numbers in the Fibonacci sequence.
Here are the details about the 6 instructions:
Each instruction contains a 3-bit Opcode and the binary code for one of 3 instruction types:
Load: LD Ra, a-specifies the operation RF[Ra]= D[a]. A move from the data
memory specified by a5 a4 a3 a2 a1 a0 into the register-file register whose location
is specified by the bits Ra2 Ra1 Ra0. The binary machine code for the Load instruction
is
Ob000 Ra2 Ra1 Ra0 a5 a4 a3 a2 a1 a0
Store:ST a, Rc-specifies the operation D[a]=RF[Rc]. A move of data in the
opposite direction as the Load instruction: From the Register-file location Rc2 Rc1 Rc0
to data memory location a5 a4 a3 a2 a1 a0. The binary machine code for the Store
instruction is
Ob001 a5 a4 a3 a2 a1 a0 Rc2 Rc1 Rc0
where the function is performed on the data in Rb 2 Rb 1 Rb 0 and Rc 2 Rc 1 Rc 0.
result is stored the register specified by Ra 2 Ra 1 Ra 0. The functions in XXX are AD
SUB, AND and OR:
ADD Ob010 Ra2 Ra1 Ra0 Rb2 Rb1 Rb0 Rc2 Rc1 Rc0
SUB Ob011 Ra2 Ra1 Ra0 Rb2 Rb1 Rb0 Rc2 Rc1 Rc0
AND Ob100 Ra2 Ra1 Ra0 Rb2 Rb1 Rb0 Rc2 Rc1 Rc0
OR Ob101 Ra2 Ra1 Ra0 Rb2 Rb1 Rb0 Rc2 Rc1 Rc0
The datapath will have a Proaram Counter. Instruction Memory. Data Memory. Reaister File.
ALU-type: xxXRa,Rb,Rc-Specifies the operation RF[Ra]=F(RF[Rb],RF[Rc]) where the function is performed on the data in Rb 2 Rb 1 Rb 0 and Rc 2 Rc 1 Rc 0. The result is stored the register specified by Ra2 Ra1 Ra0. The functions in XXX are ADD, SUB, AND and OR:
ADD Ob010 Ra2 Ra1 Ra0 Rb2 Rb1 Rb0 Rc2 Rc1 Rc0
SUB Ob011 Ra2 Ra1 Ra0 Rb2 Rb1 Rb0 Rc2 Rc1 Rc0
AND Ob100 Ra2 Ra1 Ra0 Rb2 Rb1 Rb0 Rc2 Rc1 Rc0
OR Ob101 Ra2 Ra1 Ra0 Rb2 Rb1 Rb0 Rc2 Rc1 Rc0
The datapath will have a Program Counter, Instruction Memory, Data Memory, Register File, 2:1 muxes and ALU. In a single-cycle the CPU will fetch the instruction from the Instruction Memory, Read from the Memory to the Register File (Load), perform the ALU (for ALU type instructions) and write back to the Memory from the Register File (Store).
The CPU microarchitecture :
Part 1-6-instruction CPU Control Logic
In this section, we will create the control logic for the 6-instruction programmable processor.
Based on the 3-bit input Instruction[11:9]. Name this verilog file controller.sv
The ALUcontrol table is:
Create a testbench to test your control logic to see the outputs change for each of the following instructions: LD, ST, ADD, SUB, AND, OR
Include a snapshot of the EDA playground waveform showing the correct outputs for the above sequence and fill out the below table with the values in binary.
Cycle # 123456 Instruction LD ST ADD SUB AND OR RF W_we ALUcontrol DMEM we Mux_select M0 Mux_select M1 please help me to this testbench.sv, design.sv and controller.sv please
Goal: Create the datapath and control logic for a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!