What are UVM Registers good for? • Standard – Runs on all the simulators • High level abstraction – Test can be “almost C code” or device driver-like – Test doesn’t have to change • If register address changes • If register bit arrangements change • If registers move into different “blocks”
Does the UVM Register have issues? Lines of Register Register Code Size Files • Complexity Code Files LOC UVM 1.2 26/158 22k/78k 16% 28% – It’s a lot of the UVM UVM 1.1d 26/138 22k/69k 19% 32%
• Doc size (about 26% of the user guide)
• Code size (about 30% of the code base) – VPI – Generator – XML/CSV input • RAM Size – modeling a 32 bit register with classes is expensive • Modeling Quirky Registers • Transparency – what you see is what you get • Monitoring DUT value changes can be hard
Possible solutions • Make classes more efficient - hard • Make code base less complex and more transparent - hard • Don’t use UVM Registers – non-starter • Think about registers again – takes time
Register Monitor • Each register in the DUT has a “shadow” or model in the testbench. • The model is bound to the actual register values in the DUT using SystemVerilog ‘bind’. • All updates to the DUT register are immediately reflected in the model. • Backdoor loads are accomplished using this bound model and do not require VPI.
Register Scoreboard – Is my register working? • Scoreboard – is the functionality correct? – Actual DUT register value always immediately available – Model desired behavior using SystemVerilog – Compare desired behavior against observed • write() • read() • Causes a new value to be predicted. • Implement any access routine – peek()/poke()/set()/get() • Use raw struct field access
Modeling Quirky Registers • Quirky registers have special behavior. – Clear on Read, Write Once – ID Registers, FIFO Registers, Coherent Registers, Broadcast Registers. • Implement using SystemVerilog. Just write the code. – It is NOT hard code to write. – Creating a generic framework for a library that supports all kinds of Quirky Registers IS hard. • Callbacks, pre_ and post_ routines, complex Boolean equations.
Register Functional Coverage • Write the covergroup • Sample the register • Sample the register fields • Sample other registers and other register fields
Conclusions • UVM Register tests and models are useful and powerful – They should be used as widely as possible – They should be simplified and optimized for speed and space • The model • The test • The underlying modeling infrastructure • The proposed ideas are a good start to thinking differently about UVM Register tests and models. – But are not yet complete.
Guidelines (2) • Your company name and/or logo are only allowed to appear on the title page. • Minimize the use of product trademarks • Page setup should follow on-screen-show (4:3) • Do not use recurring text in headers and/or footers • Do not use any sound effects • Disable dynamic slide transitions • Limit use of animations (not available in PDF export)
Guidelines (3) • Use clip-art only if it helps to state the point more effectively (no generic clip-art) • Use contrasting brightness levels, e.g., light-on-dark or dark-on-light. Keep the background color white • Avoid red text or red lines • Use the MS equation editor or MathType to embed formulas • Embed pictures in vector format (e.g. Enhanced or Window Metafile format)