80 lines
1.8 KiB
Markdown
80 lines
1.8 KiB
Markdown
|
|
# Lattice notes
|
||
|
|
|
||
|
|
## MachXO2/MachXO3
|
||
|
|
|
||
|
|
### Flash memory:
|
||
|
|
|
||
|
|
*.jed* file is the default format generated by *Lattice Diamond*, so nothing
|
||
|
|
special must be done to generates this file.
|
||
|
|
|
||
|
|
__file load__:
|
||
|
|
```bash
|
||
|
|
openFPGALoader [-b yourboard] impl1/*.jed
|
||
|
|
```
|
||
|
|
where *yourboard* may be:
|
||
|
|
* *machX02EVN*
|
||
|
|
* *machXO3SK*
|
||
|
|
|
||
|
|
### SRAM:
|
||
|
|
|
||
|
|
To generates *.bit* file **Bitstream file** must be checked under **Exports Files** in *Lattice Diamond* left panel.
|
||
|
|
|
||
|
|
__file load__:
|
||
|
|
```bash
|
||
|
|
openFPGALoader [-b yourboard] impl1/*.bit
|
||
|
|
```
|
||
|
|
where *yourboard* may be:
|
||
|
|
* *machX02EVN*
|
||
|
|
* *machXO3SK*
|
||
|
|
|
||
|
|
## iCE40
|
||
|
|
|
||
|
|
*.bin* is the default format generated by *nextpnr*, so nothing special
|
||
|
|
must be done.
|
||
|
|
|
||
|
|
Since most ice40 boards uses the same pinout between *FTDI* and *SPI flash* a generic *ice40_generic* board is provided.
|
||
|
|
|
||
|
|
For the specific case of the *iCE40HXXK-EVB* where no onboard programmer is present, please use this:
|
||
|
|
|
||
|
|
| FTDI | iCE40HXXK-EVB |
|
||
|
|
|--------------|----------------------|
|
||
|
|
| SCK (ADBUS0) | Pin 9 |
|
||
|
|
| SI (ADBUS1) | Pin 8 |
|
||
|
|
| SO (ADBUS2) | Pin 7 |
|
||
|
|
| CS (ABDUS4) | Pin 10 |
|
||
|
|
| RST (ADBUS6 | Pin 6 |
|
||
|
|
| DONE (ADBUS7)| Pin 5 |
|
||
|
|
|
||
|
|
__bin file load__
|
||
|
|
```bash
|
||
|
|
openFPGALoader -b ice40_generic /somewhere/*.bin
|
||
|
|
```
|
||
|
|
|
||
|
|
Since it's a direct access to the flash (SPI) the *-b* option is required.
|
||
|
|
|
||
|
|
## ECP5/Crosslink-NX
|
||
|
|
|
||
|
|
### SRAM:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
openFPGALoader [-b yourBoard] [-c yourCable] -m project_name/*.bit
|
||
|
|
```
|
||
|
|
|
||
|
|
**By default, openFPGALoader load bitstream in memory, so the '-m' argument is optional**
|
||
|
|
|
||
|
|
### SPI Flash:
|
||
|
|
|
||
|
|
#### bit
|
||
|
|
|
||
|
|
```bash
|
||
|
|
openFPGALoader [-b yourBoard] [-c yourCable] -f project_name/*.bit # or *.bin
|
||
|
|
```
|
||
|
|
|
||
|
|
#### mcs
|
||
|
|
|
||
|
|
To generates *.mcs* file **PROM File** must be checked under **Exports Files** in *Lattice Diamond* left panel.
|
||
|
|
|
||
|
|
```bash
|
||
|
|
openFPGALoader [-b yourBoard] [-c yourCable] project_name/*.mcs
|
||
|
|
```
|