v3 FlexVerifier
v3 FlexVerifier
FLEXVERIFIER UVM
GARY GE
Solution Architect
[email protected]
+86 185-0151-0645
FlexNoC design flow
Specification
sockets
floorplan domains traffic
outline memory map scenario
Physical FlexExplorer
Architecture use case performance
LEF/DEF, switch topology
auto pipe, QoS, buffers
placement serialization
Structure
RTL, SystemC
IP-XACT
scripts/constraints
FlexVerifier
gates testbench
P&R Synthesis tests
estimate
2
Overview
ARTERIS CONFIDENTIAL 3
Verification Strategy
• ARTERIS ensures correctness of delivered IP
– Unit Level Testing for each and every element of the library
– Software regression
– Integration regression using FlexVerifier environment
Customer
Specification
Validates
Implements
Validation txt files
FlexNoC UVM RTL
Generates Testbench
configuration Design
ARTERIS CONFIDENTIAL 4
Validation files
• Generated by FlexNoC using PDD configuration in txt/ directory
– Memory Map (MemoryMap.txt)
– Register Map and reset values (RegisterAccesses.txt)
– Probing infrastructure to ATB interface (ProbeConnectivity.txt and ProbeConf.txt)
– Power Domain definition (PowerDomains.txt)
ARTERIS CONFIDENTIAL 5
Testbench generation and
usage
ARTERIS CONFIDENTIAL 6
FlexNoC Integration
• A NoC Structure view is required
• A HDL export with VCS or NCSIM simulator option must be created
• Export tool command via GUI menu or batch (command line)
• Built and run from the shell
– Makefile is generated
ARTERIS CONFIDENTIAL 7
Running a test
• Building/Simulating
– make compilation
– make tests (run all tests)
– make <testname>
– ./runUvmTestEnv.sh <testname> <logfileName> “<socketName> …” (run test
limited to selected sockets or with additional options)
• Logs files
– <logfileName> default to <testname>.log. Complete log file
– <logfileName_anvu.log> default to <testname>_anvu.log. Extracted Arteris log
from complete log
• Configuration files
– anvu_build_options.mk (compilation options)
– anvu_sim_options.sh (simulation options, UVM verbosity)
– anvu_sim_waves.tcl (waveform dumping VCS only)
– anvu_build_files.base (sources files for the simulation)
– user_scoreboard_overloads.sv (User defined scoreboard override)
– user_tests_pkg.sv (User defined tests)
ARTERIS CONFIDENTIAL 8
Summary of built-in tests
Test name Description
Send a 1 word Read then Write per valid connection. Scoreboard will compute the
latency
latencies at the end of the test.
Send a 128B burst Read then Write per valid connection. Scoreboard will compute the
throughput
throughput at the end of the test.
Send a 1 word Read then Write at the beginning and at the end of each mapping defined in
connectivity
the txt/MemoryMap.txt file.
Same as connectivity with Slave VIP configured to respond in error and only testing the
connectivityWithSlvError
connection that goes out of the interconnect.
userBit Send transactions varying the user bit for each initiator.
Send transactions from each initiator to each target with varying transaction parameter to
thorough
extensively cover the protocol.
random Random transactions per initiator flow sent concurrently
Run a connectivity test while going through all the possible power state combinations
power
defined in txt/PowerDomain.txt
Configure and exercise all probes connected to an ATB output using txt/ProbeConf.txt and
probeConnectivity
txt/ProbeConnectivity.txt
Reading file txt/RegisterMap.txt, do a read-write-read-reset tests to verify configuration
registerMap
registers.
flowControl Configure VIP to do flowControl while sending transaction one initiator at a time
9
Running test with optional arguments
ARTERIS CONFIDENTIAL 10
UVM classes and file hierarchy
ARTERIS CONFIDENTIAL 11
FlexVerifier UVM test hierarchy
Anvu_uvmTest_Env_Top RTL
Another Verilog wrapper
including VIP VIF and ClkGen
ARTERIS CONFIDENTIAL 12
Files hierarchy
• anvu_uvmTestEnv_Top.v
– SV interfaces to anvu_bench_env
– x_Dut_x: (nocAIP) Instrumented NoC
• xUser_Tesed_NoCx: Verilog DUT
• SV interfaces to anvu_nocAIP_env
• anvu_sim_options.sh, anvu_build_options.mk
– Simulation and compilation options (waves, UVM
verbosity)
• Makefile
– Compilation and simulation of the different tests
ARTERIS CONFIDENTIAL 13
anvu_top_env
• anvu_top_env.v
– Instantiate (build_phase):
• Active bench
• anvu_bench_env
• Passive scoreboarding bench
• anvu_nocAip_env
• anvu_virtual_sequencer
ARTERIS CONFIDENTIAL 14
Clocking scheme
• 2 modes
– Sel==1 : Clock driven by SV anvu_clk_if.Clk
– Sel==0 : Clock driven by internal oscillator
• anvu_clk_driver (./anvu_xactors_pkg.sv)
– setFrequency(...)
– driveFromVerilog() / driveFromTestBench() : to control Sel
– startClock()
– stopClock()
15
Virtual sequence synchronization
mySquence
blocked myDriver //connected to mySequencer
body()
myVirtualSquencer blocked run_phase()
`uvm_create(req)
body() get_enxt_item(req)
req.randomize()
DriveSignals
`uvm_send(req)
mySequence.start(mySequencer) item_done()
next… released
next… released next…
endtask
• item_done called by driver releases the sequencer/sequence and then the virtual sequence
• Caution : item_done() usually called by the driver when the request phase is finished (AXI,OCP...).
– a sequence can be finished but there are still responses in the NoC
top.wait_flow(flow,nbCycles);
– Waits until all transactions sent by initiator « flow » sequencer are finished
– Raise a uvm_error after nbCycles if transactions are still pending
– Uses typically events from VIPs
top.wait_flows(nbCycles);
– wait until all transactions sent by all sequencers have finished
• This works in most cases. But problems with early responses (ex : OCP WR)
– OCP Driver will consider a transaction complete at the end of the request
– It will trigger the event for wait_flow, but there are still req/rsp in NoC
top.wait_scoreboard_empty();
– Waits until the scoreboard has no pending transfers
ARTERIS CONFIDENTIAL 16
End to end scoreboard
verification component
ARTERIS CONFIDENTIAL 17
Scoreboard
• Receive ByteTransfer from nocAIP initiator and target monitors
ARTERIS CONFIDENTIAL 18
Scoreboard prediction
• Uses prediction mechanism
– Each initiator BT is predicted to exit NoC through a known
socket, address, …
– If a target BT matches this prediction, then association is
validated
– An initiator BT can also be predicted not to exit the NoC
Association BT0
Association BT1
Association BT2
Association BT3
Send 4B
Read
Simulation time
Target T0
Receive
4B Read StartTransaction BT0 BT1 BT2 BT3 EndTransaction
ARTERIS CONFIDENTIAL 19
Scoreboard user overloads
• Stored in user_scoreboard_overloads.sv
• Allow to override default behavior of the scoreboard to accommodate with specific behavior:
– Firewalls / Transaction conversion
ARTERIS CONFIDENTIAL 20
Example overload explanation
• For scoreboard helper function allowTargOrphan_TargNoByteen in
sv/anvu_scoreboard_pkg.sv
– Protocol is selected using nocSocketTypeByFlowId and the target flowId
– You can then proceed to protocol specific functions
function bit allowTargOrphan_TargNoByteen(anvu_nocAip_byteTransfer targTransfer,string targSocketName);
anvu_flow targFlow = targTransfer.m_flow;
bit targSupportBe = 1;
case (nocSocketTypeByFlowId[targFlow.id()])
OCP : begin
anvu_ocp_monitor_transaction ocpTr;
$cast(ocpTr,targTransfer.m_transaction);
targSupportBe = (ocpTr.ocpConf.byteen && nocOcpTargInfoByFlowId[targFlow.id()]==0 ) ||
ocpTr.ocpConf.mdatabyteen;
end
endcase
return (
targTransfer.m_opcode == anvu_noc_definitions_pkg::WRITE
&& !targSupportBe
&& ( targSocketName == "" || targFlow.isFrom(targSocketName) )
);
endfunction
ARTERIS CONFIDENTIAL 21
Scoreboard log analysis
Req Data Rsp
Socket name: Flow Address Opcode Status Value
time time time
ARTERIS CONFIDENTIAL 22
Thank you
23
ARTERIS CONFIDENTIAL