Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions verif/sim/cva6.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def parse_iss_yaml(iss, iss_yaml, isa, target, setting_dir, debug_cmd, priv, spi
Returns:
cmd : ISS run command
"""


Comment thread
sjo99-kr marked this conversation as resolved.
Outdated
logging.info("Processing ISS setup file: %s" % iss_yaml)
yaml_data = read_yaml(iss_yaml)
# Search for matched ISS
Expand All @@ -150,6 +152,15 @@ def parse_iss_yaml(iss, iss_yaml, isa, target, setting_dir, debug_cmd, priv, spi
if m: cmd = re.sub(r"\<xlen\>", m.group('xlen'), cmd)
if iss == "ovpsim":
cmd = re.sub(r"\<cfg_path\>", setting_dir, cmd)
elif iss == "spike":
spike_isa = isa
if spike_extension_list !=['']:
Comment thread
sjo99-kr marked this conversation as resolved.
Outdated
for i in spike_extension_list:
if i!= "":
Comment thread
sjo99-kr marked this conversation as resolved.
Outdated
spike_isa += (f"_{i}")
cmd = re.sub(r"\<variant\>", spike_isa, cmd)
cmd = re.sub(r"\<priv\>", priv, cmd)
cmd = re.sub(r"\<target\>", target, cmd)
elif iss == "whisper":
if m:
# TODO: Support u/s mode
Expand Down Expand Up @@ -793,6 +804,10 @@ def parse_args(cwd):
help="Choose additional z, s, x extensions")
parser.add_argument("--spike_params", type=str, default="",
help="Spike command line parameters, run spike --help and spike --print-params to see more")
parser.add_argument("--spike_extension", type=str, default="",
help="Additional ISA extensions enabled only for Spike simulation. "
"Use this for extensions not yet supported by the GCC toolchain (e.g., svadu).")

Comment thread
sjo99-kr marked this conversation as resolved.
Outdated
rsg = parser.add_argument_group('Random seeds',
'To control random seeds, use at most one '
'of the --start_seed, --seed or --seed_yaml '
Expand Down Expand Up @@ -967,6 +982,9 @@ def load_config(args, cwd):
isa_extension_list.append("zicsr")
isa_extension_list.append("zifencei")

global spike_extension_list
spike_extension_list = args.spike_extension.split(",")

args.spike_params = get_full_spike_param_args(args.spike_params) if args.spike_params else ""


Expand Down
Loading