From fbe3ab39675d338eb6d5388b7deacf98a3a8ae2d Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Mon, 2 Oct 2023 11:15:34 -0600 Subject: rtl/core: implement ldrex/strex decode --- rtl/core/decode/isa.sv | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'rtl/core/decode/isa.sv') diff --git a/rtl/core/decode/isa.sv b/rtl/core/decode/isa.sv index 2ad5b40..6784eca 100644 --- a/rtl/core/decode/isa.sv +++ b/rtl/core/decode/isa.sv @@ -162,7 +162,18 @@ `define FIELD_LDST_MULT_RN [19:16] `define FIELD_LDST_MULT_LIST [15:0] -// Instrucciones atómicas de intercambio registro-memoria +// Instrucciones para operaciones atómicas optimistas (monitor exclusivo) + +`define INSN_LDREX 28'b0001100_1_????_????_1111_1001_1111 +`define INSN_STREX 28'b0001100_0_????_????_1111_1001_???? +`define GROUP_LDST_EX `INSN_LDREX, `INSN_STREX + +`define FIELD_LDST_EX_LD [20] +`define FIELD_LDST_EX_RN [19:16] +`define FIELD_LDST_EX_RD [15:12] +`define FIELD_LDST_EX_R_OK [3:0] + +// Instrucciones atómicas de intercambio registro-memoria (deprecadas) `define INSN_SWP 28'b00010000_????_????_0000_1001_???? `define INSN_SWPB 28'b00010100_????_????_0000_1001_???? -- cgit v1.2.3