ysyx-workbench/npc/csrc_nvboard/main.cpp
tracer-ysyx b88d57976a
> build_npc_VSegHandler_nvboard
ysyx_22040000 李心杨
 Linux calcite 6.1.69 #1-NixOS SMP PREEMPT_DYNAMIC Wed Dec 20 16:00:29 UTC 2023 x86_64 GNU/Linux
  15:02:16  up 2 days 14:03,  2 users,  load average: 1.59, 1.65, 1.57
2024-01-10 15:02:16 +08:00

25 lines
No EOL
577 B
C++

#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <verilated.h>
#include <verilated_vcd_c.h>
#include <nvboard.h>
#include <VSegHandler.h>
const int MAX_SIM_TIME=100;
void nvboard_bind_all_pins(VSegHandler* top);
int main(int argc, char **argv, char **env) {
VSegHandler *top = new VSegHandler;
nvboard_bind_all_pins(top);
nvboard_init();
while (true) {
nvboard_update();
top->eval();
printf("%d\n", top->clock);
// printf("%d, %d, %d", top->io_segs_0, top->io_segs_1, top->io_segs_2);
}
delete top;
}