简体   繁体   English

Specman UVM记分牌基本问题

[英]Specman UVM Scoreboard basic questions

I've built the next (working correctly) Scoreboard/Monitor environment: 我建立了下一个(工作正常)记分板/监视器环境:

// Scoreboard : like uvm_scoreboard
    scbd_port packet_add   : add packet_s;
    scbd_port packet_match : match packet_s;

My ADD flow: 我的添加流程:

// Monitor:
    expected_packet_o : out interface_port of tlm_analysis of packet_s is instance;

    connect_ports() is also {
        expected_packet_o.connect(Scoreboard.packet_add);
    };

    add_to_Scoreboard() is {
        // ... collecting packet logic ...
        //  Actually adding the packet to SB:
        expected_packet_o$write(expected_packet);
    };   

My MATCH flow: 我的比赛流程:

// Monitor:
    collect_DUT_output() is {
        // ... receiving packet logic ...
        Scoreboard.match_in_scbd(received_packet);
    };

My questions are: is it the right way Specman's UVM scrb ports should be used? 我的问题是:使用Specman的UVM scrb端口是否正确? Why could not I add the expected packet directly through packet_add, something like this: Scoreboard.packet_add$.write(expected_packet) ? 为什么我不能直接通过packet_add添加期望的数据包,类似这样: Scoreboard.packet_add$.write(expected_packet) The only way I've found to add packet to Scoreboard is to connect another TLM port to packet_add, as it is written in the code. 我发现将数据包添加到记分板的唯一方法是将另一个TLM端口连接到packet_add,如代码中所写。 Is there some add method like match_in_scbd in match flow? 匹配流程中是否存在诸如match_in_scbd类的添加方法?

Thank you for any clarifications about Specman Scoreboard add and match flows 感谢您对Specman Scoreboard添加和匹配流程的任何澄清

Think of it this way, the TLM port is just a fancy wrapper of "function pointer" (as in C++) that points to the implemented method. 以这种方式考虑,TLM端口只是“函数指针”的精美包装(如在C ++中),该包装指向已实现的方法。 Nothing stop you from calling the implemented method of the instance of the scoreboard instance directly. 没有什么可以阻止您直接调用记分板实例的实例的实现方法。 The only problem is you have to know which instance of the scoreboard to call in the caller. 唯一的问题是您必须知道要在调用方中调用记分板的哪个实例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM