We are trialing OVM in our FPGA development process and although we’ve read lots of material (OVM User Guide, OVM Cookbook, some of Step-By-Step-FV-w/SV&V) there’s still an aspect that is causing us some confusion.
We come from a background of heavy directed testing. Constrained random tests are interesting and we hope to use this soon, but to get started we want to move some of our directed tests into OVM. I know that OVM is not focused on directed testing, but I am led to believe it is possible.
Consider a packet-based bus interface. It’s fairly clear to me how one would use OVM to conduct random tests (packet length, gap, bursts, etc) on this interface. You’d use a sequencer to provide the bus driver with transactions describing each packet, and a monitor/scoreboard would oversee the activity and pass judgement on the test. The top-level test would configure the test-bench to use a particular sequence depending on the purpose of the test. A directed test in this case might be a custom-defined sequence item, set up to be used by the top-level test.
But what about the configuration of the DUT prior to these tests? Although not specifically a real “test”, it is highly directed. In our example, we have a CPU register interface that needs certain registers set before the packet bus can be used. Would it make sense to write a driver that accepts “register read” and “register write” transactions, and to construct small sequences of these transactions that configure various parts of the DUT? Then at the start of the test, before the packet bus sequencer is enabled, this configuration sequencer sends through all its config sequences to the CPU register interface driver?
Or would it make more sense to forget sequences and simply construct and send specific transactions to the driver directly from the top-level test?
Secondly, what about the situation where the DUT is capable of performing some of its own internal tests? In this situation, a register is written, some time elapses, and the result is read from another register. How would this be handled in OVM? The Scoreboard is watching register monitor transactions, looking for a did-it-work result, but it has no control over the test so how will it know when to look for a successful result transaction?
Or is the answer to create a higher level transaction that represents this entire process, and in turn spawns the register transactions? Then set the scoreboard to watch these higher level transactions. This seems to imply some sort of “directed test” component that knows how to convert these high level “internal test” sequence items into register read/write transactions.
I think the problem we have is “closing the loop” - we understand each component’s role and how they fit together. What we don’t quite understand is how everything is orchestrated. Where is the overall control? If the Scoreboard is responsible for determining whether the test succeeded or failed, but has no control over the running of the test, then how can such directed testing be made to work?