Skip to content

Commit

Permalink
regression failures
Browse files Browse the repository at this point in the history
Signed-off-by: James Cherry <[email protected]>
  • Loading branch information
jjcherry56 committed Nov 10, 2024
1 parent a5e6787 commit fba5a77
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
19 changes: 19 additions & 0 deletions liberty/LibertyReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ LibertyReader::defineVisitors()
defineAttrVisitor("index_2", &LibertyReader::visitIndex2);
defineAttrVisitor("index_3", &LibertyReader::visitIndex3);

defineGroupVisitor("technology",
&LibertyReader::beginTechnology,
&LibertyReader::endTechnology);
defineGroupVisitor("rise_transition_degradation",
&LibertyReader::beginRiseTransitionDegredation,
&LibertyReader::endRiseFallTransitionDegredation);
Expand Down Expand Up @@ -651,6 +654,7 @@ LibertyReader::beginLibrary(LibertyGroup *group)
library_->units()->currentUnit()->setScale(current_scale_);
library_->units()->distanceUnit()->setScale(distance_scale_);

library_->setDelayModelType(DelayModelType::cmos_linear);
scale_factors_ = new ScaleFactors("");
library_->setScaleFactors(scale_factors_);
}
Expand Down Expand Up @@ -1331,6 +1335,21 @@ LibertyReader::visitSlewDerateFromLibrary(LibertyAttr *attr)

////////////////////////////////////////////////////////////////

void
LibertyReader::beginTechnology(LibertyGroup *group)
{
if (library_) {
const char *tech = group->firstName();
if (stringEq(tech, "fpga"))
library_->setDelayModelType(DelayModelType::cmos_linear);
}
}

void
LibertyReader::endTechnology(LibertyGroup *)
{
}

void
LibertyReader::beginTableTemplateDelay(LibertyGroup *group)
{
Expand Down
2 changes: 2 additions & 0 deletions liberty/LibertyReaderPvt.hh
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ public:
RiseFall *rf);
virtual void visitSlewDerateFromLibrary(LibertyAttr *attr);

virtual void beginTechnology(LibertyGroup *group);
virtual void endTechnology(LibertyGroup *group);
virtual void beginTableTemplateDelay(LibertyGroup *group);
virtual void beginTableTemplateOutputCurrent(LibertyGroup *group);
virtual void beginTableTemplate(LibertyGroup *group,
Expand Down
1 change: 0 additions & 1 deletion util/StringUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ stringPrintTmp(const char *fmt,

if (tmp_length >= tmp_length1) {
tmp_length1 = tmp_length + 1;
stringDelete(tmp);
tmp = makeTmpString(tmp_length1);
va_copy(args_copy, args);
tmp_length = vsnprint(tmp, tmp_length1, fmt, args_copy);
Expand Down

0 comments on commit fba5a77

Please sign in to comment.