[Libre-soc-dev] Running the libre-soc CPU under cxxsim
Cesar Strauss
cestrauss at gmail.com
Sat Sep 19 22:41:01 BST 2020
Em 08/09/2020 05:09, Luke Kenneth Casson Leighton escreveu:
> i've added this:
>
> +if True:
> + from nmigen.back.pysim import Simulator, Delay, Settle
> +else:
> + from nmigen.sim.cxxsim import Simulator, Delay, Settle
As the latest git version, this no longer works.
Replace the two cases above with, simply:
from nmigen.sim import Simulator, Delay, Settle
Note that "nmigen.sim.pysim" and "nmigen.sim.cxxsim" were never present
in a released nMigen version, so the change in API, in the middle of a
development cycle, is warranted.
> really this should be an environment variable
>
> import os
> sim = Simulator(m, engine=os.environ.get('NMIGEN_SIM_MODE"))
>
This is exactly the way that the simulator API now works.
On the main branch, engine="pysim" is accepted.
On the cxxsim branch, both engine="pysim" and engine="cxxsim" are accepted.
It is expected that the this version of the simulator API will keep
stable until the next release.
Cesar
More information about the Libre-soc-dev
mailing list