Johnlon/spam-1

Can I use your UART with verilator?

Opened this issue · 6 comments

Hi John.
Thank you for your amazing repo!

I don't have access to an FPGA and am trying to build something like spam-1 on verilator. I'm starting with the UART and am trying to use your implementation of it.

The thing is that verilator is run on c++ and can't possibly pass data to the UART module in a 9600 bits/sec speed. Do I NEED to choose a lower speed to be able to do this or am I doing something wrong?

Spam-1 is a breadboard build btw and I have no experience of fpga.

I use verilog as it allowed me to simulate all the 7400 components during the build.

The uart model I wrote for the ftdi device was useful for my Sims as I can interact with it over a file.

I don't know how useful it would be for your use case. I don't consider baud rates when thinking about this stuff because like I say the "terminal" in my case are files not a serial cable.

Perhaps some more info.

Perhaps you have some code to show and discuss?

Also since I use Icarus verilog and not verilator there will be mods needed.

It would be good if these could be added to my model using #defines rather than creating an disconnected model if possible.

I can't exactly recall why I don't use verilator - I'm sure there was a reason. Icarus verilog isn't super fast tho it does allow me to run with realistic propagation delays which has helped spot errors.