When I started writing this weeks post I thought it was going to be a short one, but it turned out to be a bumper week this week! So, let’s get started…
The CPLD (Complex Programmable Logic Device) is the square chip at the centre of the PiStorm, it translates the logic between the Pi’s GPIO and the Amiga, so is essentially the glue logic for the PiStorm to function. The firmware you flash onto the PiStorm goes directly onto this chip. Since it is the heart of the PiStorm, it is important that the chip be correct.
There has been some confusion this week over some PiStorm boards that were sold with MAX CPLD chips on them that are not compatible with PiStorm, so I figured I would dive into which chips are compatible and which are not, as well as why not, for any builders out there.
Intel’s Altera make two different versions of the MAX CPLDs, the MAX II and the MAX V. PiStorm was designed with the MAX II in mind. This is due to it being freely and cheeply available at the time on JLCPCBs build service whilst meeting the requirements of PiStorm. The revision B was altered with the idea that eventually PiStorm might be able to switch to MAX V, this is because MAX II is reaching end of life. There are still thousands of MAX II CPLDs out there for now even if JLCPCB do not have stock. So, let’s dive into the model number and see what is and is not compatible.
This is pretty simple, MAX II chips have “EPM” at the start and MAX V chips have “5M” at the start. They both also have the type in bold text on the chip. Only MAX II are compatible at the moment and we will see why when we get to the variant section.
This is essentially the size of the logic inside the chip. PiStorm was originally designed with the “570” in mind but so little logic was used that the “240” model became standard (and there is still lots of space left in that one).
This is where things get a little tricky, there are three different things that can be here:
Now, the “Z” variant here is where I want to focus. To become lower power it halves the maximum frequency I/O it can work with. The regular and “G” variants can handle 304MHz, the “Z” variant can only handle 152MHz. PiStorm’s synchronisation clock runs at 200MHz. So the “Z” variant cannot keep up.
This is important because the MAX V CPLDs only come in “Z” variants and therefore are not fast enough for the current PiStorm communication protocol.
For PiStorm this likely will always be “T” to signify a TQFP. There are other codes such as “F” and “M” to signify different BGA configurations, but it is unlikely PiStorm will use those as those are too difficult for many builders to solder in comparison.
This signifies the number of pins on the chip, PiStorm’s revisions use the 100pin version.
This is the application the CPLD is intended to be used in:
All are fine for PiStorm but the “I” and “A” variants are built to wider temperature tolerances so will typically be more expensive.
This is the reaction speed grade. The MAX II comes in three different speed grades (3, 4 or 5). With 3 being the fastest. PiStorm is designed for / tested with speed grade 5 only. Whilst others may work with the current Proto 3 firmware, we cannot guarantee they will work with Proto 4 which is currently in development. It is recommended sticking with grade 5, it is the cheapest anyway.
The “N” signifies RoHS compliance (lead-free packaging). Since PiStorm is an upgrade to a pre-RoHS machine this doesn’t really matter whether it is there or not.
Hopefully this clears up which CPLDs can be used for PiStorm and which cannot. The short story is MAX Vs cannot be used and your choice of MAX II needs to be considered.
Protocol 4 is currently in development, the firmware for this might work out to be compatible with MAX Vs but it could also prove to impact performance. Our recommendation is that no one tries to pre-empt this by building MAX V versions of PiStorm as the developers simply do not know if they will ever be compatible.
The current work from wip-crap has been merged into the main branch. Which includes:
./flash.sh
to have the script auto detect and run the openocd commands for your particular PiStorm board.To update your PiStorm you need to backup any configuration changes you made to the default configuration file and the a314 configuration. Then run the following commands from your PiStorm directory:
git reset --hard
git pull --ff-only
make clean && make
The first command will reset any conflicting changes made to the PiStorm files so that the second command can succeed. The third command rebuilds the software. The main firmware remains the same so you do not need to flash that. But you can run ./flash_experimental.sh
if you wish to try the experimental firmware, running ./flash.sh
will revert this.
Alistair Brugsch (abrugsch on Discord) has created a PiStorm tester which can help diagnose things such as soldering issues with PiStorms, indicating where the problem lies. The project can be found on GitHub and there is a slow-motion video of a prototype working below.
One of the PCBs for these turned up on my doorstep whilst I was writing this section so I’ll be looking forward to building it in the next couple of weeks.
Some of these came in as late as last night but are awesome so definitely need to be covered. There has been the following that made it to wip-crap after main was synchronised (so are not in main). UPDATE: 2 hours after I published this these changes also made it into main.
move-slow-to-chip
which if you have an 8372 Agnus moves your trapdoor slow RAM to chip RAM to give you 1MB of chip, essentially the same as changing JP2 on the motherboard (thanks to LIV2)swap-df0-df
which is a bit like a CIA based DF1 switch, but built into the PiStorm, and it can switch any DF to be DF0 (thanks to LIV2)I’m especially looking forward to trying out move-slow-to-chip
with my A500 test board and the spare 8372 I have.
I leave you with a screenshot from many years ago when Guybrush Threepwood predicted the original (pre-chipageddon) price of PiStorm…
Did I miss anything? Or is there anything that you want covered next week? Let me know! I can be found as LinuxJedi on the PiStorm Discord or LinuxJedi on Twitter.
On Saturday, I was at a Norwich Amiga Group meetup, where I got to meet…
In recent years, Microchip has launched a new range of AVR chips. They appear to…
A couple of days ago, I got banned from the WordPress community Slack. As this…
Whilst migrating from wordpress.com to an installation of the open source WordPress, I hit some…
Unfortunately, there is a war going on within the WordPress community. To stay as far…
Since the June Amiga Expo, I have been developing some new Amiga related products. I…