hello. i'm consistently hitting a segmentation vio...
# openlane
a
hello. i'm consistently hitting a segmentation violation in openroad (during routing i believe). any hints to debug?
just kidding, it's placement:
Copy code
"openroad -exit /openLANE_flow/scripts/openroad/or_replace.tcl |& tee >&@stdout /openLANE_flow/designs/250/runs/debug/logs/placement/replace.log
i'm tryign to tile some macros but i haven't done any manual placement, so that's probably what i'm doing wrong
hmmm, my lef and gds paths seem right. then i do
add_macro_placement mymacro 0 0
followed by
manual_macro_placement f
in interactive mode. then i try to run
run_placement
and i get the segfault. this is on rc3
i tried develop and it gets further! but manual_macro_place.py fails:
Copy code
arya@growly ~ $ cat ~/src/openlane_develop/designs/250/runs/debug/logs/macro_placement.log
Placing the following macros:
{'mac0': ['0', '0', 'NONE']}
Placing  mac0
Traceback (most recent call last):
  File "/openLANE_flow/scripts/manual_macro_place.py", line 77, in <module>
    part_split = part[0].split(" ")
IndexError: list index out of range
wait
is it because of my macro's name?
if i add the macro as follows, it doesn't fail there:
Copy code
add_macro_placement mac_cluster 0 0
manual_macro_placement
ok two further questions: 1. is the macro name the name of the macro type or the instance?
2. if it's the type, how do we arrange instances?
if i use the macro type name, manual_macro_placement doesn't crash. but then replace fails:
Copy code
% run_synthesis; run_floorplan; add_macro_placement mac_cluster 0 0; manual_macro_placement; run_placement
[...]
[INFO] BinSize = (1792850, 1792480)
[INFO] NumBins = 4
[ERROR]  (REPL-0)
Error: RePlAce terminated with errors.
[ERROR]: Failure in global placement
a
You are probably just missing the orientation of the macro (N for North for example). e.g.,
Copy code
add_macro_placement mac_cluster 0 0 N
In any case, non-descriptive errors are always bad...
1 & 2. It's the instance name not the type.
About replace failing, are there any other non-placed cells/macros that you want replace to place? Or have you already placed all macros/cells in the designs manually?
a
hmm, adding 'N' doesn't seem to have solved either problem
rc3 still crashes on run_placement ("segmentation violation")
develop fails at manual_macro_placement:
Copy code
[INFO]:  Manual Macro Placement...
Placing the following macros:
{'my_mac': ['0', '0', 'N']}
Placing  my_mac
Traceback (most recent call last):
  File "/openLANE_flow/scripts/manual_macro_place.py", line 77, in <module>
    part_split = part[0].split(" ")
IndexError: list index out of range
[ERROR]: during executing: "python3 /openLANE_flow/scripts/manual_macro_place.py -i /openLANE_flow/designs/250/runs/debug/results/floorplan/fpga_250.floorplan.def -o /openLANE_flow/designs/250/runs/debug/results/floorplan/fpga_250.floorplan.def.macro_placement.def -c /openLANE_flow/designs/250/runs/debug/tmp/macro_placements.cfg |& tee >&@stdout /openLANE_flow/designs/250/runs/debug/logs/macro_placement.log"
[ERROR]: Exit code: 1
[ERROR]: Last 10 lines:
child process exited abnormally

[ERROR]: Please check python3  log file
[ERROR]: Dumping to /openLANE_flow/designs/250/runs/debug/error.log
a
@aryap: the 'N'(orientation) is optional, you don't need to add it. Of course, seg-faulting is terrible and this should be fixed, blame that on me :-) the search & replace in that script is bad. But could you verify the name of the instance from the def file? and can u share the def file? or a snippet from the components section that defines that instance?
a
ok i think you mean this DEF file?
fpga_250.floorplan.def
in that there's
Copy code
COMPONENTS 170929 ;
    - my_mac mac_cluster ;
when i try to repeat this in rc3, the floorplan.def doesn't have the component instance 🤔
i'll upload the design to my fork of the develop branch
a
@aryap: In rc3, setting EXTRA_LEFS only won't do. You would need to use
add_lefs
additionally. In
develop
, setting EXTRA_LEFS is enough.
a
ah, awesome let me try that
a
@aryap: The manual macro placement (currently) expects you to have an initial placement first, so run
global_placement
first before
manual_macro_placement
.
a
great! still get a segfault though
Copy code
[INFO] FillerInit: FillerCellArea = -nan
[INFO] FillerInit: FillerCellSize = (-nan, -nan)
[ERROR]: during executing: "replace < /openLANE_flow/scripts/replace_gp.tcl |& tee >&@stdout /openLANE_flow/designs/250/runs/debug/logs/placement/replace.log"
[ERROR]: Last 10 lines:
child killed: segmentation violation

[ERROR]: Please check replace  log file
[ERROR]: Dumping to /openLANE_flow/designs/250/runs/debug/error.log

% replace --version
RePlAce Version: 1.0.0
i now do
./flow.tcl -design 250 -overwrite -tag debug -interactive
and run
source_config macro.tcl
where
macro.tcl
is:
Copy code
add_lefs -src /openLANE_flow/designs/250_mac/runs/cluster_750_750_0.3/results/magic/mac_cluster.lef
run_synthesis
run_floorplan

add_macro_placement my_mac 0 0

global_placement

manual_macro_placement
git is being such a pain
a
Could you try with "global_placement_or" instead?
a
Thanks @Ahmed Ghazy. I get a different error, but replace at least doesn't crash:
Copy code
[INFO] MacroInstsArea = 562500000000
[InitialPlace]  Iter: 1 CG Error: 0 HPWL: 190785990
[InitialPlace]  Iter: 2 CG Error: 6.37974e-17 HPWL: 178067944
[InitialPlace]  Iter: 3 CG Error: 0 HPWL: 177995139
[InitialPlace]  Iter: 4 CG Error: 0 HPWL: 177923973
[InitialPlace]  Iter: 5 CG Error: 0 HPWL: 177891540
[INFO] FillerInit: NumGCells = 1
[INFO] FillerInit: NumGNets = 83
[INFO] FillerInit: NumGPins = 131
[INFO] TargetDensity = 0.500000
[INFO] AveragePlaceInstArea = 562500000000
[INFO] IdealBinArea = 1125000019968
[INFO] IdealBinCnt = 9
[INFO] TotalBinArea = 11248041513600
[INFO] BinCnt = (2, 2)
[INFO] BinSize = (1676930, 1676880)
[INFO] NumBins = 4
[ERROR]  (REPL-0)
Error: RePlAce terminated with errors.
[ERROR]: Failure in global placement
is it possible I made the macro wrong?
not sure if related,
run_floorplan
says
[ERROR] Macro my_mac is not placed
seems to be in tapcell.log
maybe the tapcells are blocking the macro placement?
a
@aryap: Floor planning when you have a macro goes as follows: • create an initial floorplan using
init_floorplan
• insert I/O pins with
place_io
• run
global_placement_or
to get an initial placement for macros • either manually or automatically place (fix) the macros (
add_macro_placement
and
manual_macro_placement
in your case) • insert tap cells (
tap_decap_or
), which will also cut the standard cell rows around the fixed macros to prevent rails and other cells from being placed on top of them • proceed with the steps in the usual flow (in
flow.tcl
) starting from
run_placement
.
a
ah! i get it! that fixed it
i had no idea what i was doing before
🙌 1
thank you!