Hi everyone,
I work on a project on faculty. The project it is “Yapp router”.
I have some problems with all monitors. The main problems represent “@(posedge interface_h.signal)” because the code from below does not run.
I tested many issues,but can you indicate more possible problems ?
The host monitor code:
`ifndef __HOST_MON_SVH
`define __HOST_MON_SVH
class host_mon extends base_monitor#(.tr_type(host_pkt),
.vif_type(virtual host_if.HOST_MONITOR));
function new(component parent_h = null, string name );
super.new(parent_h, {name,"host_mon"});
endfunction
virtual task collect(host_pkt transaction_h);
display_msg_by_instance(DEBUG, "Wait enable posedge ", 1);
@(posedge this.virt_intf_h.hen);
display_msg_by_instance(DEBUG, "Enable posedge it's come", 1);
this.component_state_inst = IDLE;
@(negedge this.virt_intf_h.clock);
if(this.virt_intf_h.hen == 1'b1) begin
if(this.virt_intf_h.hwr_rd == 1'b1) begin
transaction_h.host_op = WRITE_HOST;
transaction_h.haddr = this.virt_intf_h.haddr;
transaction_h.hdata = this.virt_intf_h.hdata_in;
end else if(this.virt_intf_h.hwr_rd == 1'b0) begin
transaction_h.host_op = READ_HOST;
transaction_h.haddr = this.virt_intf_h.haddr;
transaction_h.hdata = this.virt_intf_h.hdata_in;
end
end
this.component_state_inst = DONE;
endtask : collect
endclass
`endif
And the simulation result it’s in the next words:
I have many positive edges, but does not works,the monitor remains blocked on the first execution.
===================
* @(0.00 ns) ns => [ DEBUG ]: [ test_data_transfer.yapp_env_config.host_agent.ACTIV_host_mon ] = Wait enable posedge (line= 1)
* @(0.00 ns) ns => [ DEBUG ]: [ test_data_transfer.yapp_env_config.reset_agent.ACTIV_reset_mon ] = Collect finish (line= 1)
* @(1.00 ns) ns => [ DEBUG ]: [ test_data_transfer.yapp_env_config.reset_agent.ACTIV_reset_mon ] = Collect finish (line= 1)
* @(478.00 ns) ns => [ DEBUG ]: [ test_data_transfer.yapp_env_config.reset_agent ] = component_state_inst = Monitor = DONE (line= 114)
* @(478.00 ns) ns => [ DEBUG ]: [ test_data_transfer.yapp_env_config.host_agent ] = component_state_inst = Monitor = DONE (line= 114)
============================= TEST PASS ===================
====================