Halona
Halona

Reputation: 1485

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? Why could not I add the expected packet directly through packet_add, something like this: 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. Is there some add method like match_in_scbd in match flow?

Thank you for any clarifications about Specman Scoreboard add and match flows

Upvotes: 2

Views: 316

Answers (1)

hevangel
hevangel

Reputation: 93

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. 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.

Upvotes: 0

Related Questions