Other articles

  1. Spartan-6 configuration speeds

    Spartan-6 maximum JTAG clock is 18-33MHz according to "Table 3: Maximum JTAG Clock Frequencies" in [DS593] (v1.4, p. 8).

    The Spartan-6 at speed grade -1L is limited to 18MHz, while other speed grades (-2, -3N, and -3) allows a TCK of 33MHz. See "Configuration Switching Characteristics" in [DS162] (v3 …

    read more
  2. In the morning, everything works

    ...after finding a shortcut on the JTAG adapter board and burning an FPGA by connection the power supply the wrong way, in the morning, everything finally works together.

    Config/program access

    Microcontroller debug. access over SWD. The STM32F4x CPU is found:

    Open On-Chip Debugger 0.8.0 (2014-05-10-23:20)
    Licensed …
    read more
  3. Breakout board for the Spartan-6 LX4/LX9

    Merci Kevin!

    Kevin Modzelewski made a little breakout board for the Xilinx Spartan-6 in TQG-144 package. He describes his FPGA project here [1], and he gives the Gerber source there [2].

    This simple board is useful to learn about the Spartan-6 and test your soldering skills before starting a more …

    read more
  4. FLRe: automated LUT test strategy

    Foreach LUT:
     1. generate the LUT bitstream with location constraint.
        -> using command-line Xilinx toolchain
     2. upload the bitstream to the FPGA.
        -> using FLRe demo board and JTAG control
     3. readback the memory area containing the LUT equation and
        match it with the sent bitstream.
        -> using FLRe demo board and JTAG …
    read more
  5. Carry my LUT around

    Goal have a look-up table (LUT) generated at a known location and test its equation, while dynamically changing it.

    Generation script for the Xilinx FPGA config using ISE

    • myProject_map.ncd (Native Circuit Description)
    • myProject.pcf (constraint file)
    • myProject.ncd (same format, but includes additional place and route information)
    • myProject …
    read more
  6. FLRe project, KiCAD rendering

    First version of the FLRe system. Introduction time!

    The project is made of two modular boards: one microcontroller board and one FPGA board. Each boad can be used separately (each has its own power stage), but they are designed to work together over the 50MHz 16-bit parallel SelectMAP bus of …

    read more
  7. Spartan-6 SelectMap port length matching

    Update 2015.03.09 it is quite funny that CERN made a video exactly on the same day (2015.03.03) about KiCAD new features for trace length matching. Thanks CERN! See [1].

    Further experiences with KiCAD, FreeRouting and track length matching.

    FreeRouting has a quite nice support for fixed …

    read more
  8. Spartan-6 start-up sequence and control from microcontroller

    Before wiring everything on the PCB, let's check the Spartan-6 configuration sequence from microcontroller.


    On power-on, both boards (microcontroller and FPGA) will get power supply, but only the microcontroller chip will start because the power supply rail of the FPGA is controlled by a relay which will be open …

    read more
  9. KiCAD Schematics for XC6SLX9

    Where is the KiCAD schematic component for the Xilinx Spartan-6 LX9 (XC6SLX9-TQFP144)?

    Numato Labs made the Mimas Spartan-6 development board using KiCAD, and this FPGA silicon and package. The KiCAD component can be found in their Subversion repository at [1].

    KiCAD and Omron MOSFET relay G3VM-61G1


    [1]Numato Labs …
    read more
  10. KiCAD and Spartan-6 LX9 TQG144

    How to design a Spartan-6 PCB?

    The Spartan-6 LX9 is available in the hand-soldering-friendly TQG144 package ([UG385] v2.3 at p. 30). Numato designed an open-hardware board around this FPGA/packaging: the Mimas Spartan-6 devel. board [NUM1]. The KiCAD [1] schematics and PCB layout files are found in Numato's SVN …

    read more
  11. About fpgatools

    As you may have noticed, the work of this blog is based on the great FpgaTools project [1]. I understood the functionning of the Xilinx Spartan-6 bitstream by reading the source code of this project. The source code is nicely written in plain C-code, but there are not much comments …

    read more
  12. FLRe contest: win a demo board!


    The FLRe project reaches its first beta version. Let's celebrate and win your own demo board. If you are among the first to answer the question, I will send you a tiny demo board flashed with the demo version of the project... for free! (including the shipping costs)

    See …

    read more
  13. Spartan6 LX9 to STM32 F4 loop

    The experimental solution with STM32F4 and XC6LX9 discrete development boards.

    This problem is that many pins are hard-wired to some specific features. For example, the SelectMap port cannot be used on my current FPGA board. The goal would be to have 32-bit input and output between the FPGA and the …

    read more
  14. Proposal for a dynamic and compact state machine on Spantan-6

    My proposal for an ultra compact 4-bit FSM fitting in one Spartan-6 CLB only, by using dynamic reconfiguration. The overall state machine being itself dynamically reconfigured, allowing to create or remove states, or change transitions or state output...

    Important limitation: so as to make it fit in one CLB only …

    read more
  15. Spartan-6 dynamic reconfiguration summary

    The internal configuration of most of the FPGA currently available (such as the Xilinx Spartan-6) are SRAM-based. Since those configuration bits are directly used by the internal blocks of the FPGA, their behavior is changed right after changing the corresponding bits in the SRAM configuration.

    In my previous posts, I …

    read more
  16. How to read an .ncd file

    The Xilinx design work flow, as described in [1]:

    By the way, it seems that the Debit project is no more available at the address given in the document, but the source code repository can still be found at [2].

    The .ncd file is the most important file, which contains …

    read more
  17. Spartan6 Slice M dynamic reconfiguration

    In my previous post, I documented the configuration options available in the bitstream for the Slice M logic blocks. In order to check whether they are dynamically reconfigurable or not, I experimented with the OUTMUX multiplexer.

    When D5Q ① is selected by OUTMUX, the output DMUX is registered, when O5 …

    read more
  18. Spartan6 Slice M configuration

    The generic building block to make a FPGA is the logic block, which is composed of look-up table and flip-flop. Each FPGA maker has its own design and terms for those Logic Element:

    • Xilinx Spartan 6: Slice M, L, or X with 4 LUT (6 inputs) and 8 Flip-flops, packed …
    read more
  19. Xilinx ISE: preventing registers in IOB

    When creating a design with a registered output, the D Flip-Flop of the final output (just before the FPGA pads) are moved to IOB blocks. See [1]

    Note: Do not try to move the D Flip-Flop to another location in PlanAhead, the tool will behave fine, but will not save …

    read more
  20. High speed serial bus generation using Spartan-6

    My goal is to generate an 8-bit serial data signal and its clock (similar to SPI bus). High-speed serialization can be achieved using SerDes (Serializer Deserializer) dedicated logic in Xilinx Spartan-6 FPGA.

    This post is entirely based on the Xilinx application note [XAPP1064]. General clock configurations are also described in …

    read more
  21. High speed serial trigger using Spartan-6 (improved)

    Implementation of a 8-bit shift register with automatic clear

    module shift_reg(
    input                   clk;
    input                   clear;
    input                   shift_in;
    output [7:0]    d_out;
    reg    [7:0]    d_out;
    reg    [7:0]    count;  // "One Hot" encoding of the current register load
    reg                             reset;  // if 1, register is cleared at next …
    read more
  22. High speed serial trigger using Spartan-6

    The serial trigger includes a shift register and a comparator. When the content of the register matches the expected pattern, the trigger output is set to high.

    First, how to create a simple 8-bit shift register in verilog?

    Implementation of a simple 8-bit shift register

    module shift_reg(
            clk,            // clock
            clear …
    read more
  23. Readback the Spartan-6 configuration registers over JTAG

    Since long time, I failed reading back data from the Spartan-6 configuration registers (STAT, COR1, COR2), even though the sequence is described in the Configuration Register Read Procedure (JTAG) section [UG380] (p.117, v2.5).

    This part contains several incoherencies which led me not to follow each step blindly. Actually …

    read more
  24. Reconfiguration of the trigger pattern

    After having found the location of the LUT in the FPGA die, their equations can be reconfigured.

    Example requests

    [FLR] requests:

    [RX8]0x0083005555555555 …
    read more
  25. Where is my LUT (in the Spartan-6 LX9)?

    You created your Verilog or VHDL design, and you want to create a placement constraint of some blocks that you plan to reconfigure later during runtime? The live reconfiguration server will need the bitstream coordinates to find those corresponding blocks in the internal FPGA configuration. Unfortunately, the (X, Y) from …

    read more
  26. 8-bit data trigger with FPGA

    I want to create a super fast data trigger on 8-bit words. When the data bus matches the bit pattern, the trigger output is set to high.

    module pattern_match(
            input [7:0] data,
            input [7:0] match,
            output trigger
    assign trigger = data == match;

    The corresponding schematic:

    And here is …

    read more
  27. The FPGA model of fpgatools and sw_bitpos

    The FPGA model as defined in FpgaTools [1] with additional comments:

    struct fpga_model
            /* return code */
            int rc; // if rc != 0, all function calls will immediately return
            const struct xc_die *die;
            /* array of the all the pins of the package */
            const struct xc6_pkg_info *pkg;
            int x_width, y_height;
            int center_x;
            int center_y …
    read more
  28. SelectMAP configuration

    Unlike JTAG, the SelectMAP configuration interface seems to be equivalent to the ICAP (Internal Configuration Access Port), which has already been succeesfully used for partial reconfiguration with Spartan-6 (as opposed to the JTAG interface).

    The pinout of the Spartan-6 LX9 TQG144 is in [UG385] in table 2-2, p.28 (v2 …

    read more
  29. Partial reconfiguration with XAPP290

    The Xilinx application note [XAPP290] for Difference-Based Partial Reconfiguration. The document explains how to update the configuration of a Virtex FPGA without stopping it. Actually it does also apply to Spartan-6.

    The usage is very easy:

    1. Create an initial bitstream file .bit.
    2. Change the initial configuration using FPGA editor or …
    read more
  30. Matching the Xilinx bitstream with the Spartan-6 silicium die

    Note: Actually what I had drawn in yesterday's diagrams was wrong, and I updated last post today (logical tiles coordinates start from top left corner, while (row, major, minor) start from bottom left). I found the issue when trying to match the bitstream with the expected die configuration. Since everything …

    read more
  31. XC6SLX9 die layout and bitstream

    The silicium layout of FPGAs is (always?) made of a repetitive pattern, hence the configuration system features a kind of coordinate system, in order to select which tile is being configured.

    The Xilinx configuration guide [UG380] and the documentation of the logic blocks [UG384] give some insights about the internal …

    read more
  32. Bitstream analysis code

    Today I analyzed the Xilinx documentation about the bitstream format in [UG380] p.92 (v2.5), and I updated the C code converting bitstream into a C array for generating C comments at each configuration word.

    See the full file here: simple_and.c (~4MB) [1]

    All instructions are documented by …

    read more
  33. Spartan-6 routing internals

    The project FpgaTools [1] contains a tool to interpret the Xilinx bitstreams into plaintext floorplans: bit2fp.

    Let's see what happens on my simple example:

    $ ./bit2fp simple_and.bit
    fpga_floorplan_format 1
    dev y0 x21 IOB 1 ostd LVCMOS33
    dev y0 x21 IOB 1 strength 12
    dev y0 x21 IOB 1 slew SLOW …
    read more
  34. Hello (FPGA) World over STM32!

    The following verilog code was implemented using Xilinx ISE toolsuite:

    `timescale 1ns / 1ps
    module simple_and(
    input a1,
    input a2,
    output a3
    assign a3 = a1 & a2;

    At the end, the tool generate a bitstream: a binary file containing raw data ready to be uploaded to the FPGA over …

    read more
  35. Reading the Xilinx IDCODE over JTAG

    The JTAG port of the Spartan-6 FPGA was hand-soldered to the wire and connected to the STM32 microcontroller.

    The JTAG TAP state machine

    Now can we enter the FPGA using the microcontroller? [UG380] explains how to do so.

    JTAG ports have a funny bitstream-controlled state machine for filling variable-length instruction- …

    read more
  36. First step: prepare a nice welcoming desk

    A nice desk makes it easier to find everyday motivation. The STM32 microcontroller, the Xilinx Spartan-6, and their respective debuggers are waiting to work together (see on the left)! (^_^)

    Hardware information

    • the Xilinx Spartan-6 LX9 FPGA board.

    Really nice little board with 32-MByte SDRAM and 8-Mbyte SPI flash. The …

    read more

Page 1 / 1