trying to use c preprocessor macros to skip CSRs in sv from being
parallelised is too painful, and is necessary to do. a parallel CSR
read/write does not make sense
floatmask = (1<<len(allfloats)-1)
allints = intpatterns + cintpatterns[2:]
+skip = '#define USING_NOREGS\n' \
+ '#define REGS_PATTERN 0x0\n'
def find_registers(fname):
+ # HACK! macro-skipping csr* instructions too painful
+ if 'csr' in fname:
+ return skip
res = []
isintfloat = 0x0 + floatmask << len(allints)
with open(fname) as f:
isintfloat &= ~(1 << (idx+len(allints)))
res.append('#define USING_REG_%s' % p)
if not res:
- return '#define USING_NOREGS\n' \
- '#define REGS_PATTERN 0x0\n'
+ return skip
res.append('#define REGS_PATTERN 0x%x' % isintfloat)
return '\n'.join(res)