mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-22 04:47:25 -04:00
Remove --simulator_yaml argument from scripts
This is always fixed, so let's just grab the file from the code that knows it needs it.
This commit is contained in:
parent
b504995805
commit
f1199a38cd
4 changed files with 11 additions and 18 deletions
|
@ -411,7 +411,7 @@ $(OUT-DIR)rtl_sim/.rtl.tb_compile.stamp: \
|
|||
--o=$(OUT-DIR) \
|
||||
--steps=compile \
|
||||
${COMMON_OPTS} \
|
||||
--simulator="${SIMULATOR}" --simulator_yaml=yaml/rtl_simulation.yaml \
|
||||
--simulator="${SIMULATOR}" \
|
||||
$(cov-arg) $(wave-arg) $(cosim-arg) \
|
||||
--cmp_opts="${COMPILE_OPTS}"
|
||||
$(call dump-vars,$(OUT-DIR)rtl_sim/.rtl.tb_compile.vars.mk,comp,$(tb-compile-var-deps))
|
||||
|
@ -450,7 +450,6 @@ $(rtl-sim-logs): \
|
|||
$(verb)mkdir -p $(@D)
|
||||
$(verb)./run_rtl.py \
|
||||
--simulator $(SIMULATOR) \
|
||||
--simulator_yaml yaml/rtl_simulation.yaml \
|
||||
$(cov-arg) $(wave-arg) \
|
||||
--start-seed $(SEED) \
|
||||
--sim-opts="+signature_addr=${SIGNATURE_ADDR} ${SIM_OPTS}" \
|
||||
|
|
|
@ -86,7 +86,6 @@ def get_test_sim_cmd(base_cmd, test, idx, seed, sim_dir, bin_dir, lsf_cmd):
|
|||
def main() -> int:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--simulator', required=True)
|
||||
parser.add_argument("--simulator_yaml", required=True)
|
||||
parser.add_argument("--en_cov", action='store_true')
|
||||
parser.add_argument("--en_wave", action='store_true')
|
||||
parser.add_argument('--start-seed', type=int, required=True)
|
||||
|
@ -116,8 +115,7 @@ def main() -> int:
|
|||
'cov_opts': args.en_cov,
|
||||
'wave_opts': args.en_wave
|
||||
}
|
||||
_, base_cmd = get_simulator_cmd(args.simulator,
|
||||
args.simulator_yaml, enables)
|
||||
_, base_cmd = get_simulator_cmd(args.simulator, enables)
|
||||
|
||||
# Specialize base_cmd with the right directories and simulator options
|
||||
sim_cmd = subst_vars(base_cmd,
|
||||
|
|
|
@ -86,8 +86,11 @@ def subst_cmd(cmd, enable_dict, opts_dict, env_vars):
|
|||
return subst_env_vars(cmd, env_vars).replace('\n', ' ')
|
||||
|
||||
|
||||
def get_yaml_for_simulator(simulator, yaml_path):
|
||||
'''Read yaml at yaml_path and find entry for simulator'''
|
||||
def get_yaml_for_simulator(simulator):
|
||||
'''Get the entry for the simulator in RTL simulation yaml'''
|
||||
yaml_dir = os.path.normpath(os.path.join(_THIS_DIR, '../yaml'))
|
||||
yaml_path = os.path.join(yaml_dir, 'rtl_simulation.yaml')
|
||||
|
||||
logging.info("Processing simulator setup file : %s" % yaml_path)
|
||||
for entry in read_yaml(yaml_path):
|
||||
if entry.get('tool') == simulator:
|
||||
|
@ -96,11 +99,10 @@ def get_yaml_for_simulator(simulator, yaml_path):
|
|||
raise RuntimeError("Cannot find RTL simulator {}".format(simulator))
|
||||
|
||||
|
||||
def get_simulator_cmd(simulator, yaml_path, enables):
|
||||
def get_simulator_cmd(simulator, enables):
|
||||
'''Get compile and run commands for the testbench
|
||||
|
||||
simulator is the name of the simulator to use. yaml_path is the path to a
|
||||
yaml file describing various command line options. enables is a dictionary
|
||||
simulator is the name of the simulator to use. enables is a dictionary
|
||||
keyed by option names with boolean values: true if the option is enabled.
|
||||
|
||||
Returns (compile_cmds, sim_cmd), which are the simulator commands to
|
||||
|
@ -108,7 +110,7 @@ def get_simulator_cmd(simulator, yaml_path, enables):
|
|||
strings (multiple commands); sim_cmd is a single string.
|
||||
|
||||
'''
|
||||
entry = get_yaml_for_simulator(simulator, yaml_path)
|
||||
entry = get_yaml_for_simulator(simulator)
|
||||
env_vars = entry.get('env_var', '')
|
||||
|
||||
return ([subst_cmd(arg, enables, entry['compile'], env_vars)
|
||||
|
|
|
@ -176,11 +176,6 @@ def main():
|
|||
help="Output directory name")
|
||||
parser.add_argument("--simulator", type=str, default="vcs",
|
||||
help="RTL simulator to use (default: vcs)")
|
||||
parser.add_argument("--simulator_yaml",
|
||||
help="RTL simulator setting YAML",
|
||||
default=os.path.join(_CORE_IBEX,
|
||||
'yaml',
|
||||
'rtl_simulation.yaml'))
|
||||
parser.add_argument("-v", "--verbose", dest="verbose", action="store_true",
|
||||
help="Verbose logging")
|
||||
parser.add_argument("--cmp_opts", type=str, default="",
|
||||
|
@ -223,8 +218,7 @@ def main():
|
|||
'wave_opts': args.en_wave,
|
||||
'cosim_opts': args.en_cosim
|
||||
}
|
||||
compile_cmds, sim_cmd = get_simulator_cmd(args.simulator,
|
||||
args.simulator_yaml, enables)
|
||||
compile_cmds, sim_cmd = get_simulator_cmd(args.simulator, enables)
|
||||
|
||||
rtl_compile(compile_cmds, output_dir, args.lsf_cmd, args.cmp_opts)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue