edalize icon indicating copy to clipboard operation
edalize copied to clipboard

[BUG REPORT] Edalize does not support the use of vlogdefine parameters with no value

Open amal-araweelo opened this issue 9 months ago • 2 comments

SystemVerilog allows you to use a macro name without setting it to a value, but this is not supported by Edalize:

Required Data type of the parameter. Valid values are bool, file, int, str. file is similar to str, but the value is treated as a path and converted to an absolute path

Even so, the VCS backend assumes that all vlogdefines do have a value:

...
                for k, v in vlog_defines.items():
                    _args.append(
                        "+define+{}={}".format(
                            k, self._param_value_str(v, str_quote_style='""')
                        )
                    )
...

amal-araweelo avatar Feb 13 '25 13:02 amal-araweelo

I have looked at this before. It's possible to solve but it's a bit tricky. Can you work around it by just setting the define to 1 or something similar? That's typically what I do in these cases.

olofk avatar Feb 13 '25 16:02 olofk

In the design or just the .core file? It would be nice not to have to change the rtl code to accommodate this bug, if possible. @olofk

amal-araweelo avatar Feb 19 '25 08:02 amal-araweelo

@amal-araweelo in case you haven't solved this you can just do this in the .core file under the parameters section of your target, e.g. - <DEFINE>=true, or some other meaningless value.

michaelsoftbinbos avatar Jul 22 '25 18:07 michaelsoftbinbos