<@U017X0NM2E7> Was hoping to pick your brain about...
# design-review
a
@User Was hoping to pick your brain about some layout issues with my design. There's quite a few macros which I am manually placing. I am placing them towards the edges, but leaving enough space for the met4/met5 straps to provide power to the chunks of met1 between the edge and the macro. I did this because I can't see anything to prevent placement from putting a cell in these regions (eg buffering an I/O) and as such they'd be unpowered. I was wondering what best practices are here. I can move them closer to the edges, but I presume I still need some space to route the user_project_wrapper external I/Os. My macro pin placement avoids these narrow areas, so that isn't a problem. How do I avoid the original placement issue in that case? Does Openlane need an easy way to specify placement blockages?
Looking back at my MPW1 submission, I was using
FP_HORIZONTAL_HALO/FP_VERTICAL_HALO
to block the area. It looks like that option has split into two (
FP_PDN_VERTICAL_HALO/FP_TAP_VERTICAL_HALO etc
). Testing with the new options
m
Sorry Anton, I don't have any experience in this area yet, but there have been some discussions about incorrect power routing through macros.
a
Thanks Mitch. I did see some of those discussions, and it does look like vias are in the correct place to power the macros. Can I use CVC to verify power connections to the complete user_project_wrapper design, including the macros?
m
You should be able to do that. Right now the cvcrc file is generically setup to be used in the openlane flow.tcl, but you should be able to copy and modify it locally. You can then run interactively to examine the connections. Something like this
Copy code
cvc -i mycvcrc
> continue
> expandnet *(*)/VPWR
> expandnet *(*)/VGND
That should show you what all your standard cell power connections are. Of course you can use macro names too.
Copy code
> expandnet *(macroname)/VPWR
If you have the netlist extracted from GDS, you can use that too (after changing the device lines). If you wanted me to walk you through it via zoom sometime, let me know.
a
Thank you Mitch. I'm not quite there yet, but will try that and report back when I do
Have been bouncing between LVS and DRT. Thankfully LVS is working well enough to be finding real bugs in DRT, eg https://github.com/The-OpenROAD-Project/OpenROAD/issues/1577
m
Excellent! Nice work reporting the short. Correct by design is a nice concept when it works, but I think it's important to have independent double checks.
a
Thanks! I'm still impressed by LVS and how well it works.
m
@Anton Blanchard I'm curious about your need to manually place the macros and what happens with automatic placement. We are working on a new macro placer in OR and perhaps we should test on your design.
As for the distance to the corner it is mostly about routability to the io pins and the macro pins. @mehdi might have some guidance.
a
@Matt Liberty I was doing manual placement way back on the MPW1 shuttle, so it's mostly a hold over from then. I can give the new macro placer a try sometime soon
I ended up using:
Copy code
set ::env(FP_TAP_HORIZONTAL_HALO) 40
set ::env(FP_PDN_HORIZONTAL_HALO) 40
set ::env(FP_TAP_VERTICAL_HALO) 40
set ::env(FP_PDN_VERTICAL_HALO) 40
And spacing the macros 40um from the edges. Much more than I need, but it did the trick:
m
@Anton Blanchard What is the size of your SRAM? I did not use any halo and it looked fine (4KB SRAM)
@Anton Blanchard is your design pushed somewhere? I would be curious to see how you are doing that!
a
@mehdi I'm still using DFFRAM based RAM (4kB). The halos helped the register file and multiplier macros mostly. Let me push what I have.
I'm finally LVS and DRC clean. Fighting timing at the moment. I'm continually bumping up
PL_RESIZER_HOLD_SLACK_MARGIN
but I wonder if I should try your ECO fixup flow instead.
m
Thanks @User - Then I need to check back but I remember that after removing the macro wrapper in ORFS, the SRAM did not have any issues. Re: the ECO flow, are you using openlane? we did not port the flow to orfs yet. But here is the doc: https://docs.google.com/document/d/1RYWNeVjQpBkMhN1LGLOyMwwtLzFAENI-veqsfWg-5v8/edit
@Haolin Dong can help you with that too.
a
Thanks. I am using openlane, let me give it a try now
🙌 1
Copy code
[INFO DRT-0267] cpu time = 00:55:37, elapsed time = 00:07:37, memory = 2569.35 (MB), peak = 3008.43 (MB)

[INFO DRT-0180] Post processing.
Saving to /home/anton/shuttle-3/caravel_user_project/openlane/multiply_add_64x64/runs/multiply_add_64x64/results/eco/arcdef/0_post-route.def
[WARNING ODB-0172] Cannot open DEF file (/home/anton/shuttle-3/caravel_user_project/openlane/multiply_add_64x64/runs/multiply_add_64x64/results/eco/arcdef/0_post-route.def) for writing
The eco directory was created, but the arcdef was not
h
Let me check. It seems the design path is not set correctly.
Can you try this version https://github.com/The-OpenROAD-Project/OpenLane/pull/867. There are some updates that haven't been merged.
a
Ok let me try that
Quite a few rejects, you wouldn't happen to have a branch that is against mainline openlane?
h
hmmm It works from my side.
The bug you mentioned is basically because these lines (creating the folder of arcdef) should be moved to the beginning of function
run_routing
. https://github.com/The-OpenROAD-Project/OpenLane/blob/74b9e108406b2948f568fa4e4daecefc9787fec7/scripts/tcl_commands/eco.tcl#L127
a
@Haolin Dong Ok. I was referring to the fact that the branch on that PR has conflicts with upstream
h
@Anton Blanchard Thanks. The conflicts are just some formatting things. Let me know if there are any issues regarding the eco flow.
a
Lots of whitespace changes, in general it's better for them to be in a separate patch. I also noticed this and wanted to confirm that it is correct:
Copy code
# pin
-                    if (pin_name == ''):
+                    if (pin_name == '' and skip_pin == 0 ):
                         pin_name=start_point
                         pin_type="BTerm"
                         # continue
-                    vio_dict[pin_name + " " + pin_type].append(float(minus_time_str.group(1)))                     
+                        vio_dict[pin_name + " " + pin_type].append(float(minus_time_str.group(1)))
Change in indenting of the vio_dict assignment, if it is the comment might want to be moved or removed
It runs, but I hit LVS errors
I think that is a magic extraction bug we are chasing elsewhere
m
Thanks @Anton Blanchard For LVS are you picking up the netlist /final files out of eco? this should be done automatically but just checking
also wondering if your timing issues are resolved with that PR?
a
@mehdi If I enable the ECO flow, I see fill issues. For some reason it's only using decap_3 cells, and there are lots of gaps.
Copy code
# if diode insertion does *not* happen as part of global routing, then
     # we can insert fill cells early on
-    if { $::env(DIODE_INSERTION_STRATEGY) != 3 } {
+    if { ($::env(DIODE_INSERTION_STRATEGY) != 3) && ($::env(ECO_FINISH) ==1) } {
         ins_fill_cells
     }
 
     global_routing
 
-    if { $::env(DIODE_INSERTION_STRATEGY) == 3 } {
+    if { ($::env(DIODE_INSERTION_STRATEGY) == 3) && ($::env(ECO_FINISH) ==1) } {
         # Doing this here can be problematic and is something that needs to be
         # addressed in FastRoute since fill cells *might* occupy some of the
         # resources that were already used during global routing causing the
In my case
DIODE_INSERTION_STRATEGY=0
.
ECO_FINISH
is getting set to 1. So why no fill?
Do we ever call routing with
ECO_FINISH=1
? It looks like we set it, then exit out. Don't we have to do another pass, applying fill?
That does mean an extra pass through routing. Could ECO remove fill and add buffers?
@Haolin Dong I needed for
-s 0
to work:
Copy code
-parser.add_argument('--skip_pin', '-s', required=True, help='skip input ouput cases')
+parser.add_argument('--skip_pin', '-s', type=int, required=True, help='skip input output cases')
h
@Anton Blanchard Thanks. I will check the code and fix these things.
We skip filling because it may take up all the space so that we are not able to insert buffers.
a
@Haolin Dong Makes sense, but my question was around avoiding a final extra pass to add fill, then do routing. The buffer fixup stage could remove all fill, then add buffers
Assuming you have to add fill before detailed routing
h
I think in our current version, if we disable the eco, then ECO_FINISH will be 1. So the original fill process won’t be skipped.
Is there a difference between setting a signal in routing to skip fill and removing all fill inside eco?
Oh the fill may influence timing behavior?
a
I presume the fill will potentially have DRC issues with routed signals. I'm not sure though
@Haolin Dong I got here because the ECO flow is not adding any fill to my designs. So it is being skipped
h
I see. I’ll check that in a while. I was working on other stuff this morning.
a
Thanks. One other interesting thing I found:
Copy code
insert_buffer io_in[33] BTerm sky130_fd_sc_hd__dlygate4sd3_1 net_HOLD_NET_0_1 U_HOLD_FIX_BUF_0_1
insert_buffer io_in[33] BTerm sky130_fd_sc_hd__dlygate4sd3_1 net_HOLD_NET_0_2 U_HOLD_FIX_BUF_0_2
insert_buffer io_in[33] BTerm sky130_fd_sc_hd__dlygate4sd3_1 net_HOLD_NET_0_3 U_HOLD_FIX_BUF_0_3
...
insert_buffer io_in[33] BTerm sky130_fd_sc_hd__dlygate4sd3_1 net_HOLD_NET_0_97 U_HOLD_FIX_BUF_0_97
insert_buffer io_in[33] BTerm sky130_fd_sc_hd__dlygate4sd3_1 net_HOLD_NET_0_98 U_HOLD_FIX_BUF_0_98
insert_buffer io_in[33] BTerm sky130_fd_sc_hd__dlygate4sd3_1 net_HOLD_NET_0_99 U_HOLD_FIX_BUF_0_99
Ok it's an I/O, but it seems a bit excessive to place 100 buffers on it in a single pass 🙂
h
IO can be fixed by constraints. There is a option for disable BTerms.
a
But regardless, it seems like you should only place 1 buffer on a bad path per iteration right?
h
No, the number of buffers depends on the slack and the routing may slightly influence the slack. If the slack is small then It will insert only one buffer.
a
Ok that makes sense, and yes I now see the negative slack is pretty huge. 14ns of delay in the clock tree
I've seen discussions around Openroad CTS... 14ns seems pretty excessive
m
@Anton Blanchard you can skip input to reg paths by setting a variable (see PR). Those paths needs are showing huge violations because the sdc isn't updated for multicorners timing checks. Do you have reg-to-reg violations?
a
@mehdi Thanks. I saw that, and did enable it because I thought I had to time my I/Os (I want to run a synchronous bus on some of my I/Os). Let me disable it for now and get clean, and then think about any issues with I/Os
Also, when fixing up timing in my macros, I'll need to include the pins I presume. It does make me wonder with these huge CTS delays, how timing of a design with macros is going to pan out
m
Great @Anton Blanchard, regarding the fills: removing them then adding them shouldn't create a DRC problems in sky130. We have done so on our previous design. @Haolin Dong at the last iteration, are you adding back the fills/endcaps etc?
the 4KB was a really poor choice of mine on the mpw-II so if you have time maybe switch back to 2KB or 1KB banks?
a
@mehdi I could reduce the DFFRAM but the macros I'm thinking about are my own multipliers and register file
😯 1
m
your multipliers are custom? are these banks?
a
Custom multiplier
Not custom placed, but uses standard cells
m
I need to run your design at some point this week. Let me know the paths that are failing or your timing reports and we can try to review that. But normally the ECO flow should fix them
a
@mehdi Ok. I need to commit the DFFRAMs, will do that today.
🙏 1
m
do you have a custom data path? and how are you generating .libs for the custom blocks? QTM?
a
This is where I am currently stuck. How do we handle macro timing in openroad/openlane. @Matt Liberty mentioned .lib files the other day but does openroad create them and openlane consume them?
m
I do not think OR is creating them. Maybe @Matt Liberty knows something about that. Also not sure if openlane is calling a tool to do so? I saw the other day a tool for .lib generation for standard cells. I will paste it if I find it.
a
@Haolin Dong I just retested with the latest ECO fixes and I still don't see any fill cells in my final GDS
m
You should look at the rows in the OR GUI to see if there are placement sites. I think the default placement halo around a macro is quite large in OL:
a
Hi @Matt Liberty, it's not just the macro halo. I have a bug here to track it https://github.com/The-OpenROAD-Project/OpenLane/issues/936
m
@Anton Blanchard: @Haolin Dong is working on it. The fix should be simple I am hoping
Have you tried running fill insertion manually and test it?
h
Yes. I've found the error and already come up with a way to solve it. Basically, we need to run routing again when the eco step is done. But I have trouble using
make pdk
to update my open_pdk verison so I am not able to test it. I got the error:
Copy code
Error message output from magic script:                                                                                              /home/haolind/OpenLane/pdks/open_pdks/sky130/sky130A/libs.tech/magic/sky130A.tech: line 19: section version:                                 Error:  Magic version 8.3.260 is required by this techfile, but this version of magic is 8.3.209.                            The following sections of /home/haolind/OpenLane/pdks/open_pdks/sky130/sky130A/libs.tech/magic/sky130A.tech contained errors:            version                                                                                                                          Traceback (most recent call last):                                                                                                     File "../common/foundry_install.py", line 1696, in <module>                                                                            cwd = destlibdir,                                                                                                                  File "../common/foundry_install.py", line 274, in subprocess_run                                                                       raise SystemError("".join(emsg))                                                                                                 SystemError: Command magic failed with exit code: -11                                                                                  magic -dnull -noconsole
@Anton Blanchard Do you have any ideas on this? Thanks!
It seems I have to update the version of magic, but
make build-magic
doesn't help.
m
@Haolin Dong There was recently an update to allow building the pdk in docker. https://skywater-pdk.slack.com/archives/C017HPHCMEY/p1644995964291059
👍 1
h
@Anton Blanchard Hi. I pushed a commit on OLL solving the insfill issue. I hope it can help.
🙌 1