Permalink
Browse files

Forgot to build sensitivity list for selected assignment

  • Loading branch information...
1 parent c035b06 commit 277981b654245c570fc477103267902125490392 @nickg committed Apr 10, 2012
Showing with 16 additions and 6 deletions.
  1. +12 −2 src/simp.c
  2. +4 −4 test/regress/case3.vhd
View
@@ -812,8 +812,18 @@ static tree_t simp_select(tree_t t)
tree_set_loc(c, tree_loc(t));
tree_set_value(c, tree_value(t));
- for (unsigned i = 0; i < tree_assocs(t); i++)
- tree_add_assoc(c, tree_assoc(t, i));
+ tree_visit_only(tree_value(t), simp_build_wait, w, T_REF);
+
+ for (unsigned i = 0; i < tree_assocs(t); i++) {
+ assoc_t a = tree_assoc(t, i);
+ tree_add_assoc(c, a);
+
+ if (a.kind == A_NAMED)
+ tree_visit_only(a.name, simp_build_wait, w, T_REF);
+
+ for (unsigned j = 0; j < tree_waveforms(a.value); j++)
+ tree_visit_only(tree_waveform(a.value, j), simp_build_wait, w, T_REF);
+ }
tree_add_stmt(p, c);
tree_add_stmt(p, w);
View
@@ -6,7 +6,7 @@ architecture test of case3 is
signal y : integer;
begin
- with x select y <=
+ decode: with x select y <=
0 when X"0",
1 when X"1",
2 when X"2",
@@ -24,15 +24,15 @@ begin
14 when X"e",
15 when X"f";
- process is
+ stim: process is
begin
wait for 0 ns;
assert y = 0;
x <= X"4";
- wait on y;
+ wait for 1 ns;
assert y = 4;
x <= X"f";
- wait on y;
+ wait for 1 ns;
assert y = 15;
wait;
end process;

0 comments on commit 277981b

Please sign in to comment.