Skip to content

Commit

Permalink
RISC-V: Expose sew and lmul to mp_seq.py command line
Browse files Browse the repository at this point in the history
Signed-Off-By: Patrick O'Neill <[email protected]>
  • Loading branch information
patrick-rivos committed Nov 16, 2024
1 parent b7c04f3 commit 86b26a5
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions targets/generic/tools/mp_seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ def _generic_policy_wrapper(all_arguments: Tuple[List[InstructionType], str,
extra_arguments['dependency_distance'] = kwargs['dependency_distance']
extra_arguments['force_switch'] = kwargs['force_switch']
extra_arguments['endless'] = kwargs['endless']
extra_arguments["lmul"] = kwargs["lmul"]
extra_arguments["sew"] = kwargs["sew"]

if wrapper.outputname(outputfile) != outputfile:
print_error(
Expand Down Expand Up @@ -205,6 +207,9 @@ def main():
groupname = "SEQ arguments"
cmdline.add_group(groupname,
"Command arguments related to Sequence generation")
riscv_groupname = "RISC-V specific options"
cmdline.add_group(riscv_groupname,
"Command arguments only valid for the RISC-V target")

cmdline.add_option("seq-output-dir",
"D",
Expand All @@ -214,6 +219,27 @@ def main():
opt_type=existing_dir,
required=True)


cmdline.add_option(
"lmul",
"lmul",
1,
"lmul for vector insns (only valid for RISCV backend)",
group=riscv_groupname,
opt_type=int_type(1, 8),
required=False,
)

cmdline.add_option(
"sew",
"sew",
32,
"Selected element width for vector insns (only valid for RISCV backend)",
group=riscv_groupname,
opt_type=int_type(8, 64),
required=False,
)

cmdline.add_option(
"instruction-slots",
"is",
Expand Down

0 comments on commit 86b26a5

Please sign in to comment.