URL
https://opencores.org/ocsvn/uart2bus_testbench/uart2bus_testbench/trunk
Subversion Repositories uart2bus_testbench
Compare Revisions
- This comparison shows the changes necessary to convert path
/uart2bus_testbench/trunk
- from Rev 8 to Rev 9
- ↔ Reverse comparison
Rev 8 → Rev 9
/tb/analysis/uart_scoreboard.svh
40,7 → 40,11
|
uart_transaction frm_mon,frm_mon_tmp; |
|
`uvm_component_utils(uart_scoreboard) |
int match=0; |
|
`uvm_component_utils_begin(uart_scoreboard) |
`uvm_field_int(match,UVM_ALL_ON) |
`uvm_component_utils_end |
|
function new (string name , uvm_component parent); |
super.new(name,parent); |
100,7 → 104,8
end |
else |
begin |
`uvm_info("Passed UART Undefined Command","DUT doesn't respond to undefined Prefix \n",UVM_NONE) |
`uvm_info("Passed UART Undefined Command","DUT doesn't respond to undefined Prefix \n",UVM_HIGH) |
match++; |
end |
end |
|
112,7 → 117,8
end |
else |
begin |
`uvm_info("Passed UART Invalid Command","DUT doesn't respond to invalid binary command \n",UVM_NONE) |
`uvm_info("Passed UART Invalid Command","DUT doesn't respond to invalid binary command \n",UVM_HIGH) |
match++; |
end |
end |
|
138,7 → 144,8
end |
else |
begin |
`uvm_info("Passed Wrong Read Command",$sformatf("Dut was requested to read the data of the address %h with wrong white spaces or eol character \n",frm_mon.address),UVM_NONE) |
`uvm_info("Passed Wrong Read Command",$sformatf("Dut was requested to read the data of the address %h with wrong white spaces or eol character \n",frm_mon.address),UVM_HIGH) |
match++; |
end |
end |
else if (frm_drv._data != frm_mon._data) |
152,7 → 159,8
(frm_drv._chartype == frm_mon._chartype)) |
begin |
`uvm_info("Passed Read Text Mode",$sformatf("Data fields are identical ,, It was requested to read from the address %h and dut reply with the data %p using white space = %p and %p prefix character and %p as end of line character \n",frm_drv.address,frm_mon._data,frm_drv._spacetype1,frm_drv._chartype, |
frm_drv._eoltype),UVM_NONE) |
frm_drv._eoltype),UVM_HIGH) |
match++; |
end |
else |
begin |
170,7 → 178,8
end |
else |
begin |
`uvm_info("Passed Wrong Write Command",$sformatf("Dut was requested to read the data of the address %h with wrong white spaces or eol character \n",frm_mon.address),UVM_NONE) |
`uvm_info("Passed Wrong Write Command",$sformatf("Dut was requested to read the data of the address %h with wrong white spaces or eol character \n",frm_mon.address),UVM_HIGH) |
match++; |
end |
end |
else if (frm_drv._data != frm_mon._data) |
185,7 → 194,8
(frm_drv._chartype == frm_mon._chartype)) |
begin |
`uvm_info("Passed write Text Mode",$sformatf("Data fields are identical ,, It was requested to write to the address %h and dut register the data %p using white space = %p and %p prefix character and %p as end of line character \n",frm_drv.address,frm_mon._data,frm_drv._spacetype1,frm_drv._chartype, |
frm_drv._eoltype),UVM_NONE) |
frm_drv._eoltype),UVM_HIGH) |
match++; |
end |
else |
begin |
214,7 → 224,8
frm_drv.length_data == frm_mon.length_data && |
frm_drv._data == frm_mon._data) |
begin |
`uvm_info($sformatf("Passed Binary %p Command",frm_drv._command),$sformatf("Dut is requested to %p command to start address=%h with data = %p and data length = %0d \n",frm_drv._command,frm_drv.address,frm_drv._data,frm_drv.length_data),UVM_NONE) |
`uvm_info($sformatf("Passed Binary %p Command",frm_drv._command),$sformatf("Dut is requested to %p command to start address=%h with data = %p and data length = %0d \n",frm_drv._command,frm_drv.address,frm_drv._data,frm_drv.length_data),UVM_HIGH) |
match++; |
ack_checker(); |
end |
else |
226,7 → 237,8
end |
else if (frm_drv._command == nop) |
begin |
`uvm_info("NOP Command",$sformatf("Dut is requested to %p command \n",frm_drv._command),UVM_NONE) |
`uvm_info("NOP Command",$sformatf("Dut is requested to %p command \n",frm_drv._command),UVM_HIGH) |
match++; |
ack_checker(); |
end |
end |
235,7 → 247,8
`uvm_fatal("Testbench Bug",$sformatf("Mode is undefined = %p \n",frm_drv._mode)) |
end |
endcase |
end |
end // else: !if(frm_drv._command inside {invalid_read,invalid_write}) |
uvm_resource_db#(int)::write_by_name("Reporting","matched_packets",match); |
end |
endtask:run_phase |
|
251,7 → 264,7
end |
else |
begin |
`uvm_info("Accepted Acknowledge","Acknowledge is the defined as standard \n",UVM_NONE) |
`uvm_info("Accepted Acknowledge","Acknowledge is the defined as standard \n",UVM_HIGH) |
end |
|
endfunction:ack_checker |
endfunction:ack_checker |
/tb/test/uart_test.svh
62,7 → 62,11
|
uart_config _config; |
|
`uvm_component_utils(uart_base_test) |
int matched ; |
|
`uvm_component_utils_begin(uart_base_test) |
`uvm_field_int(matched,UVM_ALL_ON) |
`uvm_component_utils_end |
|
function new (string name,uvm_component parent); |
super.new(name,parent); |
76,10 → 80,11
_config = uart_config::type_id::create("_config",this); |
|
uvm_config_db#(uart_config)::set(this,"*","UART_CONFIGURATION",_config); |
|
|
printer = new(); |
printer.knobs.depth = 3; |
env_configuration(); |
uvm_resource_db#(int)::set("Reporting","matched_packets",0,null); |
endfunction:build_phase |
|
function void connect_phase (uvm_phase phase); |
100,6 → 105,12
task run_phase (uvm_phase phase); |
phase.phase_done.set_drain_time(this,5000); |
endtask:run_phase |
|
function void report_phase (uvm_phase phase); |
uvm_resource_db#(int)::read_by_name("Reporting","matched_packets",matched); |
`uvm_info("FINAL STATUS",$sformatf("The number of matched packets are %0d",matched),UVM_NONE); |
endfunction // report_phase |
|
endclass:uart_base_test |
|
//------------------------------------------------------------------------------------------------- |
586,4 → 597,4
end |
phase.drop_objection(this); |
endtask:run_phase |
endclass:text_mode_test |
endclass:text_mode_test |