For detailed information on TLUL design features, please see the TLUL design specification.
Only following modules are verified in this testbench.
The other TLUL modules as follows are verified in the blocks that instantiate them.
XBAR testbench has been constructed based on the hw/dv/sv/dv_lib
Top level testbench is located at hw/ip/tlul/dv/tb/tb.sv
. It instantiates the XBAR DUT module hw/top_earlgrey/ip/xbar/rtl/autogen/xbar_main.sv
. In addition, it instantiates the following interfaces, connects them to the DUT and sets their handle into uvm_config_db
:
The following utilities provide generic helper tasks and functions to perform activities that are common across the project:
All common types and methods defined at the package level can be found in xbar_param
. Some of them in use are:
// 3 hosts can access a same device, reserve upper 2 bits. If all hosts send // maximum outstanding request in this device, the device needs extra 2 bits // for source ID to accommodate all the requests parameter int VALID_HOST_ID_WIDTH = 6
XBAR env instantiates tl_agent for each xbar host and device, which provides the ability to drive and independently monitor random traffic via TL host/device interface.
All test sequences reside in hw/ip/tlul/dv/env/seq_lib
. The xbar_base_vseq
virtual sequence is extended from dv_base_vseq
and serves as a starting point. All test sequences are extended from xbar_base_vseq
. It provides commonly used handles, variables, functions and tasks that the test sequences can simple use / call. Some of the most commonly used tasks / functions are as follows:
To ensure high quality constrained random stimulus, it is necessary to develop a functional coverage model. The following covergroups have been developed to prove that the test intent has been adequately met:
The xbar_scoreboard
is primarily used for end to end checking. It extends from scoreboard_pkg::scoreboard, which supports multiple queues and in-order/out-of-order comparison. Scoreboard checks one transaction twice:
When device receives a transaction, we don't predict which host drives it. XBAR DUT may not drive transaction received from host to device in order. Due to this limitation, scoreboard is designed as following:
d_error = 1
. Each host has a queue used only for unmapped items. It stores the unmapped item from a_channel, then compare it with the same source ID response received in d_channel.Following analysis fifos are created to retrieve the data monitored by corresponding interface agents:
Following item queues are created to store items for check
Another limitation of scoreboard is that we don't check the conversion of source ID from host to device. We set the source of expected item to 0 before put it into scoreboard queue and hack the source of actual item to 0 before comparison
tb/xbar_bind.sv
binds the tlul_assert
assertions to the IP to ensure TileLink interface protocol compliance.We are using our in-house developed regression tool for building and running our tests and regressions. Please take a look at the link for detailed information on the usage, capabilities, features and known issues. Here's how to run a smoke test:
$ $REPO_TOP/util/dvsim/dvsim.py $REPO_TOP/hw/$CHIP/ip/$XBAR_IP/dv/autogen/${XBAR_IP}_sim_cfg.hjson -i xbar_smoke
In this run command, $XBAR_IP can be xbar_main, xbar_peri, etc. $CHIP can be top_earlgrey, etc.