For complex designs, it can be advantageous to guide the NoC compiler by floorplanning the NoC and constraining the NMU/NSU endpoints to specific physical locations. There are several ways to constrain NMU/NSU endpoints including using the IP integrator. You can use the GUI as shown in the following figures.
- Select the NMU/NSU on the NoC Objects pane.
- In the NoC Cell Properties pane, click the ellipses (…) to the right of NoC Site Constraint. A Choose NoC Sites window appears.
- Select the sites to constrain to in the Choose NoC
Sites window.Note: you can choose a subset of sites by choosing more than one.
This operation is equivalent to using the following Tcl command:
set_property -dict [list CONFIG.PHYSICAL_LOC {NOC2_NMU512_X4Y8}] [get_bd_intf_pins /axi_noc2_2/S00_AXI]]
Constraining sites in this way is taken into consideration when running
validate_bd_design.
When using the modular NoC flow, the following Tcl command can be used to set a location constraint:
set_property LOCATION NOC_NMU512_X1Y1 <instance>
These location constraints are picked up by the NoC compiler when running
validate_noc. For additional context on setting constraints when
using the Modular NoC flow, see the basic and advanced tutorials on the subject.
Setting constraints using the above methods allows the impact of these constraints to inform the NoC compiler and feed into simulation. Additionally, the tools translate these constraints into LOC constraints, which are used by the placer.
To explicitly add location constraints to be used by the placer, or to override the constraints provided above during design entry, use the following Tcl command.
set_property LOC NOC2_NMU512_X0Y2 [get_cells design_1_i/axi_noc2_1/inst/S00_AXI_nmu/bd_6f26_S00_AXI_nmu_0_top_INST/NOC2_NMU512_INST]
These constraints can be placed into an XDC, and changing them only requires implementation (placement) to be re-run.
It is possible to extract the LOC constraints from an existing implemented design or a placed/routed checkpoint. The following example Tcl script provides the locations of all the NoC NMU and NSU ports in the design.
set NOC [get_cells -quiet -hierarchical -filter { PRIMITIVE_TYPE =~ ADVANCED.NOC.*}]
foreach i $NOC {
set LOC [get_property LOC [get_cells "$i"]]
puts "Location of NoC port $i is $LOC"
}
The list generated by this script can be used as a basis to create LOC constraints to place into an XDC, which is another way of locking down the NoC placement to ensure repeatability of the solution.