leonardt / fault

A Python package for testing hardware (part of the magma ecosystem)
BSD 3-Clause "New" or "Revised" License
41 stars 13 forks source link

Allow more control of env and debug printing in the system-verilog target #138

Closed sgherbst closed 5 years ago

sgherbst commented 5 years ago

Added a few features to address issues encountered in a specific CAD system: 1) The SystemVerilogTarget now has an optional "sim_env" argument that allows the user to specify a custom environment for running the simulation command. This is needed for example if CAD tools are using scripts that except "python" to point to a Python2 install, but the user is running fault from a Python3 conda env. 2) The SystemVerilogTarget now writes STDERR to the logging.INFO level in addition to STDOUT. This is helpful for debugging because ncsim writes certain license errors to STDERR, not STDOUT. 3) Added remove_conda() to fault/util.py. This utility function removes path entries (if any) that start with the CONDA_PREFIX. 4) Added a new test "test_env_mod" to test out these features. It passes within my specific CAD system.