PeakRDL-regblock
PeakRDL-regblock copied to clipboard
During export, check for identifier collisions in output
See example in https://github.com/SystemRDL/systemrdl-compiler/issues/193
Current implementation will silently emit colliding output, or even reuse an incorrect typedef. Monitor for this and emit an error if it occurs.
Ideas for fix:
- Temporarily generate prefixes using non-underscore characters that are impossible to specify in RDL source.
- Use the above prefix as the source of truth to uniquely identify a type name
- Replace special delimiter chars with underscores and check if it collides with an existing scope prefix elsewhere.