1
\$\begingroup\$

Is it possible to write your own tool to program FPGA boards, or are they locked down to only be programming by the manufacturer's tools?

In other words, can I write my own tool to program/flash a FPGA board which I purchase from a large vendor (say Intel, or Xillix).

\$\endgroup\$
  • 2
    \$\begingroup\$ Have done any research on this topic? You should search for open-source FPGA tools. You should also be specific about what you mean by "programming"...does that include creating the bitstream or simply programming the Flash memory from an existing bitstream? \$\endgroup\$ – Elliot Alderson Dec 4 '18 at 22:10
  • \$\begingroup\$ Yup, I did do some research on this topic but found no results about custom tools for development. I really wish to stay away from open-source FPGAs and stick with something like Altera if possible. And by programming, I mean I wish to design the circuit on my own, then I can compile it to the boards specifications, and write that compiled data to the boards flash memory. This whole process should be implemented by myself, so I will probably need to know the format of the flash data. \$\endgroup\$ – Jas Dec 4 '18 at 22:14
  • 1
    \$\begingroup\$ It's not the FPGAs that are open source, it's the tool chain. You should edit your question to clarify exactly what you want to do...HDL synthesis? synthesis from schematics? timing optimization? pin configuration and mapping? access to vendor IP? \$\endgroup\$ – Elliot Alderson Dec 4 '18 at 22:18
  • 2
    \$\begingroup\$ Chris Stratton's answer below explains the situation well. The one exception I know of is the Lattice iCE40 family of devices, which have been reverse engineered. Project IceStorm provides an open source tool chain for these devices. \$\endgroup\$ – B Pete Dec 4 '18 at 23:14
5
\$\begingroup\$

Most FPGA vendors do not share the information necessary to create custom software tools which can compile designs to generate configuration "bitstream" files for the FPGA, or at least not outside of an NDA with a tool vendor who is a strategic partner. There are a few unique cases where enough information has been obtained to make this possible, but for Xilinx or Altera(Intel) you are stuck compiling your design with the vendor's tools or approved 3rd party commercial ones.

However, almost all FPGA vendors do publish Application Notes giving information on how to load a bitstream created by the vendor's approved tools into the FPGA device itself at runtime. A possible exception might be for flash or anti-fuse type FPGA, but for traditional SRAM-based FPGAs, this information is necessary to be competitive in the market because there are many designs where a processor would inject the bitstream after reading it off a disk or storage device.

Modern SRAM-based FPGAs typically support a lot of configuration methods - a slave load from a processor, a master load from a unique or standard SPI flash, JTAG extensions, possible even novel things like USB.

And even vendor-supplied specialized configuration flash chips may come with enough information to create your own tools for programming them.

That said, you generally will have the easiest experience using a vendor's own programming cable/adapter, or a workalike or approved 3rd party option, especially if you want to then do things like use a compiled-in logic analyzer which needs to communicate with the development tools via this cable. However, even there you may have options, for example the tools can sometimes proxy the communication with the programmer over a network, and that may have given someone an opportunity to reverse engineer the protocol and implement their own version.

Putting an FPGA on a custom board tends to be not at all trivial. When just starting out, you'd do best to get an evaluation or experiment board for the FPGA family you are considering. Hopefully this would just take a USB cable, or come with a supported programming adapter cable. Make very sure that the board you buy will be supported by the free tier of the vendor tools!

\$\endgroup\$
  • \$\begingroup\$ That is very unfortunate :( Thank for you the answer, really appreciate it! \$\endgroup\$ – Jas Dec 4 '18 at 22:29
  • 1
    \$\begingroup\$ "icestorm" for some lattice parts would be one of the rare exceptions \$\endgroup\$ – Chris Stratton Dec 12 '18 at 22:29
1
\$\begingroup\$

It is possible if you know circuit of cable (or can design and test it yourself), and know the programming protocol. I use ByteBlaster II clone (thanks its design is well documented) to program EPCS and other serial flash devices using custom software written in BASIC (yes, in BASIC!). I developed this software basing on the Altera FPGA manual and EPCS chip datasheet. It appeared that code apply to other standard serial flash chips. By the way, EPCS marked chips appeared to be made by GigaDevice (manufacturer code 0xc8), with EPCS16 being actually GD25Q16. And EPCS datasheet is missing some standard commands documented which are available for standard serial flash devices. And Altera ASMI IP's command 0x9F is missing readout of the manufacturer and device ID[15:8] bits off the attached chip. Here's my Q&A about it on SE.EE about it.

And of course, Altera/Intel wants to force you to use genuine chips, tools and software. Thus if you want to be "100% supported" then you will have to stick to what manufacturer wants, unless they give you written permission, or you can survive with their support answering "you have unsupported configuration".

Finally, custom programming device does NOT exclude you using genuine devices to program and test FPGA. JTAG/active serial interfaces are well documented, thus you just need to have the standard connector to connect your custom or standard programming/troubleshooting device to.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.