JulianKemmerer / PipelineC

A C-like hardware description language (HDL) adding high level synthesis(HLS)-like automatic pipelining as a language construct/compiler feature.
https://github.com/JulianKemmerer/PipelineC/wiki
GNU General Public License v3.0
569 stars 46 forks source link

Enums with shared literal names can cause VHDL syntax errors #168

Open JulianKemmerer opened 1 year ago

JulianKemmerer commented 1 year ago
typedef enum enum_a_t 
{
  REQ,
  RESP
}enum_a_t;
typedef enum enum_b_t
{
  REQ,
  RESP
}enum_b_t;

Tool will fail to resolve VHDL instances of the literal 'REQ' and 'RESP' to which enum type it belongs to. Tried working around with type'() casting and type'val() type'pos() stuff - didnt help.

Needs to be worked around to something like

typedef enum enum_a_t 
{
  A_REQ,
  A_RESP
}enum_a_t;
typedef enum enum_b_t
{
  B_REQ,
  B_RESP
}enum_b_t;