Closed
Description
- I have reviewed this project's contribution guidelines
Describe the bug
In the following code:
`ifdef SOME_MACRO
`include "inc.rdl"
`endif
addrmap test {
reg {
field {
hw = rw; sw =rw;
}f1 [`RANDOM] = 0;
} reg1;
};
I want to include inc.rdl
only if SOME_MACRO
is defined.
However this doesn't work, as the PerlPreprocessor
runs before VerilogPreprocess and expands include
directives without considering ifdef
, if
, else
, ... directives.
systemrdl-compiler/systemrdl/preprocessor/__init__.py
Lines 12 to 19 in 191f4dd
Expected behavior
I expect PerlPreprocessor
to ignore include
directives if they are surrounded by ifdef
which should disable it.
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels