-
Notifications
You must be signed in to change notification settings - Fork 15
Home
Here is some information on how to use all this. Thanks to Jim Westfall for brief info.
You want to grab the zip file from here
Hold down the B0 button on the STM board and plug it into your computer. This will put the STM board into programming mode. The first time you do this you will likely need to install drivers for it. To install the driver run the included "DFU_Driver/STM32Bootloader.Bat" as administrator. You might need to re-plugin after installing the driver, I dont recall. Copy the cart.bin to the same dir you decompressed the zip to. Run "WeAct Studio USB Download Tool. Bat", it will prompt you for a filename, type in cart.bin. This will program the STM board. Once its done you should see the firmware running on the STM board's screen "P-ROM VTX V1".
The right most button on the STM board is the only button used for navigation in the firmware. A single short press will go to the next menu item, a 2 second press will pick the current item. The top level menu lets you pick the rom type (P, S, M, V, C). Once you select a rom type, you can choose from between TEST, DUMP, PROG, VERI.
The TEST command will try to read the flash chip's ID. I've documented what I have gotten on them all here along with the crcs of the original flash contents, but they need to be verified they are correct.
The DUMP command will dump the contents of the flash to xrom.bin, where x is p, s, m, v or c depending on which flash type you picked. ie P-ROM DUMP will write to prom.bin file.
The PROG command will write xrom to the flash, where x is p, s, m, v or c depending on which flash type you picked. ie P-ROM PROG will write prom to the flash. Note that dump and prog use different files (prom.bin vs prom)
The VERI command will verify the flash against the xrom file, where x is p, s, m, v or c depending on which flash type you picked. ie P-ROM VERI will compare the flash with the prom file.
The sdcard should be formatted FAT. I've been using a 16G sandisk.
The compiler will create the following rom files under the ROM folder
- crom-1
- crom-2
- mrom
- prom-1
- prom-2
- prom-3
- srom
- vrom
These are the roms that need to be written to the flash chips. You will notice crom/prom's filenames don't match up with the expected filenames the PROG command is wanting. So you will need to
- install c1 flash chip in STM board
- copy crom-1 to the sdcard
- rename crom-1 to crom on the sdcard
- program the flash (and verify)
- install c2 flash chip in STM board
- copy crom-2 to the sdcard
- rename crom-2 to crom on the sdcard
- program flash (and verify) And the same type of thing for the proms
The compiler will also create the following verilog include files in the Verilog folder
-
ix_c.inc
-
ix_p.inc
-
ix_v.inc
-
ix_c.inc needs to be copied to CPLD/XXX/CHA_CP1/rtl/ directory
-
ix_p.inc needs to be copied to CPLD/XXX/PROG_CP1/rtl/ directory
-
ix_v.inc needs top be copied to CPLD/XXX/PROG_PCM2/rtl/ directory
Where XXX is either AES or MVS depending on your 161in1 cart.
The pinout of the jtag connector on the 161in1 boards is
- pin 1 = VCC (3.3V)
- pin 2 = GND
- pin 3 = TCK
- pin 4 = TDO
- pin 5 = TDI
- pin 6 = TMS
You would need to wire up the jtag connector to the usb blaster based on that. I didn't program my CPLDs with a usb blaster so someone else will need to help with that.
Each CPLD has its own Quartus project. So in Quartus do open project goto the synth directory of a given CPLD and open the project file. Pressing the Compile/Play button will compile the verilog code (this will only work if you copied over the ix_X.inc file from above). Once you have it compiled you would then need to program it to the the corresponding CPLD.