From c673ee53a239604fa90fe45750fff71aec0c4021 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Fri, 25 Oct 2024 01:55:26 +1100 Subject: [PATCH 1/2] Stop including pseudo instructions in output for Go Go really only needs the instruction encodings for actual instructions. Additional pseudo-encodings have since been added to the riscv-opcodes generation, which also include instructions that are aliased to themselves (e.g. AJALPSEUDO/AJALRPSEUDO). Instead of dealing with these complications, stop including pseudo instructions in the output for Go and we'll synthesise pseudo instructions that we need. Add -pseudo which can be used to enable the generation of pseudo-instructions, restoring the previous behaviour. --- parse.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parse.py b/parse.py index 17cd5a2f..8e2f4623 100755 --- a/parse.py +++ b/parse.py @@ -1199,13 +1199,14 @@ def signed(value, width): print(f"Running with args : {sys.argv}") extensions = sys.argv[1:] - for i in ["-c", "-latex", "-chisel", "-sverilog", "-rust", "-go", "-spinalhdl"]: + for i in ["-c", "-chisel", "-go", "-latex", "-pseudo" "-rust", "-spinalhdl", "-sverilog"]: if i in extensions: extensions.remove(i) print(f"Extensions selected : {extensions}") include_pseudo = False - if "-go" in sys.argv[1:]: + + if "-pseudo" in sys.argv[1:]: include_pseudo = True instr_dict = create_inst_dict(extensions, include_pseudo) From 90854e66f8d82580fd428c2a690ebdf20bd85655 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Sat, 26 Oct 2024 00:15:32 +1100 Subject: [PATCH 2/2] blacken --- parse.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/parse.py b/parse.py index 8e2f4623..72af94d0 100755 --- a/parse.py +++ b/parse.py @@ -1199,7 +1199,16 @@ def signed(value, width): print(f"Running with args : {sys.argv}") extensions = sys.argv[1:] - for i in ["-c", "-chisel", "-go", "-latex", "-pseudo" "-rust", "-spinalhdl", "-sverilog"]: + for i in [ + "-c", + "-chisel", + "-go", + "-latex", + "-pseudo", + "-rust", + "-spinalhdl", + "-sverilog", + ]: if i in extensions: extensions.remove(i) print(f"Extensions selected : {extensions}")