diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-01-21 06:23:46 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-02-20 11:11:17 -0600 |
| commit | f3b18ead59ae02f95dabbf0a1dea40873a816975 (patch) | |
| tree | 8979e50f2a37f66a4cd27e937b480efe60d72cf7 /rtl/core/core_decode_ldst_single.sv | |
| parent | a8bc5a353ea997f73209b39377ee15a73e471237 (diff) | |
rtl: refactor filenames and directory hierarchy
Diffstat (limited to 'rtl/core/core_decode_ldst_single.sv')
| -rw-r--r-- | rtl/core/core_decode_ldst_single.sv | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/rtl/core/core_decode_ldst_single.sv b/rtl/core/core_decode_ldst_single.sv new file mode 100644 index 0000000..0f47a30 --- /dev/null +++ b/rtl/core/core_decode_ldst_single.sv @@ -0,0 +1,31 @@ +`include "core/isa.sv" +`include "core/uarch.sv" + +module core_decode_ldst_single +( + input word insn, + + output ldst_decode decode, + output logic snd_is_imm +); + + logic p, w; + + assign decode.rn = insn `FIELD_LDST_SINGLE_RN; + assign decode.rd = insn `FIELD_LDST_SINGLE_RD; + assign decode.size = insn `FIELD_LDST_SINGLE_B ? LDST_BYTE : LDST_WORD; + assign decode.load = insn `FIELD_LDST_LD; + assign decode.increment = insn `FIELD_LDST_SINGLE_U; + assign decode.writeback = !p || w; + assign decode.exclusive = 0; + assign decode.sign_extend = 0; + assign decode.pre_indexed = p; + assign decode.unprivileged = !p && w; + assign decode.user_regs = 0; + assign decode.regs = 16'b0; + + assign p = insn `FIELD_LDST_SINGLE_P; + assign w = insn `FIELD_LDST_SINGLE_W; + assign snd_is_imm = !insn `FIELD_LDST_SINGLE_REG; + +endmodule |
