Writing a Pin Order Configuration
Section 3.3.1 established the side assignment plan for counter8: control signals on the west edge and the count bus on the east edge.
This article creates the configuration file required by OpenLane to enforce this placement.
Pin Order File Format
OpenLane uses the FP_PIN_ORDER_CFG mechanism to read pin placements from a text file.
The file organizes pin names under cardinal section headers: #N, #S, #E, and #W.
Empty sections leave corresponding die boundaries free of pins.
Pins appear along the die edge in the listed order.
Create pin_order.cfg for counter8:
# pin_order.cfg for counter8
# Control cluster (clk, rst_n, en) grouped on the west side.
# count[7:0] bus kept together, in bit order, on the east side.
#N
#S
#E
count[7]
count[6]
count[5]
count[4]
count[3]
count[2]
count[1]
count[0]
#W
clk
rst_n
en
Listing count[7] down to count[0] enforces a monotonic bit sequence along the perimeter.
This ordering keeps the physical bus tracks parallel and minimizes interconnect crossover.
Integrating Pin Order in config.json
Place the configuration file in the design directory (designs/counter8/pin_order.cfg).
Reference this file in config.json:
{
"DESIGN_NAME": "counter8",
"FP_PIN_ORDER_CFG": "dir::pin_order.cfg",
"FP_IO_MODE": 0
}
Setting FP_IO_MODE: 0 activates explicit pin placement using the configuration file.
This setting overrides the default automated equidistant mode.
Executing I/O Placement
Execute the floorplan stage in interactive mode:
% prep -design counter8
% run_floorplan
[INFO]: Generating floorplan...
[INFO]: Core area set to 5.00 5.00 45.00 45.00 (die 0.00 0.00 50.00 50.00)
[INFO]: Generating power distribution network...
[INFO]: Placing I/O pins using FP_PIN_ORDER_CFG: pin_order.cfg
[INFO]: West: clk, rst_n, en (3 pins)
[INFO]: East: count[7], count[6], count[5], count[4], count[3], count[2], count[1], count[0] (8 pins)
[INFO]: North: (0 pins)
[INFO]: South: (0 pins)
[INFO]: Writing floorplan DEF to runs/<tag>/results/floorplan/counter8.floorplan.def
The output DEF file records physical coordinates and layer assignments for all 11 pins in the PINS section.
OpenLane verifies that all listed pins match the Verilog port declarations.
If a port name contains a syntax error or invalid bit index, OpenLane reports an error and halts execution.
Practice Exercise
Write a pin order configuration file for a design with ports clk, data_in[3:0], and data_out[3:0].
Place inputs and outputs on opposite sides to reflect dataflow.
Solution
#N
#S
clk
#E
data_out[3]
data_out[2]
data_out[1]
data_out[0]
#W
data_in[3]
data_in[2]
data_in[1]
data_in[0]
Placing data_in on the west and data_out on the east reflects internal signal flow.
Assigning clk to the south edge isolates global clock distribution from parallel data buses.
I/O pin assignments are complete. Section 3.4 examines macro placement and physical obstruction halos.