alexis a1f2bae898 | ||
---|---|---|
.. | ||
oak_adrdec | ||
Makefile.inc | ||
README.md | ||
find_fitter.py | ||
wo_to_vcd.py |
README.md
These are kind of a pain. Here's what you need:
Flashing
CPLDs
- CPLD programming adapter board (part of the AVL68K project)
- OpenOCD-supported JTAG programmer (I use a J-Link because I have one, but there are many more.)
These are the larger devices (ATF1502, ATF1504, etc). They're a little more of a pain. Plug the chip into the adapter board, and connect a 5V power supply to the VCC and GND pins on the power header. Plug a JTAG cable into your programmer, and tell OpenOCD to burn the .SVF files:
openocd -f /usr/share/openocd/scripts/interface/jlink.cfg \
-c "adapter speed 400" -c "transport select jtag" \
-c "jtag newtap ATF1502AS tap -irlen 3 -expected-id 0x0150203f" \
-c init -c "svf OAK.svf" -c "sleep 200" -c shutdown
Note:
- When programming an ATF1504, change the part number in the above command,
and also change the expected ID from
0x01502...
to0x01504...
. (The expected-id directive can be omitted actually...) - If your chip has been flashed with JTAG disabled before, you'll need to also apply 12V to the VPP pin. Be precise with this voltage to avoid blowing up the chip. If you bought dodgy chips off eBay and they won't program, try this.
- Speaking of dodgy stuff from eBay, I tried flashing with a knockoff Altera USB Blaster and it didn't work. It turned out to be emitting extra garbage TCK pulses. If it still doesn't program, get a scope on those JTAG lines.
Rebuilding
You need Atmel WinCupl installed under WINE. The build scripts assume it lives
in a dedicated prefix at $HOME/.wineprefix/wincupl
, with everything installed
to the default directories. Make sure to set up the prefix with
WINEARCH=win32
and use winecfg to set the Windows version to XP.
To rebuild for the CPLDs, you also need ATMISP7 installed. I don't have this set up scripted, so you have to use it manually. Add the chip to the JTAG chain with a Program/Verify action, give it the .JED file, and tell it to emit a .SVF file.
If you have gtkwave installed, the build scripts can display simulation traces.