Syntax error for TLM fifo

class dff_scob_fifo extends uvm_scoreboard;
//registration to the factory
`uvm_component_utils(dff_scob_fifo)

//instantiation of transaction and SEQ
dff_transaction dff_trans_h;
dff_seq dff_seq_h;
int matched, mismatched;

//Analysis exports declaration
uvm_analysis_export #(dff_transaction) before_export;
uvm_analysis_export #(dff_transaction) after_export;

//
uvm_tlm_analysis_fifo #(dff_transaction) before_fifo, after_fifo;

//constructor
function new(string name=“D_FF_SCOB”,uvm_component p);
super.new(name,p);
//dff_ap_imp = new(“dff_ap_imp”,this);
before_fifo=new(“before_fifo”,this,20);
after_fifo=new(“after_fifo”,this,20);
endfunction

//Build phase of scoreboard
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
$display(“This is BUILD phase of SCOB–TLM FIFO”);
dff_trans_h=dff_transaction::type_id::create(“dff_trans_h”);
dff_seq_h=dff_seq::type_id::create(“dff_seq_h”,this);
endfunction

//connect phase
virtual function void connect_phase(uvm_phase phase);
super.connect_phase(phase);
$display(“This is CONNECT phase of SCOB–TLM FIFO”);
before_export.connect(before_fifo.analysis_export);
after_export.connect(after_fifo.analysis_export);
endfunction

endclass:dff_scob_fifo

I am getting the following errors could yo please tell me where I am getting wrong?

Error-[TMAFTC] Too many arguments to function/task call
dff_scob_fifo.sv, 21
“uvm_tlm_analysis_fifo::new(“before_fifo”, \this , 20)”
The above function/task call is done with more arguments than needed.

Error-[TMAFTC] Too many arguments to function/task call
dff_scob_fifo.sv, 22
“uvm_tlm_analysis_fifo::new(“after_fifo”, \this , 20)”
The above function/task call is done with more arguments than needed.

2 errors
CPU time: 1.601 seconds to compile
Exit code expected: 0, received: 1

In reply to sharan785:

The constructor of the uvm_tlm_analysis_fifo has only 2 arguments, name and parent, as the error message is saying.

function new(string name=“D_FF_SCOB”,uvm_component p);
super.new(name,p);
//dff_ap_imp = new(“dff_ap_imp”,this);
before_fifo=new(“before_fifo”,this);
after_fifo=new(“after_fifo”,this);
endfunction

This is the EDA playground link:

I am getting runtime error
Error-[NOA] Null object access
dff_scob_fifo.sv, 37
The object at dereference depth 1 is being used before it was
constructed/allocated.
Please make sure that the object is allocated before using it.

In reply to sharan785:

I get a different error message. It is related to these lines of code in the scoreboard:

    before_fifo.get(dff_trans_h.din);
    after_fifo.get(dff_trans_h.q);

The get functions are related to whole transactions but not to single data memebers.
This is what you have to correct.

//connect phase
  virtual function void connect_phase(uvm_phase phase);
    super.connect_phase(phase);
    $display("****This is CONNECT phase of SCOB--TLM FIFO****");
    before_export.connect(before_fifo.analysis_export);
    after_export.connect(after_fifo.analysis_export);
  endfunction

In reply to chr_sue:

I have made the changes and now getting that run time error:

Error-[NOA] Null object access
dff_scob_fifo.sv, 37
The object at dereference depth 1 is being used before it was
constructed/allocated.
Please make sure that the object is allocated before using it.

Q2.
How can we compare could you please give a glampse.
Whole fifo needs to be compared like queue or what?

In reply to sharan785:

You do not construct the before_export and after_export.
You have to compare the transactions, or better the data gfields which are of interest.
Best way is to implement a do_compare function in the transaction class. You are using the field macros, which are providing this function. The syntax is

transaction1.compare(transaction2);

In reply to chr_sue:

The last transaction is running for infinite time.

Output:

UVM_INFO dff_sequence.sv(40) @ 85: uvm_test_top.dff_env_h.dff_agent_h.dff_sqr_h@@dff_seq_h [DFF_GEN] ****The SEQUENCE at the iteration::[ 4 ] is****
UVM_INFO dff_sequence.sv(42) @ 85: uvm_test_top.dff_env_h.dff_agent_h.dff_sqr_h@@dff_seq_h [DFF_GEN] The Generator stimulus is: din=7
UVM_INFO dff_monitor.sv(53) @ 90: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=13::q=13::qbar=0
UVM_INFO dff_driver.sv(42) @ 95: uvm_test_top.dff_env_h.dff_agent_h.dff_drv_h [DFF_DRV] Triggered DUT and din=7::q=0
UVM_INFO dff_monitor.sv(53) @ 100: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=13::q=13::qbar=0
UVM_INFO dff_monitor.sv(53) @ 110: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=7::q=7::qbar=0
UVM_INFO dff_sequence.sv(40) @ 115: uvm_test_top.dff_env_h.dff_agent_h.dff_sqr_h@@dff_seq_h [DFF_GEN] ****The SEQUENCE at the iteration::[ 5 ] is****
UVM_INFO dff_sequence.sv(42) @ 115: uvm_test_top.dff_env_h.dff_agent_h.dff_sqr_h@@dff_seq_h [DFF_GEN] The Generator stimulus is: din=11
UVM_INFO dff_monitor.sv(53) @ 120: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=7::q=7::qbar=0
UVM_INFO dff_driver.sv(42) @ 125: uvm_test_top.dff_env_h.dff_agent_h.dff_drv_h [DFF_DRV] Triggered DUT and din=11::q=0
UVM_INFO dff_monitor.sv(53) @ 130: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=7::q=7::qbar=0
UVM_INFO dff_monitor.sv(53) @ 140: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=11::qbar=0
UVM_INFO dff_monitor.sv(53) @ 150: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=11::qbar=0
UVM_INFO dff_monitor.sv(53) @ 160: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=11::qbar=0
UVM_INFO dff_monitor.sv(53) @ 170: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=11::qbar=0
UVM_INFO dff_monitor.sv(53) @ 180: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=11::qbar=0
UVM_INFO dff_monitor.sv(53) @ 190: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=11::qbar=0
UVM_INFO dff_monitor.sv(53) @ 200: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=11::qbar=0
UVM_INFO dff_monitor.sv(53) @ 210: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=11::qbar=0 

In each transaction monitor broadcasting two different values. Why is it happening? Problem with the monitor or scoreboard

In reply to sharan785:

Could you please share your EDAPlayground data?

In reply to chr_sue:

Which data I need to share with you exactly? log or what else. please let me know.

In reply to sharan785:

Do You have still the EDAPlayground example? This would be the best.

In reply to chr_sue:

yes I have in the same link which was mentioned previously.

In reply to sharan785:

Please check your UVM topology. I do not see where you are connecting the analysis exports (before/after).

In reply to chr_sue:

Yes I have forgotten. Now I have made changes and only one transaction is passing and remaining all are skipping.

UVM_INFO dff_sequence.sv(40) @ 25: uvm_test_top.dff_env_h.dff_agent_h.dff_sqr_h@@dff_seq_h [DFF_GEN] ****The SEQUENCE at the iteration::[ 2 ] is****
UVM_INFO dff_sequence.sv(42) @ 25: uvm_test_top.dff_env_h.dff_agent_h.dff_sqr_h@@dff_seq_h [DFF_GEN] The Generator stimulus is: din=11
UVM_INFO dff_monitor.sv(53) @ 30: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=1::q=1::qbar=0
UVM_INFO dff_driver.sv(42) @ 35: uvm_test_top.dff_env_h.dff_agent_h.dff_drv_h [DFF_DRV] Triggered DUT and din=11::q=0
UVM_INFO dff_monitor.sv(53) @ 40: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=1::q=1::qbar=0
UVM_INFO dff_monitor.sv(53) @ 50: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=0::qbar=0
UVM_INFO dff_sequence.sv(40) @ 55: uvm_test_top.dff_env_h.dff_agent_h.dff_sqr_h@@dff_seq_h [DFF_GEN] ****The SEQUENCE at the iteration::[ 3 ] is****
UVM_INFO dff_sequence.sv(42) @ 55: uvm_test_top.dff_env_h.dff_agent_h.dff_sqr_h@@dff_seq_h [DFF_GEN] The Generator stimulus is: din=13
UVM_INFO dff_monitor.sv(53) @ 60: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=11::qbar=0
UVM_INFO dff_driver.sv(42) @ 65: uvm_test_top.dff_env_h.dff_agent_h.dff_drv_h [DFF_DRV] Triggered DUT and din=13::q=0
UVM_INFO dff_monitor.sv(53) @ 70: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=11::qbar=0
UVM_INFO dff_monitor.sv(53) @ 80: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=13::q=13::qbar=0
UVM_INFO dff_sequence.sv(40) @ 85: uvm_test_top.dff_env_h.dff_agent_h.dff_sqr_h@@dff_seq_h [DFF_GEN] ****The SEQUENCE at the iteration::[ 4 ] is****
UVM_INFO dff_sequence.sv(42) @ 85: uvm_test_top.dff_env_h.dff_agent_h.dff_sqr_h@@dff_seq_h [DFF_GEN] The Generator stimulus is: din=7
UVM_INFO dff_monitor.sv(53) @ 90: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=13::q=13::qbar=0
UVM_INFO dff_driver.sv(42) @ 95: uvm_test_top.dff_env_h.dff_agent_h.dff_drv_h [DFF_DRV] Triggered DUT and din=7::q=0
UVM_INFO dff_monitor.sv(53) @ 100: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=13::q=13::qbar=0
UVM_INFO dff_monitor.sv(53) @ 110: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=7::q=7::qbar=0
UVM_INFO dff_sequence.sv(40) @ 115: uvm_test_top.dff_env_h.dff_agent_h.dff_sqr_h@@dff_seq_h [DFF_GEN] ****The SEQUENCE at the iteration::[ 5 ] is****
UVM_INFO dff_sequence.sv(42) @ 115: uvm_test_top.dff_env_h.dff_agent_h.dff_sqr_h@@dff_seq_h [DFF_GEN] The Generator stimulus is: din=11
UVM_INFO dff_monitor.sv(53) @ 120: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=7::q=7::qbar=0
UVM_INFO dff_driver.sv(42) @ 125: uvm_test_top.dff_env_h.dff_agent_h.dff_drv_h [DFF_DRV] Triggered DUT and din=11::q=0
UVM_INFO dff_monitor.sv(53) @ 130: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=7::q=7::qbar=0
UVM_INFO dff_monitor.sv(53) @ 140: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=11::qbar=0
UVM_INFO dff_monitor.sv(53) @ 150: uvm_test_top.dff_env_h.dff_agent_h.dff_mon_h [D_FF_MON] The data sent to scoreboard::din=11::q=11::qbar=0
UVM_INFO /apps/vcsmx/vcs/Q-2020.03-SP1-1//etc/uvm-1.2/src/base/uvm_objection.svh(1276) @ 150: reporter [TEST_DONE] 'run' phase is ready to proceed to the 'extract' phase
UVM_INFO dff_scob_fifo.sv(88) @ 150: uvm_test_top.dff_env_h.dff_scob_fifo_h [D_FF_SCOB] The Total number of matched test cases for D-FF are:[1]
UVM_INFO dff_scob_fifo.sv(90) @ 150: uvm_test_top.dff_env_h.dff_scob_fifo_h [D_FF_SCOB] The Total number of mismatched test cases for D-FF are:[0]
UVM_INFO /apps/vcsmx/vcs/Q-2020.03-SP1-1//etc/uvm-1.2/src/base/uvm_report_server.svh(894) @ 150: reporter [UVM/REPORT/SERVER] 

This is the output I am getting now.

Thanks for pointing out the errors and mistakes. Kindly tell me remaining errors which needs to be done.

In reply to sharan785:

I do not see your final code. In the EDAPlayground link I see only your old code.

In reply to chr_sue:

I have made changes in the environment.

//connect phase
  virtual function void connect_phase(uvm_phase phase);
    super.connect_phase(phase);
    $display("****This is CONNECT phase of ENV****");
    //Analysis port connection
    //AGENT is the initiator
    //dff_agent_h.dff_mon_h.dff_ap.connect(dff_scob_h.dff_ap_imp);
    dff_agent_h.dff_mon_h.dff_ap.connect(dff_scob_fifo_h.before_export);
    dff_agent_h.dff_mon_h.dff_ap.connect(dff_scob_fifo_h.after_export);                                
  endfunction

check this.

In reply to sharan785:

I do not understand your scoreboard implementations. Which one are you using?
And the compair is false. See the log file:

===== IN the SCOB Comparison PASS LOGIC =====

[EXP] The EXPECTED output is:20193

[REF] The REF MODEL output is:10193

In the scob_fifo you are retrieving the transaction with the same name form the fifos:
//Whole transactions needs to be given while using get method
before_fifo.get(dff_trans_h);
after_fifo.get(dff_trans_h);
This is useless, because you are overriding the transactions.

Please find a running example here:

But you have to clean-up your code. There is awrong clocking block in your interface description etc.

In reply to chr_sue:

What is the correct approach for the clocking block, what are all the improvements needs to be done to this. Could you please point out.

In reply to sharan785:

Your input/ouput declaration is wrong. outputs of the DUT are inputs to the clocking block and vice versa. Your DUT example is tooo simple to describe more improvements.

In reply to chr_sue:

Thanks for all the information