Professional Documents
Culture Documents
Training On Ip & Soc Functional Verification Methodology: Using Uvm
Training On Ip & Soc Functional Verification Methodology: Using Uvm
LAB3
Scoreboarding
Objectives:
The goal of this lab is to implement a scoreboard checking mechanism between the register
interface of the UART and the external serial interface of the UART on the TX line.
• Understanding how the scoreboard is connected to multiple monitors
• Understanding data checking mechanisms.
Introduction:
The design under test (DUT) is a UART 16550 from opencores.org.
In this lab we will implement a scoreboard between the APB Register programming interface of
the UART and the Tx data that are actually sent by the DUT.
1
GSE5 TP Verification Circuit BARRIGA_GUO
2
GSE5 TP Verification Circuit BARRIGA_GUO
✦ Recompile and Rerun
Here is our result:
If we add the break point before do_nothing, we can see the simulation will break in
function do_nothing. Here is the simulation information in console
3
GSE5 TP Verification Circuit BARRIGA_GUO
✦ Push the transaction data to the queue “tx_scoreboard” when:
• The scoreboard is enable
• There is a write transaction to address 0x00
At first we create a new class which named mytrans, who inherit uvm_transaction, it has
address which is 32 bits and also data 32 bits.
Then we create the class mytrans_queue which inherit uvm_object, it created a table queue
for putting the transactions.
Then in the function write_apb, we add the code for storing the transactions. It begins to
store the data when scoreboard_enable==1.
✦ In write_tx_frame:
Check the previously pushed data is matching the one you are receiving. o
Check the first element of the queue is the received packets, else issue a UVM_ERROR
using the macro: `uvm_error("MESSAGE_ID","SOME ERROR MESSAGE")
Here is our code in write_tx_frame, at first we check whether the queue is empty, if not, we
begin our checking of the coherence of the data by using assert.
4
GSE5 TP Verification Circuit BARRIGA_GUO
Then we recompile our program and rerun it, here is the result:
Conclusion:
In this lab, we know how to use the assertions, we understand well how scoreboard checking works,
including implementing a scoreboard and connecting a scoreboard with the multiple monitors.
Before we do the checking, we could record data into queues or list. Then we verify the coherence
of the datas one by one. During this lab, it deepened our understanding of data checking
mechanisms.