Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

44 linhas
926 B

  1. //base sequence : things common to all sequence
  2. class axi_base_seq extends uvm_sequence #(axi_tx);
  3. uvm_phase phase;
  4. `uvm_object_utils(axi_base_seq)
  5. `NEW_OBJ
  6. task pre_body();
  7. //raise objection
  8. phase = get_starting_phase();
  9. if (phase !=null) begin
  10. phase.raise_objection(this);
  11. phase.phase_done.set_drain_time(this,100);
  12. end
  13. endtask
  14. task post_body();
  15. //drop objection
  16. if (phase !=null) begin
  17. phase.drop_objection(this);
  18. end
  19. endtask
  20. endclass
  21. //functional sequence: things specific to current sequence
  22. class axi_wr_rd_seq extends axi_base_seq;
  23. axi_tx tx;
  24. axi_tx txQ[$];
  25. `uvm_object_utils(axi_wr_rd_seq)
  26. `NEW_OBJ
  27. task body();
  28. //write/read to same loc
  29. repeat(1) begin
  30. `uvm_do_with (req, {req.wr_rd==1;});
  31. tx = new req; //shallow copy
  32. txQ.push_back(tx);
  33. end
  34. //read_tx
  35. repeat(1) begin
  36. tx = txQ.pop_front();
  37. `uvm_do_with (req, {req.wr_rd==0; req.burst_len ==tx.burst_len; req.addr == tx.addr;});
  38. end
  39. endtask
  40. endclass