Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions verilated/src/verilated_shim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ verilated_fatal_on_vpi_error() {
return Verilated::fatalOnVpiError() ? 1 : 0;
}

#if VERILATOR_VERSION_MAJOR == 4 && VERILATOR_VERSION_MINOR >= 38
#if VERILATOR_VERSION_MAJOR > 4 || (VERILATOR_VERSION_MAJOR == 4 && VERILATOR_VERSION_MINOR >= 38)
typedef void (*voidp_cb)(void*); // Callback type for below

/// Callbacks to run on global flush
Expand Down Expand Up @@ -121,7 +121,7 @@ void
verilator_run_exit_callbacks() {
Verilated::runExitCallbacks();
}
#else // !(VERILATOR_VERSION_MAJOR == 4 && VERILATOR_VERSION_MINOR >= 38)
#else // !(VERILATOR_VERSION_MAJOR > 4 || (VERILATOR_VERSION_MAJOR == 4 && VERILATOR_VERSION_MINOR >= 38))
/// Flush callback for VCD waves
void
verilated_flush_cb(VerilatedVoidCb cb) {
Expand All @@ -132,7 +132,7 @@ void
verilated_flush_call() {
Verilated::flushCall();
}
#endif // VERILATOR_VERSION_MAJOR == 4 && VERILATOR_VERSION_MINOR >= 38
#endif // VERILATOR_VERSION_MAJOR > 4 || (VERILATOR_VERSION_MAJOR == 4 && VERILATOR_VERSION_MINOR >= 38)

/// Record command line arguments, for retrieval by $test$plusargs/$value$plusargs
void
Expand Down
8 changes: 8 additions & 0 deletions verilated/src/verilatedvcdc_shim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,19 @@ verilatedvcdc_open_next(VerilatedVcdC* vcd, int inc_filename) {
vcd->openNext(inc_filename ? true : false);
}

#if VERILATOR_VERSION_MAJOR > 4 || (VERILATOR_VERSION_MAJOR == 4 && VERILATOR_VERSION_MINOR >= 226)
/// Set size in bytes after which new file should be created.
void
verilatedvcdc_rollover_size(VerilatedVcdC* vcd, size_t size) {
vcd->rolloverSize(size);
}
#else // !(VERILATOR_VERSION_MAJOR > 4 || (VERILATOR_VERSION_MAJOR == 4 && VERILATOR_VERSION_MINOR >= 226))
/// Set size in megabytes after which new file should be created
void
verilatedvcdc_rollover_mb(VerilatedVcdC* vcd, size_t rolloverMB) {
vcd->rolloverMB(rolloverMB);
}
#endif // VERILATOR_VERSION_MAJOR > 4 || (VERILATOR_VERSION_MAJOR == 4 && VERILATOR_VERSION_MINOR >= 226)

/// Close dump
void
Expand Down