ATF1502AS(L) and ATF1504AS(L) support #64
ole00
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've added an experimental support for more capable CPLDs from Atmel.
These are:
ATF1502AS and ATF1502ASL
ATF1504AS and ATF1504ASL
Please note that the are also 'V' versions of the above chips (ATF1502ASV etc.), but they operate on 3.3V, which means they can't be used with Arduino UNO based Afterburner. They might work with 3.3V based Arduino style board, but it is not confirmed. Some investigation will be needed to support the 'V' versions. Do not use the 'V' versions unless you want to investigate yourself (see #65 for how to make your Afterburner PCB compatible with 3.3V).
To use those devices with Afterburner, please checkout 'ole-20240406-atf150x-wip2' branch. The branch contains new afterburner.ino sketch and new PC app (precompiled binaries were updated).
These devices require an adapter to fit into the ZIF socket. The PCB for the adapter can be found in the gerbers directory (adapter1502_fab_r2.zip). This adapter is not strictly neccessary, you can plug wires directly into the ZIF socket's slots and lock the ZIF socket to keep them secured. Or you can make a simple adapter on a protoboard.
The pinout on ZIF socket is as follows:
The pinout on the PCLL IC is as follows:
TDO - 38
TDI - 7
TMS - 13
TCK - 32
VPP - 44
GND - 10, 22, 30, 42
VCC - 3, 15, 23, 35
The TDI and TDO may need a 100 Ohm resistor in series. TDO may also need about 1.2 Ohm pull-up resistor. First try it without these resistors and if you get communication errors then put the resistors in place. Ensure the wires between Afterburner and the IC sockets are quite short (no longer than 15cm , or ~ 5").
If you chose to use the provided adapter (which fits directly into the ZIF socket), then no in-series resistors are needed, but there are still footprints for the pull-up resistors and a switch (or jumper) to enable/disable the TDO pull-up. Use a combination of 2 x 680Ohm, 1k + 220Ohm, or 680 Ohm + 470 Ohm for the pull up - if needed. The pull-up resistor ensures the TDO signal reaches voltage above 3V as ATF150X chips are not guaranteed to do that. The adapter also requires to fit-in a PLCC44 socket like this one (or compatible):
https://www.digikey.co.uk/en/products/detail/adam-tech/PLCC-44-AT/9833020
NOTE: the adapter has not been properly verified yet, there might be some issues with it. I'll update this info when I get the adapter produced and when I verify it works as intended.
So far only 44 pin PLCC packages of these devices are supported. The TQFP packages of these should also work, but note that the pinout is different. See the following schematics for more info:
http://matthieu.benoit.free.fr/all03/adp/HiLo_ADP-ATF1504.PDF
Afterburner acts as a JTAG controller and should be able to program the ICs even when soldered directly on a target PCB. If you need to chain several of the ICs into the JTAG chain make sure you can physically bypass the chain (by a jumper on each device) as the JTAG bypassing (software based) is not yet implemented in Afterburner. Also ensure you have the VPP pin added on your board. If you need the VPP (OE1) pin for your logic (ie. connected to other parts on your board) ensure you have a jumper that physically disconnects the VPP (OE1) pin from the rest of your components- or else you might fry them with high voltage (11V). That jumper will need to be disconnected while programming the ICs and connected when you run your board normally.
The PLD desgin (your logic code) for ATF1502AS(L) and ATF1504AS(L) can be done in WinCUPL. The JED file that is produced
after compilation needs to be converted into a XSVF file format. So far I've managed to do that by the following steps:
Compile the JED file in WinCUPL software
https://www.microchip.com/en-us/products/fpgas-and-plds/spld-cplds/pld-design-resources
Convert the JED file to SVF file format in ATMISP7 software
https://www.microchip.com/en-us/products/fpgas-and-plds/spld-cplds/pld-design-resources
convert the SVF file to XSVF format by svf2xsvf tool
http://dangerousprototypes.com/docs/JTAG_SVF_to_XSVF_file_converter
All above tools are Windows based, but they work on Linux by using Wine.
EDIT: You can also try aft15XX_yosys project (https://github.com/hoglet67/atf15xx_yosys/) to produce a JED file. It works for me when using JED to XSVF tools stored in 'utils' directory of the wip2 branch
Once you have your design file converted to XSVF format, you can use Afterburner app to erase the chip and write your design into the IC like that (ensure the ATF150X type matches yours):
afterburner -t ATF1502AS -f mydesign.xsvf ew
You can also identify your IC by the following command:
afterburner -t ATF1502AS i
If you encounter issues while erasing or writing the IC add the '-v' parameter to display some extra messages in the verbose mode. You can also set XSVF_DEBUG preprocessor variable to 1 in jtag_xsvf_player.h to print details of each processed XSVF instruction (re-upload the afterburner.ino sketch to your Arduino if you do that).
So far the support for these ICs in Afterburner is in 'beta' or work-in-progress stage, so expect that things may not always work. Testing, ideas and feedback is welcome.
Update 2024/04/13:
to compile Verilog design into a .JED file, then use the conversion utils (see above) to produce a valid .XSVF that
can be uploaded by Afterburner into ATF1502AS IC. The device also worked with such design.
Update 2024/04/20:
Beta Was this translation helpful? Give feedback.
All reactions