can we connect agent tlm port to subscriber inbuilt export to get the function coverage
I tried but I am getting zero percent coverage in the coverage report
help me to solve this problem
//here I am writing a small piece of code what I did
//agent
class wr_agent extends uvm_agent;
`uvm_component_utils(wr_agent)
uvm_analysis_port#(wr_txn)port;
function new(string name = "wr_agent",uvm_component parent);
super.new(name,parent);
port = new("port",name);
endfunction
//build_phase
//connect_phase
endclass
// subsciber class
class subscriber extends uvm_subscriber#(wr_txn);
`uvm_component_utils(subsciber)
wr_txn cov;
/*cover group
//cover points
endgroup
*/
function new(string name = "subscriber",uvm_component parent);
super.new(name,parent);
endfunction
function void write(wr_txn t);
this.cov = t;
group1.sample();
endfunction
endclass
//environment
wr_agent agt;
subscriber sub;
//build_phase
function void build_phase(uvm_phase phase);
super.build_phase(phase);
agt = wr_agent::type_id::create("wr_agent",this);
sub = subcriber::type_id::create("sub",this);
endfunction
//connect_phase
function void connect_phase(uvm_phase phase);
wr_agent.port.connect(sub.analysis_export);
endfunction
First I implemented with subscriber and monitor that time coverage report was generated. After I tried with agent and subscriber but my coverage report is zero.
And I given `uvm_info inside the write method but is not printing.
In reply to mada saimanasa:
If you do not see the uvm_info, then you do not receive a transaction or your verbosity is too high. Bcause you do not measure any coverage I believe you dont receive a transaction. Did you connect the monitor’s a_port with a_port of your agent?
I have connected monitor port with agent port and again agent port with the subscriber inbuilt export. now I am getting the coverage and even info message also.