Modify Floorplan
Generate or modify floorplan.tcl and/or io_floorplan.tcl based on user's natural language description.
Arguments: $ARGUMENTS = natural language description of the desired changes.
Examples:
"Change core size to 200x100 um with 10um offset""Put all DAC pins on the top edge, clock and control on the right""Increase die size by 20% in both dimensions"fc/scripts/setup.tcl file starting from the current directory.fc/scripts/setup.tcl to extract DESIGN_NAME and PROJECT_PATH.fc/scripts/floorplan.tcl and fc/scripts/io_floorplan.tcl to understand existing settings.hdl/ to get the complete list of ports (input/output/inout with bit widths).Parse current floorplan.tcl for:
initialize_floorplan arguments: core_offset and side_lengthParse current io_floorplan.tcl for:
place_port, place_pin_group, set_individual_pin_constraints)When the user asks to change the die or core size:
Calculate new dimensions:
side_length {WIDTH HEIGHT}Update initialize_floorplan in floorplan.tcl:
initialize_floorplan -control_type core \
-core_offset {LEFT BOTTOM RIGHT TOP} \
-shape R \
-side_length {WIDTH HEIGHT}
If die size changes significantly, PG ring/mesh may need adjustment:
When the user describes pin arrangements:
Parse the RTL to get all port names and widths:
grep -E '^\s*(input|output|inout)' $PROJECT_PATH/hdl/*.v
Map user description to pin groups and edges:
sw_vrefp_a[*] together)Calculate spacing:
Generate TCL using the helper procs from the existing io_floorplan.tcl:
proc place_port {name layer side offset width} { ... }
proc place_pin_group {pins side start step width layers} { ... }
Layer alternation:
Generate new versions of the modified files (do not overwrite directly):
fc/scripts/floorplan_new.tcl and/or fc/scripts/io_floorplan_new.tclAfter confirmation:
# Backup originals
cp $PROJECT_PATH/fc/scripts/floorplan.tcl $PROJECT_PATH/fc/scripts/floorplan_$(date +%Y%m%d_%H%M%S).tcl.bak
cp $PROJECT_PATH/fc/scripts/io_floorplan.tcl $PROJECT_PATH/fc/scripts/io_floorplan_$(date +%Y%m%d_%H%M%S).tcl.bak
# Replace
mv $PROJECT_PATH/fc/scripts/floorplan_new.tcl $PROJECT_PATH/fc/scripts/floorplan.tcl
mv $PROJECT_PATH/fc/scripts/io_floorplan_new.tcl $PROJECT_PATH/fc/scripts/io_floorplan.tcl
After generating new floorplan scripts, verify:
Present validation results:
=== Floorplan Validation ===
| Check | Status |
|--------------------------|--------|
| All ports assigned | OK |
| No pin overlaps | OK |
| Pins within boundary | OK |
| Minimum pitch satisfied | OK |
| PG ring clearance | OK |