chiptools.wrappers.simulators.isim module

class chiptools.wrappers.simulators.isim.Isim(project, user_paths)[source]

Bases: chiptools.wrappers.simulator.Simulator

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.

compile(file_object, cwd=None)[source]

Compile the supplied file_object into the current working library.

executables: List[str] = ['fuse', 'vlogcomp', 'vhpcomp']
library_exists(libname, workdir)[source]

Return True if the given libname exists in the workdir.

name = 'isim'
set_library_path(library, path, cwd=None)[source]
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.

sim_exe_name = 'fuse_sim'
sim_ini_name = 'xilinxsim.ini'
sim_project_name = 'isim_project.prj'
sim_tcl_name = 'isim.tcl'
simulate(library, entity, gui=False, generics={}, includes={}, args=[], duration=None)[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.

write_includes()[source]

Write the includes dictionary to the xilinxsim.ini file in the simulation directory, which is required by vlogcomp, vhpcomp and fuse to locate existing compiled libraries.