Skip to content

Commit 3640549

Browse files
committed
feat: add fence inst
1 parent 9773e17 commit 3640549

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

rtl/tc_l2/src/main/scala/core/inst/InstDecoderStage.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ object InstDecoderStage {
111111
CSRRSI -> List(wtRegTrue, iInstType, nopAluOperNumType, csrRSIType, branchFalse, rdMemFalse, wtMemFalse, aluWtType),
112112
CSRRCI -> List(wtRegTrue, iInstType, nopAluOperNumType, csrRCIType, branchFalse, rdMemFalse, wtMemFalse, aluWtType),
113113
// system inst
114-
ECALL -> List(wtRegFalse, nopInstType, nopAluOperNumType, sysECALLType, branchFalse, rdMemFalse, wtMemFalse, nopWtType),
115-
MRET -> List(wtRegFalse, nopInstType, nopAluOperNumType, sysMRETType, branchFalse, rdMemFalse, wtMemFalse, nopWtType),
114+
ECALL -> List(wtRegFalse, nopInstType, nopAluOperNumType, sysECALLType, branchFalse, rdMemFalse, wtMemFalse, nopWtType),
115+
MRET -> List(wtRegFalse, nopInstType, nopAluOperNumType, sysMRETType, branchFalse, rdMemFalse, wtMemFalse, nopWtType),
116+
FENCE -> List(wtRegFalse, nopInstType, nopAluOperNumType, aluNopType, branchFalse, rdMemFalse, wtMemFalse, nopWtType),
117+
FENCE_I -> List(wtRegFalse, nopInstType, nopAluOperNumType, aluNopType, branchFalse, rdMemFalse, wtMemFalse, nopWtType),
116118
// custom inst
117119
CUST -> List(wtRegFalse, nopInstType, nopAluOperNumType, custInstType, branchFalse, rdMemFalse, wtMemFalse, nopWtType)
118120
)

rtl/tc_l2/src/main/scala/core/inst/InstRegexPattern.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ object InstRegexPattern {
101101
def MRET = BitPat("b00110000001000000000000001110011")
102102
def WFI = BitPat("b00010000010100000000000001110011")
103103
def SFENCE_VMA = BitPat("b0001001??????????000000001110011")
104-
104+
def FENCE = BitPat("b0000????????00000000000000001111")
105+
def FENCE_I = BitPat("b00000000000000000001000000001111")
105106
// custom inst such as 0x7B
106107
def CUST = BitPat("b0000000??????????000?????1111011")
107108
}

0 commit comments

Comments
 (0)