|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- //reset sequence
- class reset_sequence extends uvm_sequence #(packet);
-
- `uvm_object_utils(reset_sequence)
- packet pkt;
- function new(string name = "reset_sequence");
- super.new(name);
- endfunction
-
- virtual task body();
- `uvm_info(get_type_name(), $sformatf("*** RESET SEQUENCE is started ***"), UVM_MEDIUM)
- pkt = packet::type_id::create("pkt");
- start_item(pkt);
- assert(pkt.randomize);
- pkt.op = WRITE;
- finish_item(pkt);
- endtask
- endclass
-
- /*
- //read sequence
- class read_sequence extends uvm_sequence #(packet);
- `uvm_object_utils(read_sequence)
- packet pkt;
- function new(string name = "read_sequence");
- super.new(name);
- endfunction
-
- virtual task body();
- repeat(10)
- begin
- `uvm_info(get_type_name(), $sformatf("*** READ SEQUENCE is started ***"), UVM_MEDIUM)
- pkt = packet::type_id::create("pkt");
- //pkt.paddr_invalid.constraint_mode(0);
- start_item(pkt);
- assert(pkt.randomize);
- pkt.op = READ;
- //pkt.pwrite=0;
- finish_item(pkt);
- end
- endtask
- endclass
-
- //write sequence
- class write_sequence extends uvm_sequence #(packet);
- `uvm_object_utils(write_sequence)
- packet pkt;
- function new(string name = "write_sequence");
- super.new(name);
- endfunction
-
- virtual task body();
- repeat(10)
- begin
- `uvm_info(get_type_name(), $sformatf("*** WRITE SEQUENCE is started ***"), UVM_MEDIUM)
- pkt = packet::type_id::create("pkt");
- pkt.paddr_invalid.constraint_mode(0);
- start_item(pkt);
- assert(pkt.randomize);
- pkt.ap = WRITE;
- pkt.pwrite=1;
- finish_item(pkt);
- end
- endtask
- endclass
-
-
- //write_read_sequence
- class write_read_sequence extends uvm_sequence #(packet);
- `uvm_object_utils(write_read_sequence)
- packet pkt;
- function new(string name = "write_read_sequence");
- super.new(name);
- endfunction
-
- virtual task body();
- //write seq
- repeat(10)
- begin
- `uvm_info(get_type_name(), $sformatf("*** WRITE SEQUENCE is started ***"), UVM_MEDIUM)
- pkt = packet::type_id::create("pkt");
- pkt.paddr_invalid.constraint_mode(0);
- start_item(pkt);
- assert(pkt.randomize);
- pkt.ap = WRITE;
- pkt.pwrite=1;
- finish_item(pkt);
-
- //read seq
- `uvm_info(get_type_name(), $sformatf("*** READ SEQUENCE is started ***"), UVM_MEDIUM)
- pkt = packet::type_id::create("pkt");
- pkt.paddr_invalid.constraint_mode(0);
- start_item(pkt);
- assert(pkt.randomize);
- pkt.ap = READ;
- pkt.pwrite=0;
- finish_item(pkt);
- end
- endtask
- endclass
- */
-
- /*
- //write_read_sequence
- class multi_write_multi_read_sequence extends uvm_sequence #(packet);
- `uvm_object_utils(multi_write_multi_read_sequence)
- packet pkt;
- function new(string name = "multi_write_multi_read_sequence");
- super.new(name);
- endfunction
-
- virtual task body();
- int count=1;
- //multi write seq
- repeat(5)
- begin
- `uvm_info(get_type_name(), $sformatf("***MULTI WRITE SEQUENCE --> %0d is started ***",count), UVM_MEDIUM)
- pkt = packet::type_id::create("pkt");
- pkt.paddr_invalid.constraint_mode(0);
- start_item(pkt);
- assert(pkt.randomize);
- pkt.ap = WRITE;
- pkt.pwrite=1;
- finish_item(pkt);
- count++;
- end
-
- //multi read seq
- repeat(5)
- begin
- `uvm_info(get_type_name(), $sformatf("***MULTI READ SEQUENCE--> %0d is started ***",count), UVM_MEDIUM)
- pkt = packet::type_id::create("pkt");
- pkt.paddr_invalid.constraint_mode(0);
- start_item(pkt);
- assert(pkt.randomize);
- pkt.ap = READ;
- pkt.pwrite=0;
- finish_item(pkt);
- count++;
- end
- endtask
- endclass
- */
-
- /*
- //write_read_sequence
- class slaveerr_sequence extends uvm_sequence #(packet);
- `uvm_object_utils(slaveerr_sequence)
- packet pkt;
- function new(string name = "slaveerr_sequence");
- super.new(name);
- endfunction
-
- virtual task body();
- repeat(10)
- begin
- `uvm_info(get_type_name(), $sformatf("*** SLV ERROR WRITE SEQUENCE is started ***"), UVM_MEDIUM)
- pkt = packet::type_id::create("pkt");
- start_item(pkt);
- pkt.paddr_valid.constraint_mode(0);
- assert(pkt.randomize);
- pkt.ap = WRITE;
- pkt.pwrite=1;
- finish_item(pkt);
- end
-
- //multi read seq
- repeat(10)
- begin
- `uvm_info(get_type_name(), $sformatf("*** SLV ERROR READ OPERATION is started ***"), UVM_MEDIUM)
- pkt = packet::type_id::create("pkt");
- pkt.paddr_valid.constraint_mode(0);
- start_item(pkt);
- assert(pkt.randomize);
- pkt.ap = READ;
- pkt.pwrite=0;
- finish_item(pkt);
- end
- endtask
- endclass
- */
-
-
|