Programming Lattice FPGA's with an Aardvark
Programming Lattice FPGA's with an Aardvark
The Aardvark I2C/SPI Host Adapter connects via USB and is a powerful and fast I2C and SPI host adapter. Developers can connect a Mac, Linux or Windows computer to the embedded system environment and transmit the serial data streams using the I2C and SPI protocols. The Aardvark host adapter can be used as master and slave. When purchasing an Aardvark, a large number of API's can be used. The following API's are available: C/C++, C#, .NET, Python, Visual Basic. All API’s can be obtained free of a license fee. The Aardvark SPI / I2C adapter can be used for programming Lattice FPGA devices with Slave SPI or Slave I2C.
Note the following programming notes for SSPIEM and I2CEM modification using the Aardvark SPI/I2C API’s.
Lattice Diamond provides sample SSPIEM and I2CEM source code that can be modified with Aardvark SSPI and I2C APIs, respectively. These programming modes are included in the .sea and .iea files generated by the Lattice development tool. These are used by the SSPIEM and I2CEM source codes. However, Lattice does not guarantee that these APIs support all programming modes. This is due to the limitations of the Aardvark adapter and thus its associated read/write APIs intended for data transfer between Lattice algorithm interpretation logic and the actual programming hardware driver logic.
The Aardvark adapter has a buffer limit of 4KB. Any algorithm file data larger than 4KB will overflow the buffer and result in a programming error. The development tool modes affected by this are the "Fast Programming" modes. For example, the LIFMD-6000 (Crosslink) device supports fast programming mode, but not with Aardvark APIs. Fast Programming mode results in an algorithm file in which all data for fast programming is immediately passed as a whole and overflows into the Aardvark buffer. This leads to a programming error. The supported programming modes are 'Clear program verification', 'Clear program check in background', 'Flash program', 'SSPI program' etc.