For detailed information on ALERT_HANDLER design features, please see the [ALERT_HANDLER HWIP technical specification]({{< relref “hw/ip/alert_handler/doc” >}}).
ALERT_HANDLER testbench has been constructed based on the [CIP testbench architecture]({{< relref “hw/dv/sv/cip_lib/doc” >}}).
Top level testbench is located at hw/ip/alert_handler/dv/tb/tb.sv
. It instantiates the ALERT_HANDLER DUT module hw/ip/alert_handler/rtl/alert_handler.sv
. In addition, it instantiates the following interfaces, connects them to the DUT and sets their handle into uvm_config_db
:
pins_if
]({{< relref “hw/dv/sv/common_ifs” >}}))pins_if
]({{< relref “hw/dv/sv/common_ifs” >}}))In chip level testing, alert_handler testbench environment can be reused with a chip-level paramter package located at hw/$CHIP/ip/alert_handler/dv/alert_handler_env_pkg__params.sv
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 alert_handler_env_pkg
. Some of them in use are:
parameter uint NUM_MAX_ESC_SEV = 8;
ALERT_HANDLER testbench instantiates (already handled in CIP base env) [tl_agent]({{< relref “hw/dv/sv/tl_agent/README.md” >}}) which provides the ability to drive and independently monitor random traffic via TL host interface into ALERT_HANDLER device.
[ALERT_HANDLER agent]:link WIP is used to drive and monitor transmitter and receiver pairs for the alerts and escalators.
The ALERT_HANDLER RAL model is created with the [ralgen
]({{< relref “hw/dv/tools/ralgen/README.md” >}}) fusesoc
generator script automatically when the simulation is at the build stage.
It can be created manually by invoking [regtool
]({{< relref “util/reggen/README.md” >}}):
All test sequences reside in hw/ip/alert_handler/dv/env/seq_lib
. The alert_handler_base_vseq
virtual sequence is extended from cip_base_vseq
and serves as a starting point. All test sequences are extended from alert_handler_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:
alert_esc_if
interfaceclassa/b/c/d_accum_cnt
, classa/b/c/d_esc_cnt
, and classa/b/c/d_state
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 alert_handler_scoreboard
is primarily used for end to end checking. It creates the following analysis ports to retrieve the data monitored by corresponding interface agents:
alert_fifo
that connects to corresponding alert_monitorsesc_fifo
that connects to corresponding esc_monitorsAlert_handler scoreboard monitors all valid CSR registers, alert handshakes, and escalation handshakes. To ensure certain alert, interrupt, or escalation signals are triggered at the expected time, the alert_handler scoreboard implemented a few counters:
timeout_cyc
registers, the corresponding escalation is expected to be triggeredaccum_threshold
registers, the corresponding escalation is expected to be triggeredphase_cyc
registersThe alert_handler scoreboard is parameterized to support different number of classes, alert pairs, and escalation pairs.
tb/alert_handler_bind.sv
binds the tlul_assert
[assertions]({{< relref “hw/ip/tlul/doc/TlulProtocolChecker.md” >}}) to the IP to ensure TileLink interface protocol compliance.We are using our in-house developed [regression tool]({{< relref “hw/dv/tools/README.md” >}}) 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/alert_handler/dv/alert_handler_sim_cfg.hjson -i alert_handler_smoke
In this run command, $CHIP can be top_earlgrey, etc.
{{< testplan “hw/ip/alert_handler/data/alert_handler_testplan.hjson” >}}