NanoBoard 3000 - Configuring an FPGA Project Automatically
Contents
Parent article: Understanding the NanoBoard 3000 Constraint System
Although an FPGA design project targeting the NanoBoard 3000 can be configured manually – by adding a configuration, assigning the required board constraint files and creating a mapping constraint file by hand – the process is greatly simplified through use of an auto-configuration feature.
Using this feature, a target configuration for the FPGA design project is automatically created. The required board-level constraint files are then automatically determined and added to this configuration, based on the hardware (motherboard and peripheral board) detected in your system. Where a peripheral board has been attached to the motherboard and detected, an additional board mapping constraint file is also generated and added to the configuration, which handles connection of that peripheral board to the main motherboard.
Identifying System Hardware
Before taking a closer look at the auto-configuration procedure itself, it is a good idea to understand the technology by which such automatic configuration of the system is made possible.
The key to being able to configure an FPGA design project automatically, is the ability of Altium Designer to identify the specific hardware you are currently using in your system. Identification is made possible through the use of memory devices, located on:
- the NanoBoard 3000 motherboard
- each peripheral board.
The device used on each board is a 1-Wire compatible device. The NanoTalk Controller interrogates the memory device on each board over a single wire, resulting in the presence of two 1-Wire buses used for system identification purposes.
The following is an illustration of the 1-Wire board identification system in place for the NanoBoard 3000.
Each 1-Wire memory device is pre-programmed with an Altium Board Identifier string. This string is 32 bytes long and can be represented as:
<UniqueID><ClassID><BatchID><VendorID>
The four components of the string are defined in the following sections.
UniqueID
<UniqueID> is an 8 byte code programmed by the manufacturer to guarantee a unique device. The 64 bits of this code are made up of three distinct parts. The first 8 bits provide the 1-Wire family code, the next 48 bits provide the serial number which is unique to each device. The last 8 bits provide a cyclic-redundancy-check of the first 56 bits. The full 64-bit code is stored in, and accessed from, a separate ROM within the device.
ClassID
<ClassID> is a 16 byte (hex-coded ASCII) ident for the board upon which the 1-Wire memory device resides. The string consists of the board code and the board revision, separated by a full stop. Right-padding using space characters (20h
) ensures the length is kept to 16 bytes.
These 16 bytes are stored in, and accessed from, Page 0 of the DS2502's/DS2406's data memory in the address range 0000h
– 000Fh
.
The following table illustrates example coding for the NanoBoard 3000XN motherboard (Xilinx variant) and a peripheral board.
Board | | Example Information | Resulting 16 Bytes entered into 1-Wire device's data memory |
---|---|---|---|
Motherboard | NB3000xx.nn | NB3000XN.04 | 4E 42 33 30 30 30 58 4E 2E 30 34 20 20 20 20 20 |
Peripheral Board | PBxx.nn | PB01.07 | 50 42 30 31 2E 30 37 20 20 20 20 20 20 20 20 20 |
BatchID
<BatchID> is a 4 byte ident for the production run. These four bytes are stored in, and accessed from, Page 0 of the DS2502's/DS2406's data memory in the address range 0010h
– 0013h
.
VendorID
<VendorID> is a 4 byte ident for who made the board. This value is 00000001h
for all Altium manufactured boards. These four bytes are stored in, and accessed from, Page 0 of the DS2502's/DS2406's data memory in the address range 0014h
– 0017h
.
In terms of auto-configuration, it is the <ClassID> portion of the string that empowers the feature, as it is this string that determines the constraint file required in relation to a board.
Configuring the Project
Prior to using the auto-configuration feature, ensure the following:
- A peripheral board carrying resources used by the FPGA design is plugged into the NanoBoard 3000 motherboard. A peripheral board whose resources are not actually used can be left attached to the motherboard, or removed, as required.
- The NanoBoard 3000 is connected to the PC and is powered-on.
The auto-configuration feature can be used to create the configuration for any chosen FPGA project that is currently open (in the Projects panel). Alternatively, it can be used to create the configuration and add it to a newly-created FPGA project.
Access to the feature can be made in two ways:
- Right-click on the icon for the NanoBoard 3000, in the NanoBoard chain of the Devices view (View » Devices View). Use the Configure FPGA Project sub-menu to choose the specific FPGA design project to be configured, or choose New FPGA Project. In the latter case, a dialog will appear from which you can determine where, and under what name, the new project will be saved.
- From the NanoBoard Configuration dialog. To access this dialog, double-click on the icon for the NanoBoard 3000 to access its corresponding instrumentation in the Instrument Rack – NanoBoard Controllers panel. Then click on the Board View button. Alternatively, right-click on the NanoBoard 3000 icon and choose View Configuration from the menu.
By using the dialog, you are presented with a visual summary of your current NanoBoard 3000 system. The image in the dialog displays the motherboard, as well as any specific peripheral board that is currently attached to the motherboard.
The dialog is dynamic – refreshed on access. So if you attach (or remove) a peripheral board, the new physical setup will be displayed when you next access the dialog. The dialog also provides information relating to the Altium Board Identifier string for:
~ The NanoBoard 3000 motherboard
~ The currently attached peripheral board (if present)
Use the Auto Configure FPGA Project drop-down at the bottom-left of the dialog to choose the existing (open) project to configure, or to create a new project to which the configuration will be added.
Whichever method of access is used, the auto-configuration process proceeds in exactly the same way. First, a configuration is created and named using the format:
motherboard code_revision
For example with a NanoBoard 3000XN (Xilinx variant, revision 4), the configuration will be named NB3000XN_04
.
Constraint files will then be added to the configuration for each of the detected boards in the system (motherboard and peripheral board). These are sourced from the \Library\Fpga
folder of the installation. In each case, the file used will be determined by the <ClassID> component of the board's Altium Board Identifier string. For the NanoBoard 3000XN (Xilinx variant, revision 4), with <ClassID> = NB3000XN.04
, then the constraint file retrieved and added to the configuration will be NB3000XN.04.Constraint
.
If you have attached a peripheral board to your 3000-series NanoBoard, the constraint file for that specific peripheral board would be retrieved and added to the configuration. For example, if you are using peripheral board PB02 (revision 6), with <ClassID> = PB02.06
, then the constraint file retrieved and added to the configuration will be PB02.06.Constraint
.
In addition, use of a peripheral board results in the constraint file that defines the mapping of peripheral board to the motherboard also being created, on-the-fly, and added to the configuration. The name of this file will simply be that of the configuration itself, with the additional suffix '_BoardMapping
' (e.g. NB3000XN_04_BoardMapping.Constraint
). The file will be saved to the same location as the project file (*.PrjFpg
) itself.
The configuration and assigned constraint files are listed in the subsequent Configuration Manager dialog that appears for the project.
Use the dialog to add any other constraint files for the project as required, and assign them to the configuration. If you already had constraint files added to the project – for example to handle timing constraints – these will appear listed in the Configuration Manager dialog, but will not automatically be assigned to the configuration generated by the auto-configuration process.
Further Reading
For more information on the DS2502 and DS2406 devices, refer to the datasheets (DS2502.pdf
and DS2406.pdf
) available at www.maxim-ic.com.
For a high-level overview of the 1-Wire bus protocol, refer to the application note (AN3989.pdf
), also available at www.maxim-ic.com.