Skip to content

Commit 4c8ef5b

Browse files
committed
make report field
Signed-off-by: James Cherry <cherry@parallaxsw.com>
1 parent 30f862b commit 4c8ef5b

7 files changed

Lines changed: 249 additions & 195 deletions

File tree

include/sta/Sta.hh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ using CheckErrorSeq = std::vector<CheckError*>;
8383
enum class CmdNamespace { sta, sdc };
8484
using ParasiticsNameMap = std::map<std::string, Parasitics*, std::less<>>;
8585
using GraphLoopSeq = std::vector<GraphLoop*>;
86+
using ReportFieldGetValue = std::function<std::string (const Path *path,
87+
const StaState *sta)>;
8688

8789
// Initialize sta functions that are not part of the Sta class.
8890
void initSta();
@@ -982,15 +984,16 @@ public:
982984
bool clk_gating_hold);
983985
void setReportPathFormat(ReportPathFormat format);
984986
void setReportPathFieldOrder(const StringSeq &field_names);
985-
void setReportPathFields(bool report_input_pin,
986-
bool report_hier_pins,
987-
bool report_net,
988-
bool report_cap,
989-
bool report_slew,
990-
bool report_fanout,
991-
bool report_variation,
992-
bool report_src_attr);
987+
void setReportPathFields(const StringSeq &fields);
993988
ReportField *findReportPathField(std::string_view name);
989+
ReportField *findReportPathFieldAbrev(std::string_view name);
990+
void makeReportPathField(std::string_view name,
991+
std::string_view name_abrev,
992+
std::string_view title,
993+
size_t width,
994+
bool left_justify,
995+
Unit *unit,
996+
const ReportFieldGetValue &get_value);
994997
void setReportPathDigits(int digits);
995998
void setReportPathNoSplit(bool no_split);
996999
void reportPathEnd(PathEnd *end);

network/Network.i

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,15 @@ get_attribute(const char *key)
655655
return Sta::sta()->ensureLinked()->getAttribute(self, key);
656656
}
657657

658+
void
659+
set_attribute(const char *key,
660+
const char *value)
661+
{
662+
sta::Sta *sta = Sta::sta();
663+
sta->ensureLinked();
664+
sta->networkReader()->setAttribute(self, key, value);
665+
}
666+
658667
} // Instance methods
659668

660669
%extend InstanceChildIterator {
@@ -813,4 +822,3 @@ bool has_next() { return self->hasNext(); }
813822
const Pin *next() { return self->next(); }
814823
void finish() { delete self; }
815824
} // NetConnectedPinIterator methods
816-

0 commit comments

Comments
 (0)