min pulse width lib/sdf resolves #255
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
f2a94a6ffa
commit
343b93b633
|
|
@ -692,10 +692,10 @@ LibertyBuilder::makeMinPulseWidthArcs(LibertyCell *cell,
|
||||||
from_port = to_port;
|
from_port = to_port;
|
||||||
TimingArcSet *arc_set = makeTimingArcSet(cell, from_port, to_port, related_out,
|
TimingArcSet *arc_set = makeTimingArcSet(cell, from_port, to_port, related_out,
|
||||||
role, attrs);
|
role, attrs);
|
||||||
for (auto to_rf : RiseFall::range()) {
|
for (const RiseFall *from_rf : RiseFall::range()) {
|
||||||
TimingModel *model = attrs->model(to_rf);
|
TimingModel *model = attrs->model(from_rf);
|
||||||
if (model)
|
if (model)
|
||||||
makeTimingArc(arc_set, to_rf->opposite(), to_rf, model);
|
makeTimingArc(arc_set, from_rf, from_rf->opposite(), model);
|
||||||
}
|
}
|
||||||
return arc_set;
|
return arc_set;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2027,8 +2027,8 @@ LibertyReader::makeMinPulseWidthArcs(LibertyPort *port,
|
||||||
attrs = make_shared<TimingArcAttrs>();
|
attrs = make_shared<TimingArcAttrs>();
|
||||||
attrs->setTimingType(TimingType::min_pulse_width);
|
attrs->setTimingType(TimingType::min_pulse_width);
|
||||||
}
|
}
|
||||||
// rise/fall_constraint model is on the trailing edge of the pulse.
|
// rise/fall_constraint model is on the leading edge of the pulse.
|
||||||
const RiseFall *model_rf = hi_low->opposite();
|
const RiseFall *model_rf = hi_low;
|
||||||
TimingModel *check_model =
|
TimingModel *check_model =
|
||||||
makeScalarCheckModel(min_width, ScaleFactorType::min_pulse_width, model_rf);
|
makeScalarCheckModel(min_width, ScaleFactorType::min_pulse_width, model_rf);
|
||||||
attrs->setModel(model_rf, check_model);
|
attrs->setModel(model_rf, check_model);
|
||||||
|
|
|
||||||
|
|
@ -426,8 +426,13 @@ LibertyWriter::writeTimingArcSet(const TimingArcSet *arc_set)
|
||||||
|
|
||||||
for (const RiseFall *rf : RiseFall::range()) {
|
for (const RiseFall *rf : RiseFall::range()) {
|
||||||
TimingArc *arc = arc_set->arcTo(rf);
|
TimingArc *arc = arc_set->arcTo(rf);
|
||||||
if (arc)
|
if (arc) {
|
||||||
writeTimingModels(arc, rf);
|
// Min pulse width arcs are wrt to the leading edge of the pulse.
|
||||||
|
const RiseFall *model_rf = (arc_set->role() == TimingRole::width())
|
||||||
|
? rf->opposite()
|
||||||
|
: rf;
|
||||||
|
writeTimingModels(arc, model_rf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stream_, " }\n");
|
fprintf(stream_, " }\n");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue