sgherbst / anasymod

A framework for FPGA emulation of mixed-signal systems
BSD 3-Clause "New" or "Revised" License
33 stars 9 forks source link

Consider changing the default timescale #8

Open sgherbst opened 4 years ago

sgherbst commented 4 years ago

It looks like the default timescale (for Icarus at least) is 1s/1s. This can lead to some unusual results due to very low time resolution (e.g., a failure in the function test when trying to wait until a bit after a clock edge). I suggest we change to a default with higher resolution; two that I have commonly used are:

Unfortunately this implementation of this feature would be simulator dependent. For example, with Icarus Verilog one needs to create a command file and then add a default timescale command (described here)

Thoughts on what a good default timescale would be and whether this would cause any issues?