riscv-software-src / riscv-isac

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve instruction object to localise coverage logic and field definitions.

pawks opened this issue · comments

Currently the fields in the instruction object are set by the decoder exclusively. Based on the instruction (p extension/floating point) additional (derived) fields are used in the coverpoints to describe coverage requirements accurately.

Currently these are defined in an ad-hoc manner in the coverage function. This causes repetitive effort across ctg and isac to define and evaluate coverage for such instructions. Re-architecting the field definitions and coverage evaluation as member functions in the instruction object will localize coverage logic and enable per-instruction customization while avoiding duplication. This would ease adding support for future extensions.