mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Expose VPI cbNextDeadline via the public API (#2212)
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
This commit is contained in:
parent
4145a38c47
commit
510be53521
@ -566,6 +566,10 @@ bool VerilatedVpi::callCbs(vluint32_t reason) VL_MT_UNSAFE_ONE {
|
||||
return VerilatedVpiImp::callCbs(reason);
|
||||
}
|
||||
|
||||
QData VerilatedVpi::cbNextDeadline() VL_MT_UNSAFE_ONE {
|
||||
return VerilatedVpiImp::cbNextDeadline();
|
||||
}
|
||||
|
||||
//======================================================================
|
||||
// VerilatedVpiImp implementation
|
||||
|
||||
|
@ -44,6 +44,9 @@ public:
|
||||
/// Call callbacks of arbitrary types
|
||||
/// Users can call this from their application code
|
||||
static bool callCbs(vluint32_t reason) VL_MT_UNSAFE_ONE;
|
||||
/// Returns time of the next registered VPI callback, or
|
||||
/// ~(0) if none are registered
|
||||
static QData cbNextDeadline() VL_MT_UNSAFE_ONE;
|
||||
/// Self test, for internal use only
|
||||
static void selfTest() VL_MT_UNSAFE_ONE;
|
||||
};
|
||||
|
@ -235,6 +235,7 @@ int main(int argc, char** argv, char** env) {
|
||||
topp->eval();
|
||||
VerilatedVpi::callValueCbs();
|
||||
VerilatedVpi::callTimedCbs();
|
||||
CHECK_RESULT(VerilatedVpi::cbNextDeadline(), main_time+1);
|
||||
topp->clk = !topp->clk;
|
||||
// mon_do();
|
||||
#if VM_TRACE
|
||||
|
Loading…
Reference in New Issue
Block a user