Electronic – Specify exact pin locations on FPGA

fpgaintel-fpgapins

I have an Altera Cyclone IV FPGA, and I use the Quartus II software as the compiler.

In the "PinPlanner" it is possible to specify groups of pins (e.g. data buses). For each group, an I/O bank and an I/O standard (e.g. LVDS) can be specified. Then, the fitter (place and route) provides specific "Fitter Locations", specifying a precise pin for each individual wire.

Is there a way to specify the precise pin locations before the fitter attempts to fit the pins within each bank for me? Can this be done in the Pin lanner?

Best Answer

There are two ways of specifying PIN assignment — you can either use PinPlanner or set_location_assignment to specify the PIN along with set_instance_assignment to specify the IO standard.

I recommend you read I/O Management documentation from Altera. But here are few examples:

These are location assignments for 1 GbE RGMII Ethernet Interface:

set_location_assignment PIN_D25 -to eth_tx_clk
set_location_assignment PIN_V6 -to eth_rx_clk
set_location_assignment PIN_D17 -to eth_rx_c
set_location_assignment PIN_G20 -to eth_tx_c
set_location_assignment PIN_M20 -to eth_reset_n
set_location_assignment PIN_E21 -to eth_rx_q[0]
set_location_assignment PIN_E24 -to eth_rx_q[1]
set_location_assignment PIN_E22 -to eth_rx_q[2]
set_location_assignment PIN_F24 -to eth_rx_q[3]
set_location_assignment PIN_J20 -to eth_tx_q[0]
set_location_assignment PIN_C25 -to eth_tx_q[1]
set_location_assignment PIN_G22 -to eth_tx_q[2]
set_location_assignment PIN_G21 -to eth_tx_q[3]

set_instance_assignment -name IO_STANDARD "2.5 V" -to eth_rx_c
set_instance_assignment -name IO_STANDARD "2.5 V" -to eth_tx_c
set_instance_assignment -name IO_STANDARD "2.5 V" -to eth_tx_clk
set_instance_assignment -name IO_STANDARD "2.5 V" -to eth_rx_clk
set_instance_assignment -name IO_STANDARD "2.5 V" -to eth_rx_q
set_instance_assignment -name IO_STANDARD "2.5 V" -to eth_reset_n
set_instance_assignment -name IO_STANDARD "2.5 V" -to eth_tx_q

And here is an LVDS clock input to FPGA:

set_instance_assignment -name IO_STANDARD LVDS -to in_clk_100
set_location_assignment PIN_AJ19 -to in_clk_100
set_location_assignment PIN_AK19 -to "in_clk_100(n)"

Hope it helps. Good Luck!