Closed armleo closed 2 years ago
Your pin is off the manufacturing grid:
- fastio_in[16] + NET fastio_in[16] + DIRECTION INPUT + USE SIGNAL
+ PORT
+ LAYER met2 ( -140 -2000 ) ( 140 2000 )
+ FIXED ( 122434 3193985 ) N ;
See "MANUFACTURINGGRID 0.005 ;" in your LEF. The X coordinate is not a multiple of 5. Since the pin shape itself is illegal no valid access can be made to it.
How was your pin placement generated?
@maliberty The DEF was generated by OpenROAD script. Interactive.py which calls io_place.tcl. All of this is in carrack_wrapper workspace.
I called place_pin w/ 329.99000 - 189.52 + 69.785 + 0.28 as X. Pin length = 4; pin_width 0.56.
How is it possible?
But thanks for debugging this. I check a couple of pins X-es and saw that they were aligned, so I assumed all of them were. My mistake. But then why OpenROAD-s generated odb is invalid? If I had to guess. Float rounding error, but still strange
Your script is quite complicated and hard to follow. However 122.434 from DEF is nowhere near puts [expr 329.99000 - 189.52 + 69.785 + 0.28] 210.535
So you must have a bug. That isn't rounding error.
I think you are looking at the wrong pin:
puts [expr 241.89 - 189.52 + 69.785 + 0.28] 122.43499999999997
shows the issue. Try
set pos [expr 241.89 - 189.52 + 69.785 + 0.28]
puts [expr round($pos * 1000) / 1000.0]
122.435
I think it was fixed. Found the code line: https://github.com/The-OpenROAD-Project/OpenROAD/blob/9afb4fd0ca5fe8568c32aac33847211b9689800a/src/ppl/src/IOPlacer.tcl#L288
How to know if this commit made to the OpenRoad used by me?
Thanks for suggestion. I was trying to solve this for around 30 days. Absolutely insane bug 😄
Where we can put this information so other people won't encounter this issue again, and don't have to spend 30 days debugging this? My proposal: In ODB give a warning that the DEF pin is missaligned on the grid. But this warning has to wait, I still have plenty of issue to solve. Please keep this issue open. I will implement the warning myself.
EDA layout tools generally use integer DBU to avoid such floating point issues (see https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/docs/contrib/DatabaseMath.md).
The router has an internal check but it is more to make sure that it isn't creating such problems rather than checking user inputs. We could apply it to the user pins as a pre-check. I'll open an issue for that.
I'm not sure about your link to IOPlacer.tcl. The issue was in your or_ioplace.tcl script.
@maliberty
Hi,
Issue still persists. Called:
place_pin -pin_name "wbs_sel_i[1]" -layer met2 -location [list 516.67 2.0] -pin_size [list $met2_pin_width $pin_length]
Trace log:
{place_pin -pin_name {wbs_sel_i[1]} -layer met2 -location {516.67 2.0} -pin_size {0.28 4.0}} enter
[INFO PPL-0070] Pin wbs_sel_i[1] placed at (516um, 2um).
Which results in following lines in DEF:
- wbs_sel_i[1] + NET wbs_sel_i[1] + DIRECTION INPUT + USE SIGNAL
+ PORT
+ LAYER met2 ( -140 -2000 ) ( 140 2000 )
+ FIXED ( 516669 2000 ) N ;
Second: Call:
{place_pin -pin_name {fastio_strong_enable[25]} -layer met2 -location {2.0 512.915} -pin_size {4 0.28}} enter
[INFO PPL-0070] Pin fastio_strong_enable[25] placed at (2um, 512um).
- fastio_strong_enable[25] + NET fastio_strong_enable[25] + DIRECTION OUTPUT + USE SIGNAL
+ PORT
+ LAYER met2 ( -2000 -140 ) ( 2000 140 )
+ FIXED ( 2000 512914 ) N ;
Should I create an issue in OpenROAD? I am so confused why this is happening. Am I doing something wrong or a bug? I am second guessing myself.
Workaround: Call fix_rounding_error on all numbers. It adds 0.0004 which forces it to behave correctly.
proc fix_rounding_error {num} {
set return_value [expr round(($num) * 1000 / 5) / 200.0 + 0.0004]
return $return_value
}
I just tried
place_pin -pin_name {clk} -layer met2 -location {2.0 512.915} -pin_size {4 0.28}
write_def foo.def
and see
PINS 54 ;
- clk + NET clk + DIRECTION INPUT + USE SIGNAL
+ PORT
+ LAYER met2 ( -2000 -140 ) ( 2000 140 )
+ FIXED ( 2000 512915 ) N ;
so I can't reproduce your issue. Please try with the latest openroad.
Could you try the mpw5a version? I am not not upstream version.
I only fix issues at the head of master. It is up to the mpw team to update versions (@donn )
Okay. Just so you know, this is not critical right now, as a workaround has been made. For upstream I will implement a warning for this in the current apply def template. As for OpenRoad, you already created an issue.
wrong issue. sorry.
Description
mpw5a caravel based OpenLane installation. OpenLane errors out: [ERROR DRT-0074] No ap for PIN/fastio_in[16].
I examined DEF/GDS and everything. There seems no reason for this to happen.
Things I checked:
Things I didn't check: Should the pins be located on some grid? Didn't find any information about this. If so, where is it documented?
Why I am trying to use a DEF and not locations generated by OpenLane pin config? Because I can't specify specific locations of the pins, including metal, spacing and width in any other way.
UPD: Tried shifting some pins by 10nm in case of OpenLane generated DEF. Still succesful, so GRID issue is not likely.
Environment
Reproduction Material
tar gz containing two designs
carrack_wrapper
: carrack_wrapper.tar.gzcarrack wrapper is the workspace used to generate the def with command:
./flow.tcl -interactive -file designs/carrack_wrapper/interactive.tcl
carrack_wrapper_user
: carrack_wrapper_user.tar.gzcarrack_wrapper_user is design that errors out command:
./flow.tcl -design carrack_wrapper_user -tag carrack_wrapper_user -overwrite
Manually generated or_issue archive: or_issue.tar.gz
or_issue command: python3 ./scripts/or_issue.py -s scripts/openroad/droute.tcl /openlane/designs/carrack_wrapper_user/runs/carrack_wrapper_user/tmp/routing/17-addspacers.def
Successful runs (see "thing I checked") are not included. Reproduction takes about 1 hour and 2GB of space.
Expected behavior
No error and properly placed PnR GDS with pins from my def as an output :)
Logs