Hi All. I'm running openlane2 on a basic 4b counte...
# openlane-2
d
Hi All. I'm running openlane2 on a basic 4b counter and have encountered an error. In dir ~/mydesigns/counter_4b/, I have created the attached config.json and counter_4b.v files, as per the below link: https://openlane2.readthedocs.io/en/latest/getting_started/newcomers/index.html#configuration The flow errors out with the following: --------------------------------------------------------------------------- [065447] ERROR The following error was encountered while running the flow: main.py:163 OpenROAD.GeneratePDN failed with the following errors: [PDN-0185] Insufficient width (18.86 um) to add straps on layer met4 in grid "stdcell_grid" with total strap width 4.9 um and offset 16.32 um. [065447] ERROR OpenLane will now quit. --------------------------------------------------------------------------- Being a newbie to openlane Im not so good at interpreting these errors yet. It appears to have errored out at step 20 - "20-openroad-generatepdn". Any ideas what it is and how to overcome it? Thanks, Diarmuid
t
Yeah, basically your module is too small and there isn't space to put power rails on it.
m
@Diarmuid Collins you might try adding
Copy code
"FP_SIZING": "absolute",
"DIE_AREA": "0 0 300 300",
d
Thanks @tnt @Mitch Bailey. So that brings me to my next error: ERROR [GPL-0307] RePlAce divergence detected. Re-run with a smaller max_phi_cof value. What is "max_phi_cof"? Also, w.r.t my previous question - how does "DIE_AREA": "0 0 300 300" read? Is x = 300um = y? Thanks,
m
I believe the
DIE_AREA
is lower-left-x, lower-left-y, upper-right-x, upper-right-y. I don’t know about max_phi_cof. You might check the expanded
config.tcl
file in the
runs/timestamp
directory.
d
Thanks @Mitch Bailey. Regarding the DIE_AREA, so is the die area for the Efabless openframe = 300x300um2? Regarding my error, when I look in my runs lib I don't see a timestamp lib, as shown. However I went in to the last step (#23) and looked at the config.json file in that. I found the shown lines with MAX_PHI_CO in them. Don't know if that helps with any debug. Be great if it did!
m
@Diarmuid Collins the
DIE_AREA
for
user_project_wrapper
is fixed. You can find it in
caravel_user_project/openlane/user_project_wrapper/config.json
. If you’re just creating and arbitrary cell, then you can set the
DIE_AREA
to whatever you want as long as it’s tall/wide enough to have a power grid.
@Diarmuid Collins Regarding
PL_MAX_PHI_COEFFICIENT
, are you using openlane1 or openlane2? What pdk commit are you using?
d
@Mitch Bailey: I am using openlane2 for SW130. Is there some resource for me to dig a bit on this or how does the community go about debugging openlane error messages in general?
t
That error is because the area is too big for the amount of logic you have and it messes with the placement algorithm. Try setting PL_TARGET_DENSITY to say 30 instead of letting it pick automatically.
m
@donn This is an openlane2 question. I couldn’t find a default value in any
config.tcl
file or documentation for
PL_MAX_PHI_COEFFICIENT
. Could you point us in the right direction?
But realistically you'd need to read the research paper to understand what it actually does 😅
m
Thanks @tnt! @Diarmuid Collins what about adding the defaults to your local
config.json
file? (from the link above)
Copy code
-min_phi_coef

Set pcof_min (
 Lower Bound). The default value is 0.95. Allowed values are floats [0.95, 1.05].

-max_phi_coef

Set pcof_max (
 Upper Bound). Default value is 1.05. Allowed values are [1.00-1.20, float].
like this
Copy code
"PL_MIN_PHI_COEFFICIENT": 0.95,
  "PL_MAX_PHI_COEFFICIENT": 1.05,
t
I still think setting an explicit place density is a better fix. IIRC when you don't set one, it will basically take used_area / available_area but if you have very little area used and forced a large die area, it will be a very low place density. It's trying to spread the logic over the whole available area but that's not really what you want. here, it'd be better to have a small cluster with all the logic and the rest of the die empty.
👍 1
Long story short I have no idea what it does but apparently it's a perfectly cromulent knob to mess around with global placement results.
m
@donn Thanks for the update. The documentation that @tnt referenced seemed to indicate a default, but it didn’t look like that was getting set (or maybe “none” overrides the default.). Do you think this should be added to the pdk config, or that the placement program should be updated to substitute the default value for “none”, or that openlane should not set a “none” value to pass to the placer?
d
@Mitch Bailey
None
doesn't pass the flag to OpenROAD from OpenLane, which uses the OpenROAD default. Maybe this should be made clearer in the documentation.
But I am not going to copy the default value itself to OpenLane. We've done that in the past, values have changed, and things went haywire.
👌 1
👍 2
d
Thanks all for this amazing support! I'll try out the above and report back tomorrow. Cheers.
👍 1
t
The color difference on the above pics is more likely due to selected layer than anything else. To see logic density, looking only at poly or met1 is a bit better.
Spreading logic too much causes long wires which increases delay.
Hence why I'd put logic density at at least 30%
d
Thanks @tnt. Attached is the layout setting target density at 0.1 (which I presume means 10%). I show poly/M1/2/3.
Attached next is setting max_phi_coef = 1 (which Im still not 100% what that physically corresponds to).
Both are different in that they span 10 rows of the grid pattern. 1st one (setting target density) appears to be more widely spaced than the 2nd. @tnt @Mitch Bailey: what would you conclude from these plots? Txs
Also, to open the layouts I use:
Copy code
openlane --last-run --flow openinklayout ~/mydesigns/counter_4b/config.jso

How do I modify this command to open a specific run and not the last run. I tried:

openlane --run-RUN_2024-11-02_12-05-36  --flow openinklayout ~/mydesigns/counter_4b/config.json

but this didnt work.
t
Heh 🤷 There is so little logic that I doubt this make any difference.
m
Sorry, I can’t give any input on the conclusions. As for opening a specific run, would changing
--run-RUN
to
--run=RUN
make a difference or is that just a typo above.
d
@Mitch Bailey Yeah, tried --run=RUN but again no luck. Also tried specifying the config.json file of the final run with the below: openlane --flow openinklayout ~/mydesigns/counter_4b/runs/RUN_2024-11-02_12-01-54/75-klayout-opengui/config.json --manual-pdk That didnt work either. It would be useful to know how since if I want to compare 2 layouts it avoids me always having to run the flow (to enable me to open the "last" run). All the examples I see (e.g. https://openlane2.readthedocs.io/en/latest/usage/caravel/index.html) use --last-run.
@tnt I re-ran the flow with PL_TARGET_DENSITY = 0.3. It is a 4 bit counter where, as shown in the attached, outputs [2] and [3] are on the right hand side while [1] and [0] are on the left. Clk input is then on the left with reset on the right. How do you control pin placements so that outputs <3:0> are all beside each other? Thanks
a
@Diarmuid Collins @tnt Hey. I am getting the same issue with max_cof_value. i have set the PL_TARGET_DENSITY to 0.08 and if i set it below it the floe fails. and also reduced the value for max_phi_cof. but it still gives the same error. I am not sure why.
also I am using openlane 1 as I am doing this design in caravel wrapper as we need silicon proven openlane version for tapeout
t
use a higher target density
a
but for him u said use smaller target density?
currently setting it to 0.8 and checking
@tnt took longer but failed with the same error
it worked thankyou.
had to set it to 0.95