The delay for a join_any and join_none is different than join
This commit is contained in:
parent
c38ca2114b
commit
39c14edb76
24
netlist.cc
24
netlist.cc
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998-2016 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1998-2017 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -2804,13 +2804,28 @@ DelayType NetProc::delay_type() const
|
||||||
|
|
||||||
DelayType NetBlock::delay_type() const
|
DelayType NetBlock::delay_type() const
|
||||||
{
|
{
|
||||||
DelayType result = NO_DELAY;
|
// A join_none has no delay.
|
||||||
|
if (type() == PARA_JOIN_NONE) return NO_DELAY;
|
||||||
|
|
||||||
|
DelayType result;
|
||||||
|
// A join_any has the minimum delay.
|
||||||
|
if (type() == PARA_JOIN_ANY) {
|
||||||
|
result = DEFINITE_DELAY;
|
||||||
|
for (const NetProc*cur = proc_first(); cur; cur = proc_next(cur)) {
|
||||||
|
DelayType dt = cur->delay_type();
|
||||||
|
if (dt < result) result = dt;
|
||||||
|
if (dt == NO_DELAY) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// A begin or join has the maximum delay.
|
||||||
|
} else {
|
||||||
|
result = NO_DELAY;
|
||||||
for (const NetProc*cur = proc_first(); cur; cur = proc_next(cur)) {
|
for (const NetProc*cur = proc_first(); cur; cur = proc_next(cur)) {
|
||||||
DelayType dt = cur->delay_type();
|
DelayType dt = cur->delay_type();
|
||||||
if (dt > result) result = dt;
|
if (dt > result) result = dt;
|
||||||
if (dt == DEFINITE_DELAY) break;
|
if (dt == DEFINITE_DELAY) break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -2880,9 +2895,10 @@ DelayType NetPDelay::delay_type() const
|
||||||
return DEFINITE_DELAY;
|
return DEFINITE_DELAY;
|
||||||
} else {
|
} else {
|
||||||
if (statement_) {
|
if (statement_) {
|
||||||
return statement_->delay_type();
|
return combine_delays(ZERO_DELAY,
|
||||||
|
statement_->delay_type());
|
||||||
} else {
|
} else {
|
||||||
return NO_DELAY;
|
return ZERO_DELAY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue