> build_flow_VFlow
ysyx_22040000 李心杨 Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 1 12:35:11 UTC 2024 x86_64 GNU/Linux 15:28:19 up 3 days 6:18, 2 users, load average: 3.01, 2.00, 1.71
This commit is contained in:
parent
10f946e359
commit
0a0c9d8fcb
1 changed files with 20 additions and 0 deletions
|
@ -3,10 +3,30 @@
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <verilated.h>
|
#include <verilated.h>
|
||||||
#include <verilated_vcd_c.h>
|
#include <verilated_vcd_c.h>
|
||||||
|
#include <VFlow.h>
|
||||||
|
#define MAX_SIM_TIME 100
|
||||||
|
|
||||||
int main(int argc, char **argv, char **env) {
|
int main(int argc, char **argv, char **env) {
|
||||||
int sim_time = 0;
|
int sim_time = 0;
|
||||||
Verilated::commandArgs(argc, argv);
|
Verilated::commandArgs(argc, argv);
|
||||||
|
|
||||||
|
VFlow *top = new VFlow;
|
||||||
|
|
||||||
|
Verilated::traceEverOn(true);
|
||||||
|
VerilatedVcdC *m_trace = new VerilatedVcdC;
|
||||||
|
#ifdef VERILATOR_TRACE
|
||||||
|
top->trace(m_trace, 5);
|
||||||
|
m_trace->open("waveform.vcd");
|
||||||
|
#endif
|
||||||
|
for (sim_time = 0; sim_time < MAX_SIM_TIME; sim_time++) {
|
||||||
|
top->eval();
|
||||||
|
#ifdef VERILATOR_TRACE
|
||||||
|
m_trace->dump(sim_time);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#ifdef VERILATOR_TRACE
|
||||||
|
m_trace->close();
|
||||||
|
#endif
|
||||||
|
delete top;
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue