Allow repeat expression in event control to contain automatic terms
The repeat expression of an event controlled non-blocking assignment is evaluated once when the assignment is scheduled. This means there is no risk of it being referenced when its scope has already been freed. And hence there is no need to require the repeat expression to only contain static terms. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
a1c333ea6e
commit
be298d1cca
|
|
@ -3251,15 +3251,6 @@ NetProc* PAssignNB::elaborate(Design*des, NetScope*scope) const
|
|||
NetEvWait*event = 0;
|
||||
if (count_ != 0 || event_ != 0) {
|
||||
if (count_ != 0) {
|
||||
if (scope->is_auto() && count_->has_aa_term(des, scope)) {
|
||||
cerr << get_fileline() << ": error: automatically "
|
||||
"allocated variables may not be referenced "
|
||||
"in intra-assignment event controls of "
|
||||
"non-blocking assignments." << endl;
|
||||
des->errors += 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ivl_assert(*this, event_ != 0);
|
||||
count = elab_and_eval(des, scope, count_, -1);
|
||||
if (count == 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue