...
It is recommended to rather use python method addMemoryInitialization described in /wiki/spaces/~814749387/pages/48660481 as it is compliant with inferred and instantiated memories.
Please have a look at Impulse 23.1 Training Package : Application Note Init/Ram project.
Memory Inference
In order to infer a memory instead of instantiating a NanoXplore primitive (advantage is the user can choose with the same RTL code to map this memory in RF, RAM, RAM_ECC, … thanks to NXpython constraints), it is recommended to follow TrainingPackage Design/MemInfer examples providing inference for ROM, SRAM, DPRAM with and without ECC.
Please have a look at Impulse 23.1 Training Package : Application Note Design/MemInfer project.
Hierarchy
...
The logic depth of a design must be controlled. the method reportDesignComplexity is very helpful to have an overview.It
Please have a look at Impulse 23.1 NxPython Specification reportDesignComplexity method.
How to use NXpython constrains methods
...
Anchor |
---|
...
|
In order to map an operator into LUT, CY or DSP, follow the following steps:
Launch your design for the first time without constraint.
Grab the operator model or instance in operators.rpt report. For instance, “ | Operator 'add_3u_3u' | : add_L25 (line 25 in …”, model name is “add_3u_3u” and instance name is “add_L25”.
Add the constraint specifying instance to map the operator, for instance “ p.addMappingDirective('getModels(add_3u_3u)','ADD','DSP')” or p.addMappingDirective('getInstances(add_L25)','ADD','DSP')”, and relaunch the project.
Check in operators.rpt report the constraint matched with the desired instance.
Please have a look at Training Package Application Note MappingDirective/Operator project.
...
get complexity for each module of the design, check the detailed hierarchy of the design.
Complexity is given for each module with the sum of the complexity of each sub-module and the module itself.
For instance:
Code Block | ||
---|---|---|
| ||
08:50:49:info | --------------------------------------------
08:50:49:info | - Detailed Hierarchy Statistics -
08:50:49:info | --------------------------------------------
08:50:49:info | ~ hierarchical
08:50:49:info | Resources:
08:50:49:info | NX_LUT : 13
08:50:49:info | NX_DFF : 73
08:50:49:info | NX_IOB : 51
08:50:49:info | NX_BFR : 99
08:50:49:info | NX_WFG : 3
08:50:49:info | ~ |-> row_col_pipe(X212B9C19) [ GEN_HIER0 ]
08:50:49:info | |-> Resources:
08:50:49:info | |-> NX_LUT : 3
08:50:49:info | |-> NX_DFF : 23
08:50:49:info | GEN_HIER0_ROW-0 | |-> timing_pipe(X2A98C8C6) [ GEN_HIER0|GEN_ROW[0].ROW_PIPE ]
08:50:49:info | | |-> Resources:
08:50:49:info | | |-> NX_DFF : 5
08:50:49:info | ~ | |-> timing_pipe(X2A98C8C6) [ GEN_HIER0|GEN_ROW[1].ROW_PIPE ]
08:50:49:info | | |-> Resources:
08:50:49:info | | |-> NX_DFF : 5 |
How to use NXpython constrains methods
Mapping directive
Anchor | ||||
---|---|---|---|---|
|
In order to map an operator into FELUT, RF, RAM or RAM_ECCCY or DSP, follow the following steps:
Launch your design for the first time without constraint.
Grab the memory operator model or instance in memoriesoperators.rpt report. For instance, “ | Ram Operator 'RAMadd_s3u_mem3u' Analysis:| : add_L25 (line 25 in …”, model name is “RAM_s_mem” “add_3u_3u” and instance name is “add_L25”.
Add the constraint specifying instance to map the operator, for instance “ p.addMappingDirective('getModels(RAM_s_memadd_3u_3u)','ADD','DSP')” or p.addMappingDirective('getInstances(add_L25)','RAMADD','RAM_ECC')”, and relaunch the project.
Check in memories.rpt report the constraint matched with the desired instance.
Please have a look at Training Package Application Note MappingDirective/Memory project.
Instance placing
...
In order to place manually an inferred DSP in a CGB spot, follow the following steps:
Launch your design for the first time without constraint.
Grab the DSP name DSP')”, and relaunch the project.
Check in operators.rpt report . For instance, “in line : mult_L28 (line 28 in […]”, name is “mult_L28”.
Add the constraint specifying DSP spot (CGB coordinates and L or R respectively for Left and Right), for instance “p.addDSPLocation('DSP_mult_L28','CGB[8x8]:R')”, and relaunch the project.
Check in preplaced.rpt report the constraint matched with the desired instance.
...
the constraint matched with the desired instance.
Please have a look at Impulse 23.1 Training Package : Application Note MappingDirective/Operator project.
Anchor | ||||
---|---|---|---|---|
|
In order to map an operator into FE, RF, RAM or RAM_ECC, follow the following steps:
Launch your design for the first time without constraint.
Grab the memory model in memories.rpt report. For instance, “ | Ram 'RAM_s_mem' Analysis:”, model name is “RAM_s_mem”.
Add the constraint specifying instance to map the operator, for instance “ p.addMappingDirective('getModels(RAM_s_mem)','RAM','RAM_ECC')”, and relaunch the project.
Check in memories.rpt report the constraint matched with the desired instance.
Please have a look at Impulse 23.1 Training Package : Application Note PlacingConstraint MappingDirective/DspLocation Memory project.
Instance placing
Anchor | ||
---|---|---|
|
...
|
...
|
...
DSP placing
In order to place manually an inferred RAM DSP in a CGB spot, follow the following steps:
Launch your design for the first time without constraint.
Grab the RAM DSP name in memoriesoperators.rpt report. For instance,“ | RAM Generation for g_loop[0].i_RAM_example|s_mem”, name is “g_loop[0].i_RAM_example|s_mem|ram0_0_0_0”“in line : mult_L28 (line 28 in […]”, name is “mult_L28”.
Add the constraint specifying RAM DSP spot (CGB coordinates and L or R respectively for Left and Right), for instance “p.addRAMLocationaddDSPLocation('g_loop[0].i_RAM_example|s_mem|ram0_0_0_0DSP_mult_L28','CGB[8x8]:R')”, and relaunch the project.
Check in preplaced.rpt report the constraint matched with the desired instance.
Info |
---|
In case of direct primitive instance of the RAMDSP, RAM DSP name is the path to the RAMDSP. For instance, p.addRAMLocationaddDSPLocation('module0|submodule1|ramDSP_INST_0','CGB[28x4]:L'). |
Please have a look at Impulse 23.1 Training Package : Application Note PlacingConstraint/RamLocation DspLocation project.
Anchor | ||
---|---|---|
|
...
|
...
|
...
RAM placing
In order to place manually an automatically created WFG inferred RAM in a CKG CGB spot, follow the following steps:
Launch your design for the first time without constraint.
Grab the RAM name in lowskewmemories.rpt report. For instance, “rg~clk_divp2 from instance wfg_B_clk_divp2”, name is “wfg_B_clk_divp2,“ | RAM Generation for g_loop[0].i_RAM_example|s_mem”, name is “g_loop[0].i_RAM_example|s_mem|ram0_0_0_0”.
Add the constraint specifying RAM spot (CGB coordinates), for instance “p.addRingLocationaddRAMLocation(' wfg_B_clk_divp2','CKG3.WFG_C1g_loop[0].i_RAM_example|s_mem|ram0_0_0_0','CGB[8x8]')”, and relaunch the project.
Check in preplaced.rpt report the constraint matched with the desired instance.
Info |
---|
In case of direct primitive instance of the WFG or PLL, WFG or PLL RAM, RAM name is the path to the WFG or PLL. For instance, p.addRingLocation('module0|submodule1|PLL_INST0','CKG3.PLL1') or p.addRingLocationRAM. For instance, p.addRAMLocation('module0|submodule1|WFG_INST0','CKG3.WFG_C1'). |
Note |
In order to place manually a WFG, location must comply with WFG type that is to say Core WFG (WFG_Cx) or Ring WFG (WFG_Rx). Mix WFG (WFG_Mx) can be chosen for either a Core or a Ring signalram','CGB[28x4]'). |
Please have a look at Impulse 23.1 Training Package : Application Note PlacingConstraint/RingLocation project.
...
In order to place manually an inferred TILE instance like DFF, LUT or CY, follow the following steps:
...
Launch your design for the first time without constraint.
...
Grab the register name in RegisterSummary.rpt report or in timing files. For instance, i_cpt_0|s_cpt_out_reg[5]”.
...
Add the constraint specifying TILE spot (TILE coordinates), for instance “p.setSite('i_cpt_0|s_cpt_out_reg[0]','TILE[2x2]'”, and relaunch the project.
...
RamLocation project.
Anchor | ||||
---|---|---|---|---|
|
In order to place manually an automatically created WFG in a CKG spot, follow the following steps:
Launch your design for the first time without constraint.
Grab the RAM name in lowskew.rpt report. For instance, “rg~clk_divp2 from instance wfg_B_clk_divp2”, name is “wfg_B_clk_divp2”.
Add the constraint specifying RAM spot (CGB coordinates), for instance “p.addRingLocation(' wfg_B_clk_divp2','CKG3.WFG_C1')”, and relaunch the project.
Check in preplaced.rpt report the constraint matched with the desired instance.
Info |
---|
In case of direct primitive instance of the WFG or PLL, WFG or PLL name is the path to the WFG or PLL. For instance, p.addRingLocation('module0|submodule1|PLL_INST0','CKG3.PLL1') or p.addRingLocation('module0|submodule1|WFG_INST0','CKG3.WFG_C1'). |
Note |
---|
In order to place manually a WFG, location must comply with WFG type that is to say Core WFG (WFG_Cx) or Ring WFG (WFG_Rx). Mix WFG (WFG_Mx) can be chosen for either a Core or a Ring signal. |
Please have a look at Impulse 23.1 Training Package : Application Note PlacingConstraint/Site RingLocation project.
Floor planning
Anchor |
---|
...
|
...
|
...
|
...
|
...
|
...
|
...
Tile placing
In order to get complexity for each module of the designplace manually an inferred TILE instance like DFF, LUT or CY, follow the following steps:
Launch your design for the first time without constraint.
Grab the module and instance register name in hierarchyRegisterSummary.rpt report or in timing files. For instance, “| |-> timing_pipe(X2A98C8C6) [ GEN_HIER0|GEN_ROW[0].ROW_PIPE ]”, module name is timing_pipe(X2A98C8C6)” and instance name is “ [ GEN_HIER0|GEN_ROW[0].ROW_PIPE i_cpt_0|s_cpt_out_reg[5]”.
Add the constraint specifying TILE spot (TILE coordinates), for instance “p.addModulesetSite('timing_pipe(X2A98C8C6)', 'GEN_HIER0.GEN_ROW[0].ROW_PIPE', 'GEN_HIER0_ROW-%')i_cpt_0|s_cpt_out_reg[0]','TILE[2x2]'”, and relaunch the project.
Check in hierarchypreplaced.rpt report the constraint matched with the desired instance.
Please have a look at Impulse 23.1 Training Package : Application Note PlacingConstraint/Region Site project.
Floor planning
Anchor | ||||
---|---|---|---|---|
|
...
Launch your design for the first time without constraint.
Grab the module name in hierarchy.rpt report. For instance, “| ~ |-> row_col_pipe(X212B9C19) [ GEN_HIER0 ]”, name is “|-> row_col_pipe(X212B9C19) [ GEN_HIER0 ]”.
Add the constraint specifying area coordinates, for instance “p.constrainModule('|-> row_col_pipe(X212B9C19) [ GEN_HIER0 ]','GEN_HIER0_ROW_M','Soft',9,6,2,3,'GEN_HIER0_ROW_R',False)”, and relaunch the project.
Check in hierarchy.rpt report the constraint matched with the desired instance.
Please have a look at at Impulse 23.1 Training Package : Application Note PlacingConstraint/Region project.
...
Launch your design for the first time without constraint.
Grab the source and target register in DOMAIN_<clk1>_to_<clk2>_<progress_step>_<conditions>.timing. For instance, “module0|submodule0|pipe_reg[0].CK” and “module0|submodule0|pipe_reg[1].CK” , names are “module0|submodule0|pipe_reg[0]” and “module0|submodule0|pipe_reg[1]”.
Add the constraint specifying area coordinates, for instance “p.constrainPath('|-> row_col_pipe(X212B9C19) [ GEN_HIER0 ]','PIPE_REG_M','Soft',9,6,2,3,'PIPE_REG_R',False)”, and relaunch the project.
Check in hierarchy.rpt report the constraint matched with the desired instance.
Please have a look at Impulse 23.1 Training Package : Application Note PlacingConstraint/ConstrainPath project.
...
Define the macro IP as the top cell.
Define a minimum aperture and all needed constraints as it was a global project to reach specifications. Save the project file after routed steps.
Run the project until Placing 3/5 step and use saveIP method to save the preplaced IP.
Do not declare the macro IP entity file in the global project. Instead, add the macro IP as a blackbox, specifying coordinates of the top left corner of the macro IP aperture in the global project, for instance “
p.addBlackBox('switch_counter',IP','../switch_counter_preplaced.nymjson','g_inst.i_switch_counter_0:1x8')
”.Check in synthesize. log llog the constraint matched.
Please have a look at Impulse 23.1 Training Package : Application Note PlacingConstraint/Preplace project.
In case of insufficient number of IO in the preplacing IP project, use can use the embedded variant of the same FPGA target.
STA constraints
Anchor | ||||
---|---|---|---|---|
|
...
developCKGs method is active by default, NXmap compute automatically PLL and WFG required frequencies if input clock is declared.
Please have a look at Impulse 23.1 Training Package : Application Note StaConstraint/GeneratedClock project.
...
Grab the clock name getting the hierarchy path to the generated clock.
Add the constraint specifying clock parameters, for instance “p.createGeneratedClock(getClock('clk_main'),getRegisterClock('i_clock_0|counter_reg[0]'), 'clk_fabric',{'DivideBy': 2})”.
Check timing files are created for this new clock domain.
Please have a look at Impulse 23.1 Training Package : Application Note StaConstraint/GeneratedClock project.
...
Launch your design for the first time without constraint.
Grab the source and target register in DOMAIN_<clk1>_to_<clk2>_<progress_step>_<conditions>.timing. For instance, “module0|submodule0|pipe_reg[0].CK” and “module0|submodule0|pipe_reg[1].CK” , names are “module0|submodule0|pipe_reg[0]” and “module0|submodule0|pipe_reg[1]”.
Add the constraint specifying area coordinates, for instance “p.addFalsePath('getRegisters(module0|submodule0|pipe_reg[0])','getRegisters(module0|submodule0|pipe_reg[0])')”, and relaunch the project.
Check in DOMAIN_<clk1>_to_<clk2>_<progress_step>_<conditions>.timingt report the path no longer appears.
Please have a look at Impulse 23.1 Training Package : Application Note StaConstraint/FalsePath project.
...