4 #include "verilated_vcd_c.h"
7 * Current simulation time
8 * This is a 64-bit integer to reduce wrap over issues and
9 * allow modulus. You can also use a double, if you wish.
11 vluint64_t main_time
= 0;
14 * Called by $time in Verilog
15 * converts to double, to match
18 double sc_time_stamp(void)
33 tfp
->dump((double) main_time
);
41 tfp
->dump((double) main_time
);
46 void uart_tx(unsigned char tx
);
47 unsigned char uart_rx(void);
49 int main(int argc
, char **argv
)
51 Verilated::commandArgs(argc
, argv
);
53 // init top verilog instance
58 Verilated::traceEverOn(true);
59 tfp
= new VerilatedVcdC
;
61 tfp
->open("microwatt-verilator.vcd");
66 for (unsigned long i
= 0; i
< 5; i
++)
70 while(!Verilated::gotFinish()) {
74 top
->rx_i
= uart_rx();