75XX FPGA: Difference between revisions

From embeddedTS Manuals
No edit summary
m (Links auto-updated for 2022 re-branding ( https://files.embeddedarm.com/ts-arm-sbc/ts-7500-linux/sources/ts75xx_opencores_source.tar.gz →‎ https://files.embeddedTS.com/ts-arm-sbc/ts-7500-linux/sources/ts75xx_opencores_source.tar.gz https://files.embeddedarm.com/ts-arm-sbc/ts-7500-linux/binaries/ts-utils/jed2vme.x86 →‎ https://files.embeddedTS.com/ts-arm-sbc/ts-7500-linux/binaries/ts-utils/jed2vme.x86 https://files.embeddedarm.com/ts-arm-sbc/ts-7500-linux/binaries/ts-utils/jed2vme →‎ htt...)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The source is available [ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7553-linux/sources/ts75xx_opencores_source.tar.gz here].
{{Note|We do not provide support for the opencores under our free support, however we do offer custom FPGA programming services.  If interested, please [http://www.embeddedTS.com/support/contact-us.php contact us].}}


We have prepared the opencore projects which gives you the ability to reprogram the FPGA while either preserving or removing our functionality as you choose.  The code sources are in verilog, and we use Lattice Diamond to generate the JEDEC file.  You can download Lattice Diamond [http://www.latticesemi.com/products/designsoftware/diamond/index.cfm from their site].  You can request a free license, and it will run in either Windows or Linux.
The opencore FPGA sources are available [https://files.embeddedTS.com/ts-arm-sbc/ts-7500-linux/sources/ts75xx_opencores_source.tar.gz here].


Once you have generated the JEDEC file, we have an application called called [ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/binaries/ts-utils/jed2vme.x86 jed2vme] which can be run from an x86 linux system, or [ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/binaries/ts-utils/jed2vme directly on the board].  You must use this copy we provide as it is modified to force the bitstream to be written to SRAM. '''Using the jed2vme provided by Lattice can brick the board'''.  Take the resulting vme file and gzip it.  To execute this directly on the TS-7500 you can simply save it in the ramdisk in '/ts7500_bitstream.vme.gz'.  On startup your bitstream will be loaded.
We have prepared the opencore projects which gives you the ability to reprogram the FPGA while either preserving or removing our functionality as you choose.  The code sources are in verilog, and we use Lattice Diamond to generate the JEDEC file.  You can download Lattice Diamond [http://www.latticesemi.com/products/designsoftware/diamond/index.cfm from their site].  You can request a free license, and it will run in either Windows or Linux (only Redhat is supported). In the sources you can find the functionality switches in the <boardname>_top.v file:
<source lang=verilog>
parameter sdcard_opt = 1'b1;
parameter spi_opt = 1'b1;
parameter nandflash_opt = 1'b1;
parameter can_opt = 1'b1; /*If CAN is enabled, only two XUARTs can be used*/
/* software currently requires these to be enabled/disabled contiguously. */
parameter xuart0_opt = 1'b1;
parameter xuart1_opt = 1'b1;
parameter xuart2_opt = 1'b0;
parameter xuart3_opt = 1'b0;
parameter xuart4_opt = 1'b0;
parameter xuart5_opt = 1'b0;
parameter xuart6_opt = 1'b0;
parameter xuart7_opt = 1'b0;
</source>


The linuxrc script will call 'ts7500ctl --loadfpga=ts7500_bitstream.vme.gz', so you can also use that command also to load the bitstream at any time.  The FPGA contains flash memory which contains Technologic System's default FPGA SRAM load. The "ts7500ctl --loadfpga" will not overwrite the flash memory of the FPGA and will only load the SRAM contents of the FPGA, making for an unbrickable system if something should go wrong. If something does go wrong, you can restore the onboard flash via the offboard flash or microSD card.
You can use these switches to enable and disable functionality.  We do not enable everything at the same time because of space constraints on the FPGA.  So for example, to disable CAN and enable the rest of the XUARTS:
<source lang=verilog>
parameter sdcard_opt = 1'b1;
parameter spi_opt = 1'b1;
parameter nandflash_opt = 1'b1;
parameter can_opt = 1'b0; /*If CAN is enabled, only two XUARTs can be used*/
/* software currently requires these to be enabled/disabled contiguously. */
parameter xuart0_opt = 1'b1;
parameter xuart1_opt = 1'b1;
parameter xuart2_opt = 1'b1;
parameter xuart3_opt = 1'b1;
parameter xuart4_opt = 1'b1;
parameter xuart5_opt = 1'b1;
parameter xuart6_opt = 1'b1;
parameter xuart7_opt = 1'b1;
</source>
 
For more advanced changes you may look to opencores.org which has many examples of FPGA cores.  To build the FPGA with your new changes, go to the 'Processes' tab and double-click 'JEDEC File'.  This will build a jedec file in the project directory.  On a linux system, either x86 compatible or ARM, we provide an application called jed2vme.
 
[https://files.embeddedTS.com/ts-arm-sbc/ts-7500-linux/binaries/ts-utils/jed2vme.x86 jed2vme for x86]
 
[https://files.embeddedTS.com/ts-arm-sbc/ts-7500-linux/binaries/ts-utils/jed2vme jed2vme for ARM (oabi)]
 
We also have the sources [https://files.embeddedTS.com/ts-arm-sbc/ts-7500-linux/sources/jed2vme.c here].
 
{{Warning|Do not use the 'jed2vme' provided by Lattice.  Their version writes to flash and as the opencores do not contain the bootrom so '''this will brick your board'''.}}
 
jed2vme can be used like this:
<source lang=bash>
jed2vme bitstream.jed | gzip > bitstream.vme.gz
</source>
 
To execute this on your board run this:
<source lang=bash>
ts7500ctl --loadfpga=bitstream.vme
# or
ts7500ctl --loadfpga=bitstream.vme.gz
</source>
 
As space is constrained in the initrd it is suggested to gzip the file as shown in the jed2vme example.  To load this bitstream automatically you can place it in the root of the initrd and name it '/ts7500_bitstream.vme.gz'.  The linuxrc script will by default load this bitstream immediately on startup (before the fastboot shell)You should first test it manually to make sure it loads ok.
 
The FPGA contains flash memory which contains Technologic System's default FPGA flash load. Using an SRAM bitstream generated by our "jed2vme" with "ts7500ctl --loadfpga" will not overwrite the flash memory of the FPGA and will only load the SRAM contents of the FPGA, making for an unbrickable system.

Latest revision as of 16:26, 17 January 2022

Note: We do not provide support for the opencores under our free support, however we do offer custom FPGA programming services. If interested, please contact us.

The opencore FPGA sources are available here.

We have prepared the opencore projects which gives you the ability to reprogram the FPGA while either preserving or removing our functionality as you choose. The code sources are in verilog, and we use Lattice Diamond to generate the JEDEC file. You can download Lattice Diamond from their site. You can request a free license, and it will run in either Windows or Linux (only Redhat is supported). In the sources you can find the functionality switches in the <boardname>_top.v file:

parameter sdcard_opt = 1'b1;
parameter spi_opt = 1'b1;
parameter nandflash_opt = 1'b1;
parameter can_opt = 1'b1; /*If CAN is enabled, only two XUARTs can be used*/
/* software currently requires these to be enabled/disabled contiguously. */
parameter xuart0_opt = 1'b1;
parameter xuart1_opt = 1'b1;
parameter xuart2_opt = 1'b0;
parameter xuart3_opt = 1'b0;
parameter xuart4_opt = 1'b0;
parameter xuart5_opt = 1'b0;
parameter xuart6_opt = 1'b0;
parameter xuart7_opt = 1'b0;

You can use these switches to enable and disable functionality. We do not enable everything at the same time because of space constraints on the FPGA. So for example, to disable CAN and enable the rest of the XUARTS:

parameter sdcard_opt = 1'b1;
parameter spi_opt = 1'b1;
parameter nandflash_opt = 1'b1;
parameter can_opt = 1'b0; /*If CAN is enabled, only two XUARTs can be used*/
/* software currently requires these to be enabled/disabled contiguously. */
parameter xuart0_opt = 1'b1;
parameter xuart1_opt = 1'b1;
parameter xuart2_opt = 1'b1;
parameter xuart3_opt = 1'b1;
parameter xuart4_opt = 1'b1;
parameter xuart5_opt = 1'b1;
parameter xuart6_opt = 1'b1;
parameter xuart7_opt = 1'b1;

For more advanced changes you may look to opencores.org which has many examples of FPGA cores. To build the FPGA with your new changes, go to the 'Processes' tab and double-click 'JEDEC File'. This will build a jedec file in the project directory. On a linux system, either x86 compatible or ARM, we provide an application called jed2vme.

jed2vme for x86

jed2vme for ARM (oabi)

We also have the sources here.

WARNING: Do not use the 'jed2vme' provided by Lattice. Their version writes to flash and as the opencores do not contain the bootrom so this will brick your board.

jed2vme can be used like this:

jed2vme bitstream.jed | gzip > bitstream.vme.gz

To execute this on your board run this:

ts7500ctl --loadfpga=bitstream.vme
# or
ts7500ctl --loadfpga=bitstream.vme.gz

As space is constrained in the initrd it is suggested to gzip the file as shown in the jed2vme example. To load this bitstream automatically you can place it in the root of the initrd and name it '/ts7500_bitstream.vme.gz'. The linuxrc script will by default load this bitstream immediately on startup (before the fastboot shell). You should first test it manually to make sure it loads ok.

The FPGA contains flash memory which contains Technologic System's default FPGA flash load. Using an SRAM bitstream generated by our "jed2vme" with "ts7500ctl --loadfpga" will not overwrite the flash memory of the FPGA and will only load the SRAM contents of the FPGA, making for an unbrickable system.