chiptools.wrappers.simulator module
- class chiptools.wrappers.simulator.Simulator(project, executables, user_paths)[source]
Bases:
chiptools.wrappers.toolchains.ToolchainBase
The Simulator class provides a base class for all simulator tool wrapper implementations. Common functions used by all simulator tool wrappers are implemented in this class.
- add_library(library)[source]
Create a new source file library for compiling design files into. For example on ModelSim this would invoke the vlib command with the supplied library name.
- set_working_library(library, cwd=None)[source]
Set the current working library where source files are to be compiled to when using the ‘compile’ method.
- simulate(library, entity, **kwargs)[source]
Invoke the simulator and target the given entity in the given library. If the optional argument gui is set to False the simulator will execute as a console application (where supported) otherwise it will run as a GUI. This function is blocking and will only continue when the simulator terminates. The optional argument generics provides a dictionary of generic name/generic value key, value pairs that are passed to the simulator as a command line argument. This allows you to set generics present on the entity being simulated. The optional argument do can be used to supply a string argument to be interpreted by the simulator as a script to execute after loading.