PeakRDL-regblock icon indicating copy to clipboard operation
PeakRDL-regblock copied to clipboard

During export, check for identifier collisions in output

Open amykyta3 opened this issue 1 year ago • 0 comments

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.

amykyta3 avatar Nov 07 '23 04:11 amykyta3