Navigation
GitHub
CoreLib
Links
Sponsors
Notes
This wiki uses icons from icons8.com licensed under CC BY-ND 3.0.
This wiki uses icons from icons8.com licensed under CC BY-ND 3.0.
Author | Patrick Lehmann |
---|---|
Last Update | 13.09.2016 |
Related Proposals |
Many implementations or work-arounds are vendor, tool or target-platform dependent. This proposal suggests a package named config
,
which abstracts the extraction of vendor, tool and target-platform properties from a simple configuration string. A user specifies a device
or board
string, which is decoded into several target specific properties like device family, device generation. These information are provide by a global constant to all packages and entities in a project.
Package can use this information to enable special work-arounds. Entities can choose better suitable implementations of IP cores to create better hardware for the choosen target-platform.
A design needs two configuration files, called my_project
and my_config
, containing two packages to configure a VHDL design:
package my_config is -- Change these lines to setup configuration. constant MY_BOARD : string := "CHANGE THIS"; -- e.g. Custom, ML505, KC705, Atlys constant MY_DEVICE : string := "CHANGE THIS"; -- e.g. None, XC5VLX50T-1FF1136, EP2SGX90FF1508C3 -- For internal use only constant MY_VERBOSE : boolean := FALSE; -- activate detailed report statements in functions and procedures end package;
Source: https://github.com/VLSI-EDA/PoC/blob/master/src/common/my_project.vhdl.template
package my_project is -- Change these lines to setup configuration. constant MY_PROJECT_DIR : string := "CHANGE THIS"; -- e.g. "d:/vhdl/myproject/", "/home/me/projects/myproject/" constant MY_OPERATING_SYSTEM : string := "CHANGE THIS"; -- e.g. "WINDOWS", "LINUX" end package;
Source: https://github.com/VLSI-EDA/PoC/blob/master/src/common/my_config.vhdl.template
The configuration package infers device and traget properties and assembles all information in a comprehensive record.
type T_DEVICE_INFO is record Vendor : T_VENDOR; Device : T_DEVICE; DevFamily : T_DEVICE_FAMILY; DevGeneration : natural; DevNumber : natural; DevSubType : T_DEVICE_SUBTYPE; DevSeries : T_DEVICE_SERIES; TransceiverType : T_TRANSCEIVER; LUT_FanIn : positive; end record;
Source: PoC.config
T_VENDOR
represents a target device vendor:
type T_VENDOR is ( VENDOR_UNKNOWN, VENDOR_GENERIC, VENDOR_ALTERA, VENDOR_LATTICE, VENDOR_XILINX );
type T_SYNTHESIS_TOOL is ( SYNTHESIS_TOOL_UNKNOWN, SYNTHESIS_TOOL_GENERIC, SYNTHESIS_TOOL_ALTERA_QUARTUS2, SYNTHESIS_TOOL_LATTICE_LSE, SYNTHESIS_TOOL_SYNOPSIS, SYNTHESIS_TOOL_XILINX_XST, SYNTHESIS_TOOL_XILINX_VIVADO );
type T_DEVICE_FAMILY is ( DEVICE_FAMILY_UNKNOWN, DEVICE_FAMILY_GENERIC, -- Altera DEVICE_FAMILY_ARRIA, DEVICE_FAMILY_CYCLONE, DEVICE_FAMILY_STRATIX, -- Lattice DEVICE_FAMILY_ICE, DEVICE_FAMILY_MACHXO, DEVICE_FAMILY_ECP, -- Xilinx DEVICE_FAMILY_SPARTAN, DEVICE_FAMILY_ZYNQ, DEVICE_FAMILY_ARTIX, DEVICE_FAMILY_KINTEX, DEVICE_FAMILY_VIRTEX );
Xilinx groups new devices into series, which share common features across device families.
type T_DEVICE_SERIES is ( DEVICE_SERIES_UNKNOWN, DEVICE_SERIES_GENERIC, -- Xilinx FPGA series DEVICE_SERIES_7_SERIES, DEVICE_SERIES_ULTRASCALE, DEVICE_SERIES_ULTRASCALE_PLUS );
type T_DEVICE is ( DEVICE_UNKNOWN, DEVICE_GENERIC, -- Altera DEVICE_MAX2, DEVICE_MAX10, -- Altera.Max DEVICE_ARRIA1, DEVICE_ARRIA2, DEVICE_ARRIA5, DEVICE_ARRIA10, -- Altera.Arria DEVICE_CYCLONE1, DEVICE_CYCLONE2, DEVICE_CYCLONE3, DEVICE_CYCLONE4, -- Altera.Cyclone DEVICE_CYCLONE5, -- DEVICE_STRATIX1, DEVICE_STRATIX2, DEVICE_STRATIX3, DEVICE_STRATIX4, -- Altera.Stratix DEVICE_STRATIX5, DEVICE_STRATIX10, -- -- Lattice DEVICE_ICE40, DEVICE_ICE65, DEVICE_ICE5, -- Lattice.iCE DEVICE_MACHXO, DEVICE_MACHXO2, -- Lattice.MachXO DEVICE_ECP3, DEVICE_ECP4, DEVICE_ECP5, -- Lattice.ECP -- Xilinx DEVICE_SPARTAN3, DEVICE_SPARTAN6, -- Xilinx.Spartan DEVICE_ZYNQ7, DEVICE_ZYNQ_ULTRA_PLUS, -- Xilinx.Zynq DEVICE_ARTIX7, -- Xilinx.Artix DEVICE_KINTEX7, DEVICE_KINTEX_ULTRA, DEVICE_KINTEX_ULTRA_PLUS, -- Xilinx.Kintex DEVICE_VIRTEX4, DEVICE_VIRTEX5, DEVICE_VIRTEX6, DEVICE_VIRTEX7, -- Xilinx.Virtex DEVICE_VIRTEX_ULTRA, DEVICE_VIRTEX_ULTRA_PLUS -- );
T_DEVICE_SUBTYPE
differentiates sub-types within a device family.
type T_DEVICE_SUBTYPE is ( DEVICE_SUBTYPE_NONE, DEVICE_SUBTYPE_GENERIC, -- Altera DEVICE_SUBTYPE_E, DEVICE_SUBTYPE_GS, DEVICE_SUBTYPE_GX, DEVICE_SUBTYPE_GT, -- Lattice DEVICE_SUBTYPE_U, DEVICE_SUBTYPE_UM, -- Xilinx DEVICE_SUBTYPE_X, DEVICE_SUBTYPE_T, DEVICE_SUBTYPE_XT, DEVICE_SUBTYPE_HT, DEVICE_SUBTYPE_LX, DEVICE_SUBTYPE_SXT, DEVICE_SUBTYPE_LXT, DEVICE_SUBTYPE_TXT, DEVICE_SUBTYPE_FXT, DEVICE_SUBTYPE_CXT, DEVICE_SUBTYPE_HXT );
T_TRANSCEIVER
differentiates transceiver hard macro implementations.
type T_TRANSCEIVER is ( TRANSCEIVER_NONE, TRANSCEIVER_GENERIC, -- Altera transceivers TRANSCEIVER_GXB, -- Altera GXB transceiver --Lattice transceivers TRANSCEIVER_MGT, -- Lattice transceiver -- Xilinx transceivers TRANSCEIVER_GTP_DUAL, TRANSCEIVER_GTPE1, TRANSCEIVER_GTPE2, -- Xilinx GTP transceivers TRANSCEIVER_GTX, TRANSCEIVER_GTXE1, TRANSCEIVER_GTXE2, -- Xilinx GTX transceivers TRANSCEIVER_GTH, TRANSCEIVER_GTHE1, TRANSCEIVER_GTHE2, -- Xilinx GTH transceivers TRANSCEIVER_GTZ, -- Xilinx GTZ transceivers TRANSCEIVER_GTY -- Xilinx GTY transceivers );