I just ran the precheck and the XOR check found a ...
# caravan
j
I just ran the precheck and the XOR check found a difference. How can I find out what the actual difference is? I've checked  
checks/
 and to be honest, couldn't get much from them except there's exactly 1 discrepancy. I couldn't see anything on the
.png
either. Since the
full_log.log
is quite long, here's a snippet of the relevant section:
Copy code
Step 4 done without fatal errors.
 Executing Step 5 of 6: Executing XOR Consistency Checks.
 Running XOR Checks...
Total XOR differences = 1
 XOR Checks on GDS Failed, Reason: XOR Differences count is 1. Please view /tmp/kustinj/ee272bclone/caravel_user_project_analog/checks/*.xor.* for more details.
TEST FAILED AT STEP 5
I've opened up the .xor.gds, selected the top cell (XOR), and tried to select any paint and could select none. Specifically, what does
Copy code
XOR differences: 1
"_output" in: xor.drc:41
Elapsed: 0.010s
mean?
t
I assume that the xor.gds file is small? If so, can you post it? There could be layers like HVI that are not represented in the sky130A.tech magic techfile; you can also try reading the file in magic using the sky130A-GDS.tech file, which displays all layers.
j
It is small. I'll post it right now
user_analog_project_wrapper.xor.gds
@Tim Edwards after changing my design I am retrying the precheck. This time I get more errors, but now I can't open the
.xor.gds
file. When I try to read in the gds I get:
Copy code
Error while reading cell "XOR" (byte position 43570): Unknown layer/datatype in boundary, layer=81 type=14
My steps before this were:
Copy code
magic ../caravel_user_project_analog/checks/user_analog_project_wrapper.xor.gds &
tech load ../open_pdks/sky130A/libs.tech/magic/sky130A-GDS.tech
File -> Read GDS -> ../caravel_user_project_analog/checks/user_analog_project_wrapper.xor.gds
t
This is not a cause for failure to open/read a file; it's just mentioning a GDS layer:purpose pair that it does not handle, which is okay. Generally, it's better to read an xor.gds file into klayout, or else use the magic "sky130A-GDS.tech" tech file, which represents many more layers. The 81:14 layer is "low tap density" which is supposed to be placed over the whole central area of the chip, 50um inside the padframe edge. This layer represents the area in which tap spacing can be set to 15um. The layer should be generated automatically for the chip top level and should not be the responsibility of the user (the user area is all 50um within the padframe edge, due to power routing). Is that the only layer inside the xor.gds file?
j
I tried opening the file like so
Copy code
magic -T ../open_pdks/sky130A/libs.tech/magic/sky130A-GDS.tech ../caravel_user_project_analog/checks/user_analog_project_wrapper.xor.gds &
and I get an
(UNNAMED)
cell view.
I just tried opening by
Copy code
magic &
tech load ../open_pdks/sky130A/libs.tech/magic/sky130A-GDS.tech
File -> Read GDS -> ../caravel_user_project_analog/checks/user_analog_project_wrapper.xor.gds
and now I see the XOR cell. The other layers are: MET2 MET3 BOUND
The XOR view shows all of the IO pads but nothing inside of the BOUND. Does this mean the pads are overstepping the user area?
BTW @Tim Edwards when I run
make xor-analog-wrapper
I get an XOR result w/ 0 differences, which is different than what I get after running
make run-precheck
. Am I failing to update the relevant gds files in the proper directories? Right now I have moved my gds to
caravel_user_project_analog/gds
and
caravel_user_project_analog/caravel/gds
I opened the
.xor.gds
produced by
run-precheck
in klayout and the visible layers are 69/20, 70/20, 81/14, 235/4. How should I interpret this result / go about fixing it?
I'm looking up the layer names here https://skywater-pdk.readthedocs.io/en/latest/rules/layers.html#gds-layers-information and can see the xor shows a M2 difference on the bottom row of pins, a M3 difference on the left, top, right side pins, the low tap density area, and the pRboundary (does this mean place and route boundary??)
I started my layout from
user_analog_project_wrapper_empty.mag
, so the pads should have no issue with them, right? Maybe I messed them up during my layout?
t
The errors do suggest that the design went out-of-bounds and extended into the management area, which it is not supposed to do. BTW, not getting a cell when you read GDS just means that the GDS was written as a library and does not indicate a top-level cell. So you need to do "cellname top" to list all top-level cells and load the one that is appropriate (probably there is only one).
j
You know the comment layer on the magic template? Should the pins be crossing that line?
I looked up the llx, lly of one of the M2 areas in the XOR gds and went to the same spot in my layout and found that that pin was always crossing over the boundary. The pin I used for this investigation is
wb_clk_i
and a box of the offending area in the XOR is drawn over my layout here:
I never went near this area of the harness.
t
Then that indicates that whatever it is being checked against does not have a pin there. That might simply be because there isn't yet a valid top-level layout for the caravan chip. You can ask Jeff DiCorpo if you should expect to see XOR errors from the caravan user project.
j
Ok. What's the best way to contact him?
t
Through Slack.
m
@John Kustin The
235/4
layer is the pr.Boundary, I think it is missing from your design because you don't have the FIXED_BBOX property in the mag file https://github.com/efabless/caravel_user_project_analog/blob/main/mag/user_analog_project_wrapper.mag#L2304. I think the other differences could be caused if you don't have an origin of (0,0). You can check on the origin by running
set bbox [box values]
in magic. If the lower x and lower y values aren't 0 0, you can move the origin by running the following:
Copy code
set bbox [box values]
set offset_x [lindex $bbox 0]
set offset_y [lindex $bbox 1]
move origin [expr {$offset_x/2}] [expr {$offset_y/2}]
property FIXED_BBOX [box values]
j
@Manar Abdelatty I checked my mag file
user_analog_project_wrapper.mag
and found it does have the FIXED_BBOX property:
Copy code
<< properties >>
string FIXED_BBOX 0 0 584000 704000
<< end >>
The bbox initially had its lower left corner at -800i, -800i. I followed your steps and now the FIXED_BBOX property shows
Copy code
{FIXED_BBOX 0 0 585600 705600}
I tried the precheck once more and I still get mismatches. I will add that it seems odd for me to change something like the origin when I start from the provided
user_analog_project_wrapper_empty.mag
. Thanks for your suggestions though!
t
I'm looking at the
caravel_user_project_analog
repository, and the FIXED_BBOX values for the
user_analog_project_wrapper_empty.mag
layout are
0 0 292000 352000
(this is scaled by 1/2 from what Manar posted for
user_analog_project_wrapper.mag
due to a scalefactor of 2 at the top of the file, so they are equivalent). There is no offset at the corner.
j
I reached out to Jeff DiCorpo about whether or not I should expect any XOR errors from the caravan user project. Until I hear back is there anything you'd recommend trying?
t
Since it appears something got shifted, you can grab the original
user_analog_project_wrapper_empty
cell from the
caravel
repository and overlay it on your design and see if the pins align. It's possible that somehow part of your layout got shifted, in which case moving the origin back to zero won't make things any better. You could also just drop a fresh copy of the empty wrapper into your design and then splice your design into it (carefully). This assumes that the problem originated in your layout. The evidence points to that but it is by no means certain, so you might not want to do something quite so radical until we're certain of that.
j
I think you're right... something was shifted. I don't remember what but now the XOR check passes. I'm pretty sure the issue was on my side.