Code editor is disabled. Please use desktop version of the site for a better hands on experience.
1
Day 17
NOT SUBMITTED
Day 17
Design and verify a valid/ready based memory interface slave. The interface should be able to generate
the ready output after a random delay. Memory should be 16x32
bits wide.
Interface Definition
- Valid/ready protocol must be honoured
- The module should have the following interface:
module day17 (
input wire clk,
input wire reset,
input wire req_i, -> Valid request input remains asserted until ready is seen
input wire req_rnw_i, -> Read-not-write (1-read, 0-write)
input wire[3:0] req_addr_i, -> 4-bit Memory address
input wire[31:0] req_wdata_i, -> 32-bit write data
output wire req_ready_o, -> Ready output when request accepted
output wire[31:0] req_rdata_o -> Read data from memory
);
// Memory array
logic [15:0][31:0] mem;
Coding Exercise
You're expected to code both the RTL and testbench for the problem. Your testbench should include the stimulus and checkers.
NOTE
The testcase will show PASSED as long as the RTL and testbench compile, but it doesn't imply that the implemented logic is correct.
If you're interested in learning more about RTL Design and don't want to worry about implementing the checks or the testbench code then I'd recommend the Hands-on RTL Design course. The course contains 25 RTL Design problems to help improve your design skills and comes with a 2-part video solution for every problem.
day17.sv
day17.sv
day17_tb.sv
Sublime
Emacs
Sublime
Vim
initializing...
Modules1. Day 1
EASY
2. Day 2 EASY
3. Day 3 EASY
4. Day 4 EASY
5. Day 5 EASY
6. Day 6 EASY
7. Day 7 EASY
8. Day 8 EASY
9. Day 9 EASY
10. Day 10 EASY
11. Day 11 EASY
12. Day 12 EASY
13. Day 13 EASY
14. Day 14 EASY
15. Day 15 EASY
16. Day 16 EASY
17. Day 17 EASY
18. Day 18 EASY
19. Day 19 EASY
20. Day 20 EASY
21. Day 21 EASY
22. Bonus Problem 1 EASY