https://open-source-silicon.dev logo
#openlane
Title
# openlane
a

Amogh Lonkar

05/17/2021, 11:56 PM
Quick question: While hardening macros, has anyone ever come across
No clock nets have been found
error? This is coming up during the CTS step despite having defined
CLOCK_PORT
and
CLOCK_PERIOD
in config.tcl. It seems to find the proper clock and move on because there are 0 sinks and then ends up not finding any. https://github.com/AmoghLonkar/openram_testchip/tree/feature/floorplan is the link to the repo just in case. Thanks!
m

Matthew Guthaus

05/18/2021, 12:03 AM
I specified only CLOCK_PORT and not CLOCK_NET and it works. I'm not sure what happens if you specify both simultaneously...
a

Amogh Lonkar

05/18/2021, 12:03 AM
Tried it both ways but still fails at that step.
m

Matthew Guthaus

05/18/2021, 12:07 AM
oh, it looks like I had CLOCK_TREE_SYNTH set to false in my test
which is not good
a

Amogh Lonkar

05/18/2021, 12:09 AM
It also passes that step for me if I set it to 0, but I would imagine we'd need CTS to get a proper macro
b

Bhawandeep Singh Harsh

05/18/2021, 12:10 AM
Same observation
m

Matthew Guthaus

05/18/2021, 12:10 AM
Yeah, the fanout is too high to not have a clock tree. I had a fanout of 2 clock nets in my example
a

Amogh Lonkar

05/18/2021, 12:11 AM
same
m

Matthew Guthaus

05/18/2021, 12:12 AM
If you look at the DEF file, which is passed to TritonCTS, it definitely has the clk_in port and net:
Copy code
$ grep clk_in openlane/openram_testchip/runs/openram_testchip/results/placement/openram_testchip.placement.def
    - clk_in + NET clk_in + DIRECTION INPUT + USE SIGNAL + PLACED ( 237130 1198000 ) N + LAYER met2 ( -140 -2000 ) ( 140 2000 ) ;
    - clk_in ( PIN clk_in ) + USE SIGNAL ;
a

Amogh Lonkar

05/18/2021, 12:15 AM
TritonCTS finds the net, but then skips because it has 0 sinks for some reason
m

Matthew Guthaus

05/18/2021, 12:16 AM
If you look at the code, the CTS script is: openlane/scripts/tcl_commands/cts.tcl which calls openroad: openlane/scripts/openroad/or_cts.tcl
Hrm, check the Verilog. It looks like it loads that...
The synthesis output verilog
It has no fanout!
openram_testchip/openlane/openram_testchip/runs/openram_testchip/results/synthesis/openram_testchip.synthesis.v
your logic doesn't use a clock in SRAM_IN
That is not synthesizable verilog...
There isn't a single always @posedge clk_in
and so Yosys prunes away the memories even because their inputs are nothing
a

Amogh Lonkar

05/18/2021, 12:22 AM
ah I see
thanks
m

Matthew Guthaus

05/18/2021, 12:27 AM
In your verilog, what are supposed to be the FFs?
A FF with async reset should be:
Copy code
always @(posedge clk or reset) begin
if (reset) begin
  mydff <= 0;
else begin
  mydff <= din;
end
end
👍 1
🌍 1
a

Amogh Lonkar

05/18/2021, 12:32 AM
The FFs were supposed to hold the connections to the SRAMS, but I hadn't synchronized or saved with a clock