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_bfm.sv 613B

3 years ago
1234567891011121314151617181920212223242526272829303132333435
  1. class counter_wr_bfm;
  2. virtual counter_if.WR_BFM wr_if;
  3. mailbox #(counter_trans) gen2wr;
  4. counter_trans trans_h;
  5. function new( virtual counter_if.WR_BFM wr_if,
  6. mailbox #(counter_trans) gen2wr);
  7. this.wr_if = wr_if;
  8. this.gen2wr = gen2wr;
  9. this.trans_h = new;
  10. endfunction
  11. task drive();
  12. @(wr_if.wr_cb);
  13. wr_if.wr_cb.rst <= trans_h.rst;
  14. wr_if.wr_cb.load <= trans_h.load;
  15. wr_if.wr_cb.updown <= trans_h.updown;
  16. wr_if.wr_cb.data <= trans_h.data;
  17. endtask
  18. task start();
  19. fork
  20. forever
  21. begin
  22. gen2wr.get(trans_h);
  23. drive();
  24. end
  25. join_none
  26. endtask
  27. endclass: counter_wr_bfm