Beruflich Dokumente
Kultur Dokumente
Register-Based Testing
Tom Fitzpatrick
Verification Evangelist
academy@mentor.com
www.verificationacademy.com
Scoreboard Checking
Actual vs. register contents
rdata = spi_rm.rxtx_reg.get();
if(rdata != mosi_data)
error = 1;
(0) - None
(1) - Individual register bits
(2) - Individual register and memory
addresses
UVM_CVR_FIELD_VALS (4) - Field values
UVM_CVR_ALL
(-1) - All coverage models
Currently limited to
UVM_CVR_ADDR_MAP
Coding Guideline
Always wrap a covergroup in a uvm_object
wrapper
class covergroup_wrapper extends uvm_object;
`uvm_object_utils(covergroup_wrapper)
Modelling Memory
The register model provides access to
memory regions
mem.read()/write() to location x in memory y
The memory location address offset is calculated:
mem.read(status, offset_addr, data, .)
mem.write(status, offset_addr, data, .)
Write loop
task body;
super.body();
for(int i = 0; i < 10; i++) begin
Randomize data
Constrain address to be
within the memory range
Read loop
Description
uvm_mem_single_walk_seq
uvm_mem_walk_seq
uvm_mem_single_access_seq
uvm_mem_access_seq
Aggregated Sequences:
Sequence Name
Description
uvm_reg_mem_shared_access_seq
uvm_reg_mem_built_in_seq
Register Summary
Register Block contains
Register model
- Fields
Address Map
Sub-blocks