Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
akashlevy committed Sep 17, 2024
2 parents c85c388 + bae1afc commit 48006fa
Show file tree
Hide file tree
Showing 14 changed files with 309 additions and 186 deletions.
53 changes: 24 additions & 29 deletions doc/CodingGuidelines.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Naming conventions
------------------

directory - lowercase (directory)
filename - corresponding class name without prefix (Filename)
Expand Down Expand Up @@ -105,32 +106,26 @@ pair if the lookup fails. Use map::find or sta::Map::findKey instead.

Avoid nested classes/enums because SWIG has trouble with them.

................................................................
Warning
get_<object> not found
sdf timing arc not found
disabling timing arcs to break loops
virtual clock with no sources (no pins)
invalid endpoint for constrained paths
sdf DESIGN does not match top level cell name
set_input_delay on clk port (deprecation warning)
link cannot resolve reference (module/cell not found)

Errors
cannot open file
file syntax error
cmd illegal command option combinations
cmd extra positional args
cmd unknown keyword option
cmd unknown
sdf pin not found

................................................................
Swig notes

C null pointers (zero) turn into "NULL" values in TCL.

TCL "NULL" strings turn into NULL (zero) pointers in C.

# TCL lexpr-funcall
eval exec $prog $args
Regression Tests
................

Tests are run with the tcl script test/regression:

Usage: regression [-help] [-threads threads] [-valgrind] [-report_stats] tests...
-threads max|integer - number of threads to use
-valgrind - run valgrind (linux memory checker)
-report_stats - report run time and memory
Wildcarding for test names is supported (enclose in "'s)

Tests log files and results are in test/results. The result/test.log
is compared to test.ok to determine if a test passes.

Test scripts are written in tcl and live in the /test directory.
Compress large liberty, verilog, and spef, files and use existing
libraries to prevent repository bloat.

The test script should use a one line comment at the beginning of the
file so head -1 can show what it is for. Use file names to roughly
group regressions and use numeric suffixes to distinguish them.

The script test/save_ok saves a test/results/<test>.log to test/<test>.okfile.
2 changes: 1 addition & 1 deletion include/sta/PathExpanded.hh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public:
size_t size() const { return paths_.size(); }
// path(0) is the startpoint.
// path(size()-1) is the endpoint.
PathRef *path(size_t index);
const PathRef *path(size_t index) const;
TimingArc *prevArc(size_t index);
// Returns the path start point.
// Register/Latch Q pin
Expand Down
4 changes: 2 additions & 2 deletions include/sta/Sta.hh
Original file line number Diff line number Diff line change
Expand Up @@ -911,9 +911,9 @@ public:
// Previous path end is used to detect path group changes
// so headers are reported by group.
void reportPathEnd(PathEnd *end,
PathEnd *prev_end);
PathEnd *prev_end,
bool last);
void reportPathEnd(PathEnd *end);
void reportPathEnds(PathEndSeq *ends);
ReportPath *reportPath() { return report_path_; }
void reportPath(Path *path);

Expand Down
5 changes: 5 additions & 0 deletions include/sta/StringUtil.hh
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ void
stringPrint(string &str,
const char *fmt,
...) __attribute__((format (printf, 2, 3)));
// Formated append to std::string.
void
stringAppend(string &str,
const char *fmt,
...) __attribute__((format (printf, 2, 3)));

// Print to a temporary string.
char *
Expand Down
4 changes: 2 additions & 2 deletions search/PathExpanded.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ PathExpanded::startIndex() const
return pathsIndex(start_index_);
}

PathRef *
PathExpanded::path(size_t index)
const PathRef *
PathExpanded::path(size_t index) const
{
if (index < paths_.size())
return &paths_[pathsIndex(index)];
Expand Down
2 changes: 1 addition & 1 deletion search/Property.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ getProperty(PathEnd *end,
PathExpanded expanded(end->path(), sta);
PathRefSeq paths;
for (auto i = expanded.startIndex(); i < expanded.size(); i++) {
PathRef *path = expanded.path(i);
const PathRef *path = expanded.path(i);
paths.push_back(*path);
}
return PropertyValue(&paths);
Expand Down
Loading

0 comments on commit 48006fa

Please sign in to comment.