2024-01-01 06:41:31 +00:00
|
|
|
#include <cstdlib>
|
|
|
|
#include <cassert>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <verilated.h>
|
|
|
|
#include <verilated_vcd_c.h>
|
|
|
|
#include <nvboard.h>
|
2024-01-05 15:50:26 +00:00
|
|
|
#include <VSwitch.h>
|
2024-01-01 06:41:31 +00:00
|
|
|
|
|
|
|
const int MAX_SIM_TIME=100;
|
|
|
|
|
2024-01-05 15:50:26 +00:00
|
|
|
void nvboard_bind_all_pins(VSwitch* top);
|
2024-01-01 06:41:31 +00:00
|
|
|
|
|
|
|
int main(int argc, char **argv, char **env) {
|
2024-01-05 15:50:26 +00:00
|
|
|
VSwitch *top = new VSwitch;
|
2024-01-01 06:41:31 +00:00
|
|
|
|
|
|
|
nvboard_bind_all_pins(top);
|
|
|
|
nvboard_init();
|
|
|
|
while (true) {
|
|
|
|
nvboard_update();
|
|
|
|
top->eval();
|
|
|
|
}
|
|
|
|
delete top;
|
|
|
|
}
|