Question: Write the Verilog code for a register file with two write ports, plus a test - bench. Include all of your Verilog code in a
Write the Verilog code for a register file with two write ports, plus a testbench. Include all of your Verilog code in a file named and upload it on Canvas.
RegisterFileWv
a pt Write a Verilog module for the register file implemented in the previous question using a behavioral model. Besides the two write ports, add one single read port to the module, which will allow you to inspect the content of the registers in the testbench of next question. The additional signals needed for the read port are:
Input read index bits: index of the register to read from. This signal operates synchronously ie regardless of the value of the clock signal and without any kind of additional enable signal ie the read port is always active
Output read value bits: value read from the register.
b pt Write a Verilog testbench for your register file implementation. Your testbench should explore at least the following combinations of inputs, and verify the right output in each case:
Both write ports are active and write different values into different registers in the same cycle.
Both write ports are active and write different values into the same register in the same cycle.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
