Electronic – programming a CPLD in low-level

fpgaprogrammable-logicprogramming

Maybe it's a silly question, but I want to use a microcontroller with a CPLD.

My idea is for the microcontroller to reprogram the CPLD as many times as the user wants.

The problem is that I don't want to use a software provided by the manufacturer, I want to create my own software tool.

Is it a crazy idea?

It is something similar to this project:

HOW-TO: PROGRAMMABLE LOGIC DEVICES (CPLD)

Best Answer

There are two problems:

  1. Most CPLDs have embedded flash for programming, so the number of times they can be reprogrammed is limited by the memory
  2. The bitstream you need to send is usually built with a commercial compiler.

The thing that comes closest to what you want are FPGAs with an open source toolchain. FPGAs and CPLDs are very similar, but have a slightly different weighting between logic gates and registers, and most FPGAs are configured with SRAM that can be reprogrammed arbitrarily often without wearing out like flash.

Take a look at open source FPGA toolchains to see what chips are supported and what is required to run them. You want a machine that is strong enough to run the toolchain to get a programming file, an interface that allows you to send the file to the FPGA, and an interface to transfer data between CPU and FPGA.