Verwendeter Programmcode in Studienarbeit für ESY1B zum Thema "Verifikation mit SystemVerilog und Python"
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

counter_wr_mon.sv 771B

123456789101112131415161718192021222324252627282930313233343536373839
  1. class counter_wr_mon;
  2. virtual counter_if.WR_MON wrmon_if;
  3. mailbox #(counter_trans) wrmon2rm;
  4. counter_trans trans_h, wrmon2rm_h;
  5. function new( virtual counter_if.WR_MON wrmon_if,
  6. mailbox #(counter_trans) wrmon2rm);
  7. this.wrmon_if = wrmon_if;
  8. this.wrmon2rm = wrmon2rm;
  9. this.trans_h = new;
  10. endfunction
  11. task monitor();
  12. @(wrmon_if.wrmon_cb)
  13. begin
  14. trans_h.rst = wrmon_if.wrmon_cb.rst;
  15. trans_h.load = wrmon_if.wrmon_cb.load;
  16. trans_h.updown = wrmon_if.wrmon_cb.updown;
  17. trans_h.data = wrmon_if.wrmon_cb.data;
  18. trans_h.display("DATA FROM WRITE MONITOR");
  19. end
  20. endtask
  21. task start();
  22. fork
  23. forever
  24. begin
  25. monitor();
  26. wrmon2rm_h = new trans_h;
  27. wrmon2rm.put(wrmon2rm_h);
  28. end
  29. join_none
  30. endtask
  31. endclass: counter_wr_mon