1
0
mirror of synced 2026-02-24 16:19:05 +00:00
Files
YosysHQ.yosys/tests/simple/ifdef_2.v
Zachary Snow 1ec5994100 verilog: fix handling of nested ifdef directives
- track depth so we know whether to consider higher-level elsifs
- error on unmatched endif/elsif/else
2021-03-01 12:28:33 -05:00

22 lines
242 B
Verilog

module top(o1, o2, o3);
output wire o1;
`define COND_1
`define COND_2
`define COND_3
`ifdef COND_1
output wire o2;
`elsif COND_2
input wire dne1;
`elsif COND_3
input wire dne2;
`else
input wire dne3;
`endif
output wire o3;
endmodule