1package xiangshan.backend.decode.isa.predecode 2 3import chisel3.util._ 4import xiangshan.frontend.BrType 5 6object PreDecodeInst { 7 def C_JAL = BitPat("b????????????????_?01_?_??_???_??_???_01") //c.jal & c.j //C_ADDIW? 8 def C_JALR = BitPat("b????????????????_100_?_??_???_00_000_10") //c.jalr & c.jr 9 def C_BRANCH = BitPat("b????????????????_11?_?_??_???_??_???_01") 10 def JAL = BitPat("b????????????????_???_?????_1101111") 11 def JALR = BitPat("b????????????????_000_?????_1100111") 12 def BRANCH = BitPat("b????????????????_???_?????_1100011") 13 14 15 val brTable = Array( 16 C_JAL -> List(BrType.jal), 17 C_JALR -> List(BrType.jalr), 18 C_BRANCH -> List(BrType.branch), 19 JAL -> List(BrType.jal), 20 JALR -> List(BrType.jalr), 21 BRANCH -> List(BrType.branch) 22 ) 23} 24