Skip to content

Commit

Permalink
fix prefix overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Mar 19, 2024
1 parent 00d11c1 commit b42577f
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions examples/cfg/xcorev/XCoreVAlu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extensions:
vendor: true
passes:
per_model:
XCoreVMac:
XCoreVAlu:
overrides:
convert_models:
prefix: "SEAL5"
prefix: "SEAL5_"
4 changes: 2 additions & 2 deletions examples/cfg/xcorev/XCoreVBitmanip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extensions:
vendor: true
passes:
per_model:
XCoreVMac:
XCoreVBitmanip:
overrides:
convert_models:
prefix: "SEAL5"
prefix: "SEAL5_"
4 changes: 2 additions & 2 deletions examples/cfg/xcorev/XCoreVBranchImmediate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extensions:
vendor: true
passes:
per_model:
XCoreVMac:
XCoreVBranchImmediate:
overrides:
convert_models:
prefix: "SEAL5"
prefix: "SEAL5_"
2 changes: 1 addition & 1 deletion examples/cfg/xcorev/XCoreVMac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ passes:
XCoreVMac:
overrides:
convert_models:
prefix: "SEAL5"
prefix: "SEAL5_"
4 changes: 2 additions & 2 deletions examples/cfg/xcorev/XCoreVMem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extensions:
vendor: true
passes:
per_model:
XCoreVMac:
XCoreVMem:
overrides:
convert_models:
prefix: "SEAL5"
prefix: "SEAL5_"
4 changes: 2 additions & 2 deletions examples/cfg/xcorev/XCoreVSimd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extensions:
vendor: true
passes:
per_model:
XCoreVMac:
XCoreVSimd:
overrides:
convert_models:
prefix: "SEAL5"
prefix: "SEAL5_"
5 changes: 3 additions & 2 deletions seal5/transform/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ def main():
logger.info("replacing set %s", set_name)
for enc, instr_def in set_def.instructions.items():
if args.prefix:
instr_def.name = f"{args.prefix.upper()}_{instr_def.name}"
instr_def.mnemonic = f"{args.prefix.lower()}.{instr_def.mnemonic}"
instr_def.name = f"{args.prefix.upper()}{instr_def.name}"
prefix_ = args.prefix.lower().replace("_", ".")
instr_def.mnemonic = f"{prefix_}.{instr_def.mnemonic}"
set_def.instructions[enc] = seal5_model.Seal5Instruction(
instr_def.name,
instr_def.attributes,
Expand Down

0 comments on commit b42577f

Please sign in to comment.