sim: represent time internally as 1ps units
authormodwizcode <irides@irides.network>
Mon, 13 Dec 2021 03:43:20 +0000 (21:43 -0600)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 31 Dec 2021 20:29:07 +0000 (20:29 +0000)
commitd97e74cbf4870c299dca80c7f214187460ea1068
tree32f1851f01a51376fa55c7c61208ffea62c43249
parent2ad32b72791fd9792a68e6b9cda847949d7b75d8
sim: represent time internally as 1ps units

Using floats to represent simulation time internally isn't ideal
instead use 1ps internal units while continuing to use a floating
point based interface for compatibility.

Fixes #535.
nmigen/sim/_pyclock.py
nmigen/sim/_pycoro.py
nmigen/sim/core.py
nmigen/sim/pysim.py
tests/test_sim.py