[LibertyClk] Support for Liberty file defined generated clock#378
[LibertyClk] Support for Liberty file defined generated clock#378markram1729 wants to merge 11 commits intoparallaxsw:masterfrom
Conversation
|
I will make changes to the formatting that is suitable for opensta |
|
The first step is to remove all of the formatting changes that completely obscure the functional changes. |
37d5348 to
d33b31d
Compare
* fix : compilation * fix tcl commands * Update Network.cc
61cbd89 to
7257c45
Compare
| static bool | ||
| isPowerOfTwo(int i) | ||
| bool | ||
| isPowerofTwo(int i) |
There was a problem hiding this comment.
restore the original name that uses camel case
| float fanout); | ||
| void setMaxArea(float area); | ||
| float maxArea() const; | ||
| void createLibertyGeneratedClocks(Clock *clk); |
There was a problem hiding this comment.
use make instead of create for naming consistency with the rest of the code
|
|
||
| namespace sta { | ||
|
|
||
| class GeneratedClock |
There was a problem hiding this comment.
The name GeneratedClock is too generic, since there are already generated clocks in sdc.
I suggest LibertyGenClk. The other functions names should be updated to be consistent.
| { | ||
| public: | ||
| ~GeneratedClock(); | ||
| const char *name() const { return name_; } |
|
|
||
| // Build helpers. | ||
| void makeGeneratedClock(const char *name, | ||
| const char *clock_pin, |
There was a problem hiding this comment.
use spaces for indentation (this changed with rel 3.0)
| int line_; | ||
| }; | ||
|
|
||
| class GeneratedClockGroup |
There was a problem hiding this comment.
You don't need GeneratedClockGroup; you could use a GeneratedClock that is
not in the Liberty and then add it. But the state class will be unnecessary
with the new liberty reader.
| if (sta->pins(clk)) { | ||
|
|
||
| // All pins along the clock network | ||
| const PinSet clkNetworkPins = *sta->pins(clk); |
There was a problem hiding this comment.
the variable is named like a function; use snake case
| // The keys of generated_clock_pins_to_cells_ | ||
| // (master clock pins) will be searched in the current clock network | ||
| for (const auto &entry : generated_clock_pins_to_cells) { | ||
| const char *pinName = entry.first; |
There was a problem hiding this comment.
use c++17 [pin_name, cell] syntax to avoid first and second.
pinName should be pin_name.
See doc/CodingGuidelines.txt
| clkHpinDisablesInvalid(); | ||
|
|
||
| // Trigger update of generated clocks | ||
| Sta::sta()->setUpdateGenclks(); |
There was a problem hiding this comment.
again, wrong to referencd Sta::sta()
| return $clks | ||
| } | ||
|
|
||
| # Get attribute |
There was a problem hiding this comment.
this has nothing to do with generated clocks and has no business being here.
| define_cmd_args "get_name" {object} | ||
| define_cmd_args "get_full_name" {object} | ||
|
|
||
| #Get Object name |
| define_cmd_args "get_full_name" {object} | ||
|
|
||
| #Get Object name | ||
| interp alias {} get_object_name {} get_full_name |
There was a problem hiding this comment.
put this in your .sta, not the sources
| } | ||
|
|
||
| proc get_full_name { object } { | ||
| if { [llength $object] > 1 } { |
|
|
||
| // Maps a clock pin path to the liberty cell containing the generated clock definition | ||
| void | ||
| VerilogReader::makeGeneratedClocks(LibertyCell *lib_cell, Instance *inst) |
There was a problem hiding this comment.
VerilogReader::makeGeneratedClocks makes no sense and violates modularity.
Generated clocks should work with a database that does not use the
verilog reader.
|
The Liberty reader is being rewritten so the parsing part of this will change rather drastically. It will probably be a week or so before those changes are pushed. |
from silimate Opensta pull Adds support for Liberty file-defined generated clocks in OpenSTA, including new classes, functions, and tests.