Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

45 řádky
1.5 KiB

  1. import uvm_pkg::*;
  2. /* Configuration object to configure the environment of Test Bench.
  3. Configurable fields:
  4. 1. intf: Virtual Interface for the agents
  5. 2. active: To set the agent as active or passive */
  6. class env_config#(parameter A_WIDTH = 16, D_WIDTH = 16) extends uvm_object;
  7. `uvm_object_utils(env_config)
  8. // variables
  9. virtual axi_intf#(.D_WIDTH(D_WIDTH), .A_WIDTH(A_WIDTH)) intf;
  10. // Master and Slave are active or passive
  11. uvm_active_passive_enum active = UVM_ACTIVE;
  12. function new(string name = "env_config");
  13. super.new(name);
  14. endfunction //new()
  15. endclass //env_config extends uvm_object
  16. // Configuration object which configures the sequence item generation
  17. class test_config extends uvm_object;
  18. `uvm_object_utils(test_config)
  19. // Vartiables
  20. int no_write_cases = 2;
  21. int no_read_cases = 2;
  22. // Set whether to produce aligned address or unalinged address
  23. // -1: produce both aligned and unaligned randomly
  24. // 0: produce unaligned adresses for all bursts
  25. // 1: produce alligned adress for all bursts
  26. byte isAligned = -1;
  27. // Set the specific burst type for a test
  28. // -1: produce all the burst type randomly
  29. // 0: produce fixed bursts
  30. // 1: produce incr bursts
  31. // 2: produce wrap bursts
  32. byte burst_type = -1;
  33. function new(string name = "test_config");
  34. super.new(name);
  35. endfunction //new()
  36. endclass //test_config extends uvm_object