Advertisement
rufusnufus

parse_testbench

Oct 27th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module parse_testbench;
  2. integer cnt;
  3. wire [4:0]a, b, c, d;
  4.  
  5. parse parse(cnt, a, b, c, d);
  6.  
  7. initial
  8. begin
  9. cnt = 5;
  10. #5;
  11. cnt = 14;
  12. #5;
  13. cnt = 193;
  14. #5;
  15. cnt = 7860;
  16. end
  17.  
  18. initial
  19. $monitor("cnt = %d decimal: a = %d b = %d c = %d d = %d binary: a = %b b = %b c = %b d = %b", cnt, a, b, c, d, a, b, c, d);
  20.  
  21. initial
  22. $dumpvars;
  23.  
  24. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement