From 3d298ca442e709b89fc7358177f0d3971de9c716 Mon Sep 17 00:00:00 2001 From: tracer-ysyx Date: Wed, 13 Mar 2024 11:56:57 +0800 Subject: [PATCH] =?UTF-8?q?>=20build=5Fflow=5FVFlow=20=20ysyx=5F22040000?= =?UTF-8?q?=20=E6=9D=8E=E5=BF=83=E6=9D=A8=20=20Linux=20calcite=206.6.19=20?= =?UTF-8?q?#1-NixOS=20SMP=20PREEMPT=5FDYNAMIC=20Fri=20Mar=20=201=2012:35:1?= =?UTF-8?q?1=20UTC=202024=20x86=5F64=20GNU/Linux=20=20=2011:56:57=20=20up?= =?UTF-8?q?=20=20=201:33,=20=202=20users,=20=20load=20average:=200.99,=200?= =?UTF-8?q?.78,=200.86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- npc/csrc/Flow/main.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/npc/csrc/Flow/main.cpp b/npc/csrc/Flow/main.cpp index 87441c5..8124988 100644 --- a/npc/csrc/Flow/main.cpp +++ b/npc/csrc/Flow/main.cpp @@ -19,12 +19,14 @@ int main(int argc, char **argv, char **env) { top->trace(m_trace, 5); m_trace->open("waveform.vcd"); #endif - top->reset = 1; - top->clock = 1; - top->eval(); - top->clock = 0; - top->reset = 0; - top->eval(); + for (sim_time = 0; sim_time < 10; sim_time++) { + top->eval(); + top->clock = !top->clock; + top->reset = 1; +#ifdef VERILATOR_TRACE + m_trace->dump(sim_time); +#endif + } for (sim_time = 0; sim_time < MAX_SIM_TIME; sim_time++) { top->eval(); top->clock = !top->clock;