not daft "<<" or ">>" operator-overload
GHDL ?= ghdl
GHDLFLAGS=--std=08 -frelaxed
CFLAGS=-O3 -Wall
+CXXFLAGS=-g -g
GHDLSYNTH ?= ghdl.so
YOSYS ?= yosys
# Need to investigate why yosys is hitting verilator warnings, and eventually turn on -Wall
# --top-module toplevel
microwatt-verilator: microwatt.v verilator/microwatt-verilator.cpp verilator/uart-verilator.c
- verilator -O3 -CFLAGS "-DCLK_FREQUENCY=$(CLK_FREQUENCY)" \
+ verilator -O3 -CFLAGS "-DCLK_FREQUENCY=$(CLK_FREQUENCY) -I../verilator" \
--assert \
--cc microwatt.v \
--exe verilator/microwatt-verilator.cpp verilator/uart-verilator.c \
#include "Vmicrowatt.h"
#include "verilated.h"
#include "verilated_vcd_c.h"
-#include "uart-verilated.h"
+#include "uart-verilator.h"
/*
* Current simulation time
os.open(fname);
os << main_time; // user code must save the timestamp, etc
- os << *uart;
+ os.write(uart, sizeof(*uart));
os << *topp;
}
struct uart_tx_state uart;
os.open(fname);
os >> main_time;
- os >> uart;
+ os.read(&uart, sizeof(uart));
os >> *topp;
uart_restore(&uart);
}