Testcase Template - Test Creation and Setup
Introduction
The aim of this document is to explain how to create a new test archive based on the NX testcase template in order to perform Impulse steps.
Testcase template archive are available on the following link with associated commands:
Testcase Template - User Guide .
Steps
RTL sources import
The user must import all the RTL sources in the src directory.
Project Environment Variables
The 1st file to edit is project_variables.py defining all variables related to the testcase environment.
All available values for each variable are displayed when executing the following command:
nxpython nxpython_script.py -h
Top Cell
DefaultTopCellName: Top Cell Name of the design
DefaultTopCellLib: Top Cell Library of the design
Variant
DefaultVariant: NX chip target for the project
AllowedVariants: List of all NX chip targets compliant with the project
Argument
DefaultArgument: Argument used in sub scripts in order to launch Impulse steps with different options
AllowedArguments: List of all arguments that can be launch
Board
DefaultBoard: Board target for the potential output bitstream
AllowedBoards: List of all allowed boards for the project. A list must be set for each variant.
Progress
DefaultProgressStart: Impulse step the project must start. If not scratch,
DefaultProgressStop: Impulse step the project must stop
Project
DefaultSeed: Seed option for the Impulse placing algorithm
DefaultOptions: Options set to Impulse. Syntax is <name1>.<value1>_<name2>.<value2>_<…>
DefaultTimingDriven: Enable ('Yes') or Disable ('No') TimingDriven option for Impulse placing and routing
DefaultConstraints: Enable ('Yes') or Disable ('No') constraints set in sub_scripts/project_constraints.py
DefaultSta: Impulse steps to launch STA. Syntax is <step1>_<step2>_…
DefaultStaCondition: STA conditions. Last is kept for TimingDriven. Syntax is <cond1>_<cond2>_…
DefaultBitstream: Enable ('Yes') or Disable ('No') bitstream generation
Directory
DefaultSaveInputs: Enable ('Yes') or Disable ('No') scripts and sources in output project folder
Example
Hereafter an example:
#Top Cell
DefaultTopCellName = 'top'
DefaultTopCellLib = 'work'
#Variant
DefaultVariant = 'NG-MEDIUM'
AllowedVariants = ['NG-MEDIUM','NG-MEDIUM-EMBEDDED','NG-LARGE']
#Argument
DefaultArgument = ''
AllowedArguments = ['','debug']
#Board
DefaultBoard = 'DevKit'
AllowedBoards = [['DevKit'],[''],['DevKit']]
#Progress
DefaultProgressStart= 'scratch'
DefaultProgressStop = 'routed3'
#Project
DefaultSeed = '1789'
DefaultOptions = 'DensityEffort.Medium_CongestionEffort.Low'
DefaultTimingDriven = 'Yes'
DefaultConstraints = 'Yes'
DefaultSta = 'placed1_routed3'
DefaultStaCondition = 'typical_worstcase'
DefaultBitstream = 'Yes'
#Directory
DefaultSaveInputs = 'Yes'
Impulse project
Project Files
All design files with associate files must be defined in sub_scripts/project_files.py.
Method arguments
p: Impulse project variable
sources_files_directory: Pointer to src directory
variant: variant name
argument: script argument
Example
Hereafter an example:
from nxpython import *
def add_files(p,sources_files_directory,variant,argument):
p.addFile('work',sources_files_directory+'/switch_counter.vhd')
p.addFile('work',sources_files_directory+'/switch.vhd')
Example using arguments
Hereafter an example using method arguments:
Project Parameters
All design top generics/parameters must be defined in sub_scripts/project_parameters.py.
Method arguments
p: Impulse project variable
variant: variant name
argument: script argument
Example
Hereafter an example:
Example using arguments
Hereafter an example using method arguments:
Project Options
All project options must be defined in sub_scripts/project_options.py.
Method arguments
p: Impulse project variable
variant: variant name
seed: Impulse seed for placing algorithm
options: Impulse options to be set
argument: script argument
Example
Hereafter an example:
Last condition must not be changed.
Example using arguments
Hereafter an example using method arguments:
Project Constraints
All project constraints must be defined in sub_scripts/project_options.py.
Method arguments
p: Impulse project variable
variant: variant name
argument: script argument
sub_step_nb: Impulse sub step index for Synthesizing([1;3]), Placing([1;5]) and Routing([1;3])
All constraints must be under sub_step_nb condition. Otherwise, constraint will be set at each sub step.
Example
Hereafter an example:
add_constraints method must not be changed.
Example using arguments
Hereafter an example using method arguments:
Project IOs
All project constraints must be defined in sub_scripts/project_ios.py.
Method arguments
p: Impulse project variable
variant: variant name
argument: script argument
board: target board to implement the bitstream
Example
Hereafter an example:
Example using arguments
Hereafter an example using method arguments:
Â
© NanoXplore 2022