Highlights
Stage II
The next step is to write a module idexwb_pipe that accepts the following ports, in this order
As the name implies, this stage does instruction decode, execute and write back. This computer has just four instructions: nop, add, mul and addi. The binary opcodes are provided on the top of the file proc.v. This module instantiates about 9 yMux modules to redirect signas an add_pipe to execute add and addi and a mul_pipe to execute mul. It also instantiates an rfile register file to sote and retrieve results. Name the instance of rfile "regs", othewise the testbench will not work.
Hints
At every clock cycle this module updates register Rdout in rfile. Since it gets an Rdout from the add_pipe and one from mult_pipe it only saves the one that is non zero. When a mul instruction is executed the add_pipe module gets a 5-bit zero as Rdin and the mul_pipe gets Rd. The opposite happens for an add or an addi instruction. When the instruction is mul or add the contents of Rs2 is used as a second input to the respective module, whereas if it is an addi the immediate imm is given as a second input. Submit file proc.v. To test your code use the testbench provided and compile with iverilog -o test testidexwb.v proc.v. Make sure that your program works for at least the testbench provided.
Stage III
Create a module if_pipe that has the following ports:
Use module predecode in the file provided to do the decoding. This module handles the ugly details of the instruction formats. In the module if_pipe define an array imem of at least 64 32-bit registers to serve as instruction memory and a WIDTH-bit resgister PC. During the reset the following command should be executed: $readmemb("compmem.dat", imem, 6'd0, 6'd22); to load the memory with data. You have to download compmem.datin the directory you are working so that the testbench can find it.
This Engineering Assignment has been solved by our Engineering Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment Experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.