[Libre-soc-dev] Running the libre-soc CPU under cxxsim

Cesar Strauss cestrauss at gmail.com
Tue Sep 22 12:26:53 BST 2020


Em 22/09/2020 07:26, Luke Kenneth Casson Leighton escreveu:
>> Per discussion above, found a way to conditionally switch to cxxsim,
>> without losing backwards compatibility with earlier nMigen git versions.
> 
> fantastic.  i wonder, perhaps that can go into nmutils for now?

Sure.

Something like:

    from nmutil.simulator_alternative import Simulator

    sim = Simulator(module, ...)  # select engine from environment

Also:

    from nmutil.simulator_alternative import is_pysim, is_cxxsim,
    engine_alternative

    # account for differences among engines
    if is_pysim():
      ...
    elif is_cxxsim():
      ...

    engine = engine_alternative()  # engine name from environment

Then:

    $ export NMIGEN_SIM_MODE=...  # default is pysim
    $ python ...

Cesar



More information about the Libre-soc-dev mailing list