Let's start a thread with questions for the meetin...
# caravel
m
Let's start a thread with questions for the meeting tomorrow
Power connections
Clocking
How to harden the whole thing
t
How reproductible does the build need to be ? For instance, I might need patch to openlane or manual intermediate fixups on def/gds to actually get a design that meets DRC.
d
Adding to @tnt’s question, I recently updated my openlane branch to latest
develop
which also updated OpenROAD, which for the same config resulted in 10K+ extra DRC violations, no config changes made in between Is the openlane / openROAD verison used to do the automatic precheck going to be fixed and if so, when can we expect it? (hard to patch things if needed otherwise)
Feels like we'd be chasing a moving target otherwise
m
remember to record the call for people who can't make it
vid will be posted sometime on youtube
t
Any good infos ?
m
yeah
info on how to do the final hardening
it's all in makefiles inside the caravel repo
so if you can get your design hardened it looks pretty straight forward
I asked your questions and my understanding was that it won't be a problem to used patch tools, but they would like PRs if they're fixing bugs
t
Does it have to be a single macro or if you have several macro and just need "wiring" between them, can that be done at the top level ?
m
hm, I should have asked that.
I've been working on making my multi project macro first. And then that will be done within caravel.
so I think single macro (maybe @Ahmed Ghazy can confirm0
)
a
@tnt, @Matt Venn: Yes, you need a single macro named "user_project_wrapper", but you can have as many macros routed in whatever way you like inside. Or do you mean outside the user project area?
m
I think Sylvain's design is 3 blocks: 2 srams and a usb core. So I think he'll be doing the same that I am. Combining all together like the multiple macro example. Then that final macro is the one we use to replace user_project_wrapper
t
Yeah one of the block is the usb_core but there will possibly be a couple of smaller one or glue logic but ... given how hard it is to harden the USB ones, once I get a GDS, I'm not touching so I need to integrate it as a pre-made block 😅
a
@tnt: Sounds good. I imagine the hierarchy would be like that:
Copy code
user_project_wrapper
    |
    |_ usb_core
    |
    |_ SRAM0
    |
    |_ SRAM1
    |
    |_ some standard cells
Right?
t
No more like :
Copy code
user_project_wrapper
Copy code
user_project_wrapper
Damnit ... let me use paste bin ..
So the usb core I'm hardeding includes the SRAM it needs internally.
But given my experience with mixing macro and standard cells, I'd rather avoid that as much as possible. Just harder all the standard cell stuff by itself with just top level ports to be connected to the macro and then just assemble all macros together.
a
@tnt: Got it. I can think of some challenges routing power to usb_core though if you already use metal 5 for its internal power grid.
t
Well how else am I supposed to do it ?
that's how the power grid is generated.
m
I'm doing this:
set ::env(DESIGN_IS_CORE) 0
will only generate power stripes on met4.
t
So you only get the vertical ones ?
m
on the sub designs. Then when I link them together it uses metal5 for the routing
I think it reserves all of metal5
a
@tnt: Is there anyway you could restructure it such that the SRAM blocks would be directly under the wrapper?
any way*\
t
Well there is always a way but it's a major pain, basically to modify all the verilog files to bring all the signals up to the top level.
Not being able to instanciate macro inside of code following a proper hierarchy seems like a major blocker to re-use any kind of existing IP without major restructuring.
I can remov the metal layer5 but then LVS won't pass because the SRAM won't be powered.
a
The issue is that the SRAM block (the wrapper we created) has two met4 stripes for power connections. If you want to automate that connection, the only way to do it (right now) is to drop vias from met5 from whatever macro that contains it (see the storage area and mgmt_core blocks).
But then if you do that, usb_core will be using up met5 and so you cannot do the same thing automatically from the above level.
t
An if I don't do it, wont the top level drop via to those when doing the final route ?
I mean presumably it's going to drop via from met5 down to all the vertical power bars over the std area.
a
If you don't do that, then you can power usb_core by dropping vias (met5->met4) from the top-level, but then the SRAM blocks wouldn't be powered automatically while hardening usb_core.
t
Sure, but I'm fine with that.
LVS will fail but I know it passes when powered so I know I get 6 net differences which are the 2 * 3 power ping ...
a
I can look into an alternative using power rings and drawing it just outside the macro boundaries so that u can still drop vias from above without actually intersecting the macro.
But that's after getting the caravel layout done...
m
I'm also interested in an easy solution to this. I was thinking of doing a framebuffer/vga driver that I can control from SoC
and use an sram block for the framebuffer
t
I mean, I can also manually draw giant power rails on met4 to connect to the vertical rails of the standard grid. (which was my original plan).
Ideally what I'd need is a way to insert my own 'custom' script between two steps of the flow that would be used to draw those after the PDN generation.
a
@tnt: You can do that as well but adjusting the right PDN pitches/offsets. You can use an interactive script to achieve the second solution as well.
Just brainstorming, but another solution is to modify the SRAM wrapper and create met3 horizontal stripes to support up to 3 levels of hierarchy...
t

https://i.imgur.com/yDxTNxn.png

This is the current hack I've been using btw.
a
Hm? Are you referring to the horizontal met5 stripe?
t
Yeah, normally they only go above the standard cell part ... here I forced them to go higher.
(because
ROW
are cut early on,
pdngen
will only generate the grid where there are
ROW
)
a
This is already possible automatically though?
t
I have no idea how that worked for them. I actually think it might be because they are vertical ... so they actually have
ROW
covering the whole
Y
span ...
but also that core has no logic whatsoever, it's just wires.
a
pdngen will only generate the rails where there are ROWS, but it should generate the stripes anyway unless some metal layer is set as an obstruction at https://github.com/RTimothyEdwards/open_pdks/blob/master/sky130/openlane/common_pdn.tcl.
t
It most definitely doesn't.
And I overwrite
macro_blockage_layer_list
in my custom
pdn
config and removed
met5
from that list.
a
Hmm, could you compare your custom pdn config with this: https://github.com/efabless/caravel/blob/release/openlane/storage/pdn.tcl?
mainly the second block
t
Yeah I based mine on that : https://pastebin.com/ghkE6CSp
a
You need
#	connect {{met4_PIN_ver met5}}
uncommented though.
t
It throws an error if I do that
And it did connect ...
The default PdnGen doesn't even consider any of the macro because of : https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/pdngen/src/PdnGen.tcl#L2533
It looks if they fall in the boundary which is
set boundary [odb::newSetFromRect {*}[get_core_area]]
and
get_core_area
is defined as
get_stdcell_area
and so all the macros fall outside of it and it does nothing.
That's the default behavior and nothing I do or make in the
macro
part of the config changes anything.
a
Oh, I see... Sounds like a wrong assumption there, so if macros block entire rows, they wouldn't be considered.
t
But in any case what you're saying is I shouldn't have those
met5
horizontal lines anyway so ... doesn't really matter.
Looks like triton route also used
met5
though.
a
Yea, you could set the maximum routing layer to prevent that.
t
If I have
met4
vertical lines going all the way down, will pdngen connect them to the rails ?
a
Do you mean a met4 vertical stripe from a top-level block onto the rails of macro inside it?
t
So, what I was thinking is to manually create in teh DEF before PDN a
met4
vertical stripe that would "continue" the ones already in the macro and that would go all the way to the bottom.
Then if the PDN connects those when it creates the grid, the SRAM would end up powered ...
a
Hm, I see. I guess it only considers its internal data structures, so the created from within.
t
Ok, so I'd need to do that after PDN and then create the vias through all the layers myself.
I'm wondering if OpenDB has some helper for that or if I really need to create all the shapes and multi part-vias myself
For me I think it's fine to have some manual steps, it's mostly knowing how to plug them all cleanly.
interactive
is nice but I'd rather have hooks where I can plug custom stuff during the flow than having to do each step by hand.