Table Of Contents

Example FPGA Configuration File Structure

Last Modified: June 10, 2021

An FPGA configuration file needs to be structured correctly in XML to function properly.

The following code displays an example of how to implement the FPGA configuration file XML tags.
<?xml version='1.0'> 
<?xml-stylesheet type="text/xsl" href='NI VeriStand FPGA DMA.xsl'?>
<FPGADMAChannelData xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation = "NI VeriStand FPGA DMA.xsd">
      <Version>2.0</Version>
      <Bitfile>FPGADMABitfile.lvbitx</Bitfile>

      <Categories>
          <Category>
              <Name>TopLevel1</Name>
              <Description>Description</Description>
              <Symbol>Default</Symbol>
              <Category>
                  <Name>NestedCategory1</Name>
                  <Description>Category with AI Symbol contained in TopLevel1</Description>
                  <Symbol>AI</Symbol>
              </Category>
              <Category>
                  <Name>NestedCategory2</Name>
                  <Description>Category with DI Symbol contained in TopLevel1</Description>
                  <Symbol>DI</Symbol>
              </Category>
          </Category>
      </Categories>

      <DMA_Read>
          <Packets>5</Packets>
          <Packet/>
          <Packet>
              <I8>
                  <Name>Signed8Channel</Name>
                  <Description>Description of channel</Description>
                  <Category>TopLevel1\NestedCategory1</Category>
                  <InitialValue>25</InitialValue>
                  <Scale>128</Scale>
                  <Offset>5</Offset>
                  <Unit>Volts</Unit>
                  <Symbol>AI</Symbol>
              </I8>
              <U8>
                  <Name>Unsigned8Channel</Name>
                  <Description>Description of channel</Description>
                  <Category>TopLevel1\NestedCategory2</Category>
                  <InitialValue>25</InitialValue>
                  <Scale>128</Scale>
                  <Offset>5</Offset>
                  <Unit>Volts</Unit>
                  <Symbol>AI</Symbol>
              </U8>
              <I16>
                  <Name>Signed16Channel</Name>
              </I16>
              <Boolean>
                  <Name>BooleanChannel</Name>
              </Boolean>
              <Void>
                  <Size>7</Size>
              </Void>
          </Packet>
          <Packet>
              <FXPI32>
                  <Name>Fixed Point Channel 1</Name>
                  <Scale>2</Scale>
                  <Offset>5</Offset>
                  <Unit>Volts</Unit>
                  <Symbol>AI</Symbol>
                  <FXPWL>20</FXPWL>
                  <FXPIWL>5</FXPIWL>
              </FXPI32>
          </Packet>
          <Packet>
              <PWM>
                  <Name>PWM In 0</Name>
                  <Description>PWM input</Description>
                  <Category>Input\PWM</Category>
                  <Scale>100</Scale>
                  <Unit>%</Unit>
                  <Symbol>PWM In</Symbol>
                  <PWMPeriod>40000</PWMPeriod>
              </PWM>
          </Packet>
          <Packet>
              <U8>
                  <Name>Channel with one parameter</Name>
                  <Parameters>
                      <I16>
                        <Name>UI Parameter name</Name>
                        <ControlName>Name of Control</ControlName>
                        <InitialValue>25</InitialValue>
                        <Scale>100</Scale>
                        <Offset>0</Offset>
                      </I16>
                  </Parameters>
              </U8>
          </Packet>
      </DMA_Read>

      <DMA_Write>
          <Packets>4</Packets>
          <Packet>
              <U8>
                  <Name>Unsigned8Out</Name>
                  <Category>TopLevel2</Category>
                  <Symbol>DO</Symbol>
              </U8>
          </Packet>
      </DMA_Write>
</FPGADMAChannelData>


Recently Viewed Topics