Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
9 years ago

My first experience with altera (MAX 10). And it didn't go well...

Hello everybody.

Finding the right FPGA can be quite a hassle. Especially when one search for a powerful one (read "lots of logic elements, DSP or memory stuff" for pure computing) with a few I/O using TQFP or similar package. In fact, nobody offers such products.

So, it's all about compromises, except for package in my case.

I first tried Lattice stuff with reasonable "little" FPGAs like the ECP2M line, the most powerful with these packages (even if there are in fact small). The 20K elements version could fit in the project I'm working for, but with no real margin. Xilinx have nothing better to offer. But Altera, with the MAX 10 series seems to be even more powerful with the TQFP 144 package (seems to me the only brand offering this kind of product).

So, let's go for the MAX10 10M50SC. Simple, fast enough, versatile, "cheap" with some interesting stuff like DSP slices and, perhaps the integrated flash memory (the main marketing argument as far I can tell) but I don't care about this feature for the moment.

How naive I was.

Two days after digging into the awful documentation, where the obscure mixes with the obvious, I couldn't even know how I can program this thing. Even the very first stage of study is stuck with the lack of relevant information. The 64 pages document "MAX 10 FPGA Configuration User Guide" is a absolute reference of absence of any real usable information. Everything is mixed up; the vocabulary is obscure and it is only a list of what the device can do. Nothing about how to do these things or even understand the overall logic.

When I read terms like "Remote System Upgrade" - perhaps my nonnative English origin mislead me - I think about a way to program the thing using for example a MCU, which is exactly what I wanted to do: sending a .sof file to the CRAM using the JTAG interface. Easy and straightforward, eh? In fact, we learn that we need a soft IP core or a "user interface" to do that. What is that? Why on earth I would need such a machinery to do what seemed to me a trivial task? So, I gave up this promising "Remote System Upgrade" which name is anything but what is seems to be.

Now, after searching, reading, reading, searching for two days, I couldn't even find anything about programming the internal RAM of the chip. Of course, using Quartus and some programming tool does the business, it would be stupid and ridiculous to need exclusively such tools to upgrade this FPGA. Even the other manufacturers like Lattice provides the JTAG instructions and format. Even the smallest micro-controller like the 8051 has the full documentation and timing of the flash memory programming using the JTAG interface (it is just an example, check out the AN105 form silicon labs. That is what I call a relevant document).

Now, I don't care about the flash memory in to FPGA. I only want to upload the CRAM image into the chip with my MPU. I have my flash memory for that with all the different firmwares. How simple and trivial could it be? For Altera, it seems irrelevant.

Even finding how the destination of the image (CRAM or Flash) is chosen is impossible: nothing is said about choosing where the image is programmed except that it is stored in files with different extensions (.sof or .pof). Isn't this an important information? It seems not, because the programming tools knows - and it is the only thing that matters. Have to go to each customer with my laptop, a USB blaster and a license of Quartus, opening the box, plugging the JTAG and upgrade the Firmware? One must be joking.

So, where is the pertinent information: the JTAG instructions for programming the device? Anyone ?

Just an example of the madness of the documentation. Take a look at page 28 of this "MAX 10 FPGA Configuration User Guide". One can see the configuration sequence. Great. Seems clear. Now take a look page 34. This makes no sense at all. On one page, there is a sequence of states to apply to the nSTATUS, CONF_DONE and nCONFIG pins. On the other hand, they are connected as fixed pull-ups. It took me some time to understand that when they write "the xxxx pin is pulled low", they forgot to add "by the FPGA itself" (if I understand correctly – except that nCONFIG is an input… Whatever). This is so badly written that I'm very afraid about the rest. Have I to fight against the documentation to even try to start something? It's not specially an Altera/Intel specificity, I've had similar experience with Microchip or Lattice, but here a new level is reached. It seems to be normal. But I'm very irritated to spend the majority of my development time with external ridiculous causes instead of working on my own stuff.

Other example that erodes the confidence about the documentation: the device pinouts. Any manufacturer offers package drawings with the pinouts. But it seems too old fashion or not "disruptive enough". Each device is described into an unreadable tableau (available on microfilms) with suspect stuff. Of course, there is no footprint or CAD data to integrate into the EDA software (except Cadence). It seems (as I could read somewhere in these forums) that it does not matter because one could create the component within minutes. Seems to me that these people never create libraries for these kind of component.

Where is the VREFB1N0 pin (you know these common mode ouput voltage pins that are NOT explained at all in the handbook) in the 10M40 and 10M50 versions? Is it normal or is there a mistake there? I had to check with Quartus to be sure that, yes, this pin is NOT available in these versions. Why ? I don't know. But, you discover this by luck, like ton of other stuff. Isn't it an important detail ? Why there is no document showing all the differences with each versions of the MAX 10 line (not only the number of logic elements) ?

These are only a few examples of crazy things I got during a few days of documentation reading, but I could add dozens of them. How one can choose so poorly documented parts? Only because it is Intel? Have I to choose a $30000 Stratix 10 to deserve good documentation? Or paying $$$ for technical support on trivial stuff?

No, really, this didn't start well.

And I still don't know how to program this thing.

Jérôme.

12 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Just wondering what the point of this post is? Just a big rant? Why not ask questions to help solve problems?

    15 years spent reading documentation for various IP cores from both xilinx and altera (now intel), and I'm very sure that the altera stuff is far better.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Out of curiosity, and I'm going to start with this on purpose, if you started developing for the first time with say an AVR (microcontroller), and wanted to program it, what would be the first thing you do? Personally I would acquire a programmer from the manufacturer, and verify the connections needed to wire it up based on application notes and the datasheet. In your case it seems your first step was to immediately try to engineer from scratch your own JTAG programmer starting at the lowest possible level - something which is inevitably going to lead to a lot of confusion and trouble.

    The reason that I started with that is that I am hoping you can see perhaps why your are struggling to start. You've basically come to a new ecosystem - Altera/Intel FPGAs - and then figuratively thrown yourself into the deep end, into a sea of technical literature which has a lot of information with very vendor specific terminology (I do agree it is not in places well written, in fact its terrible in some places) about low level stuff you really don't need to be concerned about when starting out.

    My suggestion would be to start with the following steps:

    1. Download and install the Quartus II software and the device support files for your FPGA (in this case the MAX 10 device files). This can be a pain in the neck, but you can make it smoother by ensuring you install into the default directory (assuming windows) of c:\altera\... (not in C:\Program Files\...!)

    2. If you haven't already, acquire either a development kit for the FPGA family of interest (e.g. https://www.altera.com/products/boards_and_kits/dev-kits/altera/max-10-fpga-development-kit.html) or at the very least a programmer - typically for Altera that is a "USB Blaster II" programmer - Terasic do a clone for only $50 which is a bargin for the amount of time it will save. (*)

    3a. If you do get a dev kit, starting off is much simpler. You can just install the driver, and then load "Quartus Programmer" which is a software that allows you to graphically scan the JTAG chain, select the device you wish to program, select the file you wish to program, and select where in the device you wish to program. At this point I will also dispel one of your points - "it would be stupid and ridiculous to need exclusively such tools to upgrade this FPGA" - not at all ridiculous. Every manufacture of any non-generic microcontroller, FPGA, SoC, processor, etc. has their own tools for their own devices. It's a pain I agree but it's not an Altera/Intel specific thing.

    3b. If you start with just the programmer and a blank chip, you will need to build a breakout board with the necessary programmer connections. You can find information on the pinout Altera use for "JTAG Programming". For wiring it up, I would recommend using the design files and schematics provided for free with Altera dev kits (and free to download from the Altera site without purchasing a kit) as a starting point for you design. Most of these kits have a MAX II based USB Blaster implementation on them, but will usually also have a JTAG header on board for using a programmer, so you can strip away the MAX II stuff when wiring up your own and go with just the programming header.

    4. Look for the code and design samples that come with the dev kits (even if you aren't using it). You can use these projects and their documentation to get started with programming. There is typically some document or other that walks through a "my first project" for a dev kit which you can use as a starting resource.

    ---

    The biggest problem you will find with any ecosystem for FPGAs is a lack of documentation which can be understood by those new to the ecosystem. You'll find the same problems with Xilinx and Lattice and others. FPGAs have never really found their way into the hobby ecosystem which means that all of the resources and knowledge that get developed either are part of university courses (how I learned), or stay with the companies that use FPGAs and who have invested time and money to decipher what is going on.

    ---

    (*) Note: Of course you can build such programmers cheaply around a PIC18F14K50 (google will find you the links), but I wouldn't start with that because if it doesn't work you won't find much support for it and you'll be left struggling as to whether it is the FPGA, programmer, or connections that are not working.