Skip to content

Commit 22ba5a8

Browse files
authored
Merge pull request #1217 from diffblue/named_property3-fix
Fix for lowering for expressions given as named properties
2 parents 8fa8e5b + 98249d4 commit 22ba5a8

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
KNOWNBUG
1+
CORE
22
named_property3.sv
33

44
^EXIT=0$
55
^SIGNAL=0$
66
--
77
^warning: ignoring
88
--
9-
The expression in the named property is not lowered.

regression/verilog/property/named_property3.sv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module main;
33
wire [31:0] x = 'b10010001;
44

55
property with_index;
6+
// the index expression requires lowering
67
x[7:4] == 'b1001
78
endproperty
89

src/verilog/verilog_synthesis.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,11 @@ exprt verilog_synthesist::synth_expr_rec(exprt expr, symbol_statet symbol_state)
9090
// substitute
9191
assert(symbol.value.is_not_nil());
9292

93+
// These aren't lowered yet
94+
auto lowered = verilog_lowering(symbol.value);
95+
9396
// recursive call
94-
return synth_expr_rec(symbol.value, symbol_state);
97+
return synth_expr_rec(lowered, symbol_state);
9598
}
9699
else
97100
{

0 commit comments

Comments
 (0)