Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit c82d51f

Browse files
committed
Added gorci to unsgn_rs1 in coverage.py
Added conditions to extract bs and rnum fields in rvopcodesdecoder.py Removed zext.h from internaldecoder.py
1 parent 9ff4563 commit c82d51f

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

riscv_isac/coverage.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
'aes32esmi', 'aes32esi', 'aes32dsmi', 'aes32dsi','bclr','bext','binv',\
3838
'bset','zext.h','sext.h','sext.b','minu','maxu','orc.b','add.uw','sh1add.uw',\
3939
'sh2add.uw','sh3add.uw','slli.uw','clz','clzw','ctz','ctzw','cpop','cpopw','rev8',\
40-
'bclri','bexti','binvi','bseti','xperm4','xperm8','zip','unzip']
40+
'bclri','bexti','binvi','bseti','xperm4','xperm8','zip','unzip','gorci']
4141
unsgn_rs2 = ['bgeu', 'bltu', 'sltiu', 'sltu', 'sll', 'srl', 'sra','mulhu',\
4242
'mulhsu','divu','remu','divuw','remuw','aes64ds','aes64dsm','aes64es',\
4343
'aes64esm','aes64ks2','sm4ed','sm4ks','ror','rol','rorw','rolw','clmul',\
@@ -720,7 +720,6 @@ def compute_per_line(queue, event, cgf_queue, stats_queue, cgf, xlen, addr_pairs
720720
local_dict[i] = int(csr_regfile[i],16)
721721

722722
local_dict['xlen'] = xlen
723-
724723
if enable :
725724
for cov_labels,value in cgf.items():
726725
if cov_labels != 'datasets':

riscv_isac/data/rvopcodesdecoder.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,10 @@ def decode(self, instrObj_temp):
395395
temp_instrobj.rm = int(get_arg_val(arg)(mcode), 2)
396396
if arg == 'csr':
397397
temp_instrobj.imm = int(get_arg_val(arg)(mcode), 2)
398+
if arg == 'bs':
399+
temp_instrobj.imm = int(get_arg_val(arg)(mcode), 2)
400+
if arg == 'rnum':
401+
temp_instrobj.imm = int(get_arg_val(arg)(mcode), 2)
398402
if arg.find('imm') != -1:
399403
if arg in ['imm12', 'imm20', 'zimm', 'imm2', 'imm3', 'imm4', 'imm5']:
400404
imm = get_arg_val(arg)(mcode)

riscv_isac/plugins/internaldecoder.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,10 +1215,7 @@ def arith_ops(self, instrObj):
12151215
# for zext.h rs2 is always 0, if pack instruction is used with x0 as rs2
12161216
# then cannot distinguish from each other, hence using isa to differentiate.
12171217
# zext.h is part of Zbb, pack is part of Zbkb
1218-
if (len(list (filter (lambda x: "Zbb" in x, self.isa)))==1):
1219-
instrObj.instr_name = 'zext.h'
1220-
else:
1221-
instrObj.instr_name = 'pack'
1218+
instrObj.instr_name = 'pack'
12221219
instrObj.rs1 = rs1
12231220
instrObj.rs2 = rs2
12241221
instrObj.rd = rd
@@ -1506,10 +1503,7 @@ def rv64i_arith_ops(self, instrObj):
15061503
# for zext.h rs2 is always 0, if packw instruction is used with x0 as rs2
15071504
# then cannot distinguish from each other, hence using isa to differentiate.
15081505
# zext.h is part of Zbb, packw is part of Zbkb
1509-
if (len(list (filter (lambda x: "Zbb" in x, self.isa))) == 1):
1510-
instrObj.instr_name = 'zext.h'
1511-
else:
1512-
instrObj.instr_name = 'packw'
1506+
instrObj.instr_name = 'packw'
15131507
instrObj.rs1 = rs1
15141508
instrObj.rs2 = rs2
15151509
instrObj.rd = rd

0 commit comments

Comments
 (0)