Sfoglia il codice sorgente

manoj file added

master
manojkumar 6 mesi fa
commit
554af19b40
1 ha cambiato i file con 183 aggiunte e 0 eliminazioni
  1. +183
    -0
      axi_sequence.sv

+ 183
- 0
axi_sequence.sv Vedi File

@@ -0,0 +1,183 @@
//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
*/



Caricamento…
Annulla
Salva