SymbioticEDA / riscv-formal

RISC-V Formal Verification Framework
ISC License
584 stars 98 forks source link

Small fixes for monitor generation #31

Closed jleahy closed 5 years ago

jleahy commented 5 years ago

Hi Clifford,

It turns out that currently generate.py produces invalid Verilog for RV32I (C extension disabled), particularly you end up with ialign16 not getting defined. This is because some instructions (such as BEQ) have nested ifdefs that aren't handled by the parser. I've extended it to track a stack of ifdefs instead. This also cuts down the lines of code a little and makes it easier to extend for additional flags.

The other two changes are just niceties whilst I was in the vicinity.