Skip to content

Latest commit

 

History

History
58 lines (45 loc) · 8.73 KB

filesets.md

File metadata and controls

58 lines (45 loc) · 8.73 KB

FINS Node Filesets

RETURN TO TOP LEVEL README

Filesets are the way that files are categorized and used within a programmable logic IP core. FINS uses the references to these files to automating the IP creation process by code generating vendor IP creation and simulation scripts.

JSON Schema

The top-level filesets field of the FINS Node JSON schema is a dictionary which contains a field for each category of files. Each category in turn has sub-fields for defining the files and their types as described in the table below.

NOTES: Code that is generated by FINS (package files, properties decode module, etc.) must be added to the filesets references in FINS. Don't worry, FINS will perform the code generation before checking that they exist! The indentations indicate another level of hierarchy for the dictionary. For example, the type and path keys are child fields of the source key.

Key Type Required Value Restrictions Description
source dict[] NO An array of synthesizable HDL source file definitions. The top-level source filename without the extension MUST match the FINS Node JSON schema top_source field.
--type string NO dat, fli_library, hex, mif, other, pli_library, system_verilog, system_verilog_encrypt, system_verilog_include, verilog, verilog_encrypt, verilog_include, vhdl, vhdl_encrypt, vpi_library The type of the source file, which only matters for Quartus. If not set, the language is auto-detected based on file extension (".v"=verilog, ".sv"=system_verilog, ".vhd"=vhdl, ".dat"=dat, ".hex"=hex, ".mif"=mif). If not set or detected, the type is assigned as "other".
--path string YES The relative filepath of the source file.
sim dict[] NO An array of testbench HDL simulation file definitions. The top-level testbench filename without the extension MUST match the FINS Node JSON schema top_sim field.
--type string NO dat, fli_library, hex, mif, other, pli_library, system_verilog, system_verilog_encrypt, system_verilog_include, verilog, verilog_encrypt, verilog_include, vhdl, vhdl_encrypt, vpi_library The type of the simulation file, which only matters for Quartus. If not set, the language is auto-detected based on file extension (".v"=verilog, ".sv"=system_verilog, ".vhd"=vhdl, ".dat"=dat, ".hex"=hex, ".mif"=mif). If not set or detected, the type is assigned as "other".
--path string YES The relative filepath of the simulation file.
constraints dict[] NO An array of constraints file definitions.
--type string NO xdc, sdc The language of the constraints file. Vivado uses "xdc" files and Quartus uses "sdc" files. The auto-generated IP creation scripts for each vendor will only use the type that it supports.
--path string YES The relative filepath of the constraints file.
scripts dict NO A dictionary of script file categories. Within each category, the scripts are executed in the order that they are defined.
--vendor_ip dict[] NO An array of vendor IP script definitions. These are scripts that use vendor tool functions to create and parameterize IP cores.
--++type string NO tcl The language of the vendor IP script file. Only TCL is supported since it is executed by vendor tools.
--++path string YES The relative filepath of the vendor IP script file.
--presim dict[] NO An array of pre-simulation script definitions. These are scripts executed by Python, Matlab, Octave, or vendor tools before the simulation is run. An example usage is creating simulation input files.
--++type string NO matlab, octave, python, python3, tcl, cmdline The execution method of the pre-simulation script file. If not set, the execution method is auto-detected based on file extension (".m"=octave, ".py"=python3, ".tcl"=tcl, ".sh"=cmdline). If not set or detected, the type is assigned as "cmdline". Octave is run for files of type "matlab" when MATLAB is not available.
--++path string YES The relative filepath of the pre-simulation script file.
--postsim dict[] NO An array of post-simulation script definitions. These are scripts executed by Python, Matlab, Octave, or vendor tools after the simulation is run. An example usage is verifying simulation output files.
--++type string NO matlab, octave, python, python3, tcl, cmdline The execution method of the post-simulation script file. If not set, the execution method is auto-detected based on file extension (".m"=octave, ".py"=python3, ".tcl"=tcl, ".sh"=cmdline). If not set or detected, the type is assigned as "cmdline". Octave is run for files of type "matlab" when MATLAB is not available.
--++path string YES The relative filepath of the post-simulation script file.
--prebuild dict[] NO An array of pre-build script definitions. These are scripts executed by Python, Matlab, Octave, or vendor tools before the build is run. An example usage is creating coefficient files.
--++type string NO matlab, octave, python, python3, tcl, cmdline The execution method of the pre-build script file. If not set, the execution method is auto-detected based on file extension (".m"=octave, ".py"=python3, ".tcl"=tcl, ".sh"=cmdline). If not set or detected, the type is assigned as "cmdline". Octave is run for files of type "matlab" when MATLAB is not available.
--++path string YES The relative filepath of the pre-build script file.
--postbuild dict[] NO An array of post-build script definitions. These are scripts executed by Python, Matlab, Octave, or vendor tools after the build is run.
--++type string NO matlab, octave, python, python3, tcl, cmdline The execution method of the post-build script file. If not set, the execution method is auto-detected based on file extension (".m"=octave, ".py"=python3, ".tcl"=tcl, ".sh"=cmdline). If not set or detected, the type is assigned as "cmdline". Octave is run for files of type "matlab" when MATLAB is not available.
--++path string YES The relative filepath of the post-build script file.

Code Generation

The filesets definition permit the code generation of the IP build scripts.

For the vivado backend:

  • Makefile: This makefile runs the build and simulation of the IP. All non-TCL scripts are executed by this script.
  • ip_create.tcl: This script builds and packages the IP. The source, sim, and constraints filesets are added to the IP project. The prebuild and postbuild TCL scripts are sourced at the beginning and end of this script, respectively; the vendor_ip scripts are sourced to create vendor IP.
  • ip_simulate.tcl: This script runs the simulation for the IP. The presim and postsim TCL scripts are sourced at the beginning and end of this script, respectively.

For the quartus backend:

  • Makefile: This makefile runs the build and simulation of the IP. All non-TCL scripts are executed by this script.
  • ip_create.tcl: This script builds the packaged IP. The source, sim, and constraints filesets are added to the IP project. The prebuild and postbuild TCL scripts are sourced at the beginning and end of this script, respectively.
  • ip_hw.tcl: This script represents the packaged IP. The vendor_ip scripts are sourced in the "elaboration" callback to create vendor IP.
  • ip_simulate.tcl: This script runs the simulation for the IP. The presim and postsim TCL scripts are sourced at the beginning and end of this script, respectively.

RETURN TO TOP LEVEL README