Call probe_expr_width() before elab_and_eval() when evaluating a path.
You need to probe the expression width before trying to elaborate and evaluate an expression. The eval_path_component() routine was missing this and was causing an assert.
This commit is contained in:
parent
b7264d21d5
commit
c7afb4f51a
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001-2009 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2001-2010 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -364,6 +364,7 @@ hname_t eval_path_component(Design*des, NetScope*scope,
|
|||
assert(index.sel == index_component_t::SEL_BIT);
|
||||
|
||||
// Evaluate the bit select to get a number.
|
||||
probe_expr_width(des, scope, index.msb);
|
||||
NetExpr*tmp = elab_and_eval(des, scope, index.msb, -1);
|
||||
ivl_assert(*index.msb, tmp);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue