Skip to content

Commit

Permalink
Case statements need their expresions probed.
Browse files Browse the repository at this point in the history
Probe the widths of the case statement expressions. The expressions
are self-determined in that context, but the probe is needed to
setup the expression types.
  • Loading branch information
steveicarus committed Nov 30, 2008
1 parent 1cc5586 commit d272a93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions elaborate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2215,6 +2215,7 @@ NetProc* PCase::elaborate(Design*des, NetScope*scope) const
{
assert(scope);

probe_expr_width(des, scope, expr_);
NetExpr*expr = elab_and_eval(des, scope, expr_, -1);
if (expr == 0) {
cerr << get_fileline() << ": error: Unable to elaborate this case"
Expand Down Expand Up @@ -2267,6 +2268,7 @@ NetProc* PCase::elaborate(Design*des, NetScope*scope) const
NetExpr*gu = 0;
NetProc*st = 0;
assert(cur->expr[e]);
probe_expr_width(des, scope, cur->expr[e]);
gu = elab_and_eval(des, scope, cur->expr[e], -1);

if (cur->stat)
Expand Down

0 comments on commit d272a93

Please sign in to comment.