https://open-source-silicon.dev logo
m

Matthew Guthaus

06/17/2021, 2:19 AM
Otherwise, if the net has enough fanout, Yosys will add a buffer tree and then CTS will think it only has 1 fanout and not do CTS
m

Matt Liberty

06/17/2021, 4:03 PM
In openroad-flow-scripts we remove all yosys buffering after synthesis is done and let cts & resizer redo it.
m

Matthew Guthaus

06/17/2021, 4:06 PM
Yeah, I just isolated that it is done in step 8, resizer
Even if I disable PL_RESIZER_DESIGN_OPTIMIZATIONS it buffers it
m

Matt Liberty

06/17/2021, 4:08 PM
it is the clock root coming from a pad?
m

Matthew Guthaus

06/17/2021, 4:08 PM
No
It's coming from a mux
m

Matt Liberty

06/17/2021, 4:08 PM
is it marked as a clock in sta?
m

Matthew Guthaus

06/17/2021, 4:09 PM
Yes, it is
I had to do some tricks to get this to work. I made a module with the mux, so that I could set the output port as the clock
Although later, it may flatten that and have the name "\clkmux.clk" whereas clkmux.clk was a hierarchical name
I'm not sure if the escape is causing an issue
m

Matt Liberty

06/17/2021, 4:10 PM
normally resizer skips clock nets so I'm not sure
the name doesn't matter just whether sta sees it as a clock based on sdc and clock propagation
m

Matthew Guthaus

06/17/2021, 4:10 PM
Ok, so that is probably the issue. It's a good direction, thanks.
Yeah, after synthesis it finds the clock fine, but before resizer it doesn't: create_clock [get_ports $::env(CLOCK_PORT)] -name $::env(CLOCK_PORT) -period $::env(CLOCK_PERIOD) [WARNING STA-0337] port 'clkmux.clk' not found.
m

Matt Liberty

06/17/2021, 4:12 PM
that's the problem then
m

Matthew Guthaus

06/17/2021, 4:13 PM
But it definitely exists in the def: - clkmux.clk ( 4762 CLK ) ( 4761 CLK ) ...
Ah, this is again because it is looking specifically for a PORT, not a NET and it seems that it flattened my mux module
I'm still stuck how to get the driver of a net in TCL
m

Matt Liberty

06/17/2021, 8:20 PM
Here's a hint: set block [ord::get_db_block] set net [$block findNet net51] foreach iterm [$net getITerms] { set mterm [$iterm getMTerm] set type [$mterm getIoType] if {$type == "OUTPUT"} { puts "[[$iterm getInst] getName]/[$mterm getName]" } }
you would have to deal with top level terms too if that is relevant
m

Matthew Guthaus

06/17/2021, 8:22 PM
I found that I could also use TCL only using get_property. The problem was figuring out what the properties were. I did it by guess and check... pin_direction, direction (yes)
Roughly get_pins, foreach pin get property, return output
m

Matt Liberty

06/17/2021, 8:24 PM
you can look at db.h as a guide to what's callable
from sta you can do get_pins -of_objects [get_net net51] and write up something similar if that is easier. At least it has a manual (and is basically sdc)
get_property [get_pins -of_objects [get_net net51] -filter direction==output] full_name
seems to work