In reply to verif_learner:
In reply to cuonghl:
Earlier, when we used to implement checkers or loggers in our testbench, one of the rules we normally used was to segregate clearly the different steps as follows:
- collect data
- process
- log them (if this is a monitor or data logger)
as you can see, it is not a good idea to interleave 1 and 2 unless there is a compelling reason to do so. This not only makes logic difficult to understand and maintain, it is not efficient simulation wise. For example, it makes sense to dump a transaction once instead of partially dumping the transaction in 4 steps.
But I would like to understand why you think on the fly checking is difficult. Can you give an example?
On the fly checker has some benefits but the cost associated is not worth it (in my view).
For example, on the fly can help us to stop/terminate simulation the moment we see bad behaviour but its hardly useful or hardly any major savings in time.
Anyway, I shared some thoughts from my side. I hope it helps.
As I said, we can’t always use fly-checking. Let’s see the following example:
Our test sends to DUT 2 messages (red, geen), each message have 4 packets (transactions) FIRST, MIDDLE, MIDDLE and LAST. These packets are interleaving. DUT only handles the message once it receives all the packets.

Now, I want to check:
- Data of these message are good or not
- The packet-ordering is good or not
- The packet-interleaving of 2 messages happen or not
Obviously, we can’t check on-fly right? This case, we have to collect all transactions/packets of these 2 messages before checking them when simulation’s finished.