chipsalliance / VeeR-ISS

Apache License 2.0
114 stars 33 forks source link

Potential bugs in InstEntry.cpp InstTable::setupInstVec() #6

Closed sylvanez closed 3 years ago

sylvanez commented 3 years ago

Dear SwerV-ISS team, while formally modelling the ISS core for Onespin's C++ ISA checker module, several discrepancies between the formal ISA model and the SwerV InstTable as created during setupInstVec() have been found. The affected instructions are listed below. As far as I can test, eliminating these discrepancies does not have any effect on the program execution. This could point to the reason why they have not been detected earlier: As far as I can see, the decoding does not make direct use of the information available in the InstTable member of the Hart object. E.g. operand masks are available in the InstTable but are not being used during decode() to obtain the operands from the instruction bitset. I assume this is due to better performance and easier code writability. B ut nevertheless, duplicating information is always risky ;-)

Best regards, Markus Kettern onespin.com

List of discrepancies with my explanations / interpretations (line numbers may be slightly inaccurate):

This is the generated log file with all detected discrepancies: log.txt

jrahmeh commented 3 years ago

Hi Markus,

All the issues you reported are valid. I fixed all of them except c.nop. The problem codes/masks are currently not used but it is good to get them right since they will eventually be used. Many thanks for finding and reporting these issues. Will release new code shortly.

Joe