-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from pulp-platform/marcowidmer-fpga-zcu104
- Loading branch information
Showing
36 changed files
with
1,484 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
pulpissimo/* | ||
pulpissimo_genesys2.bin | ||
pulpissimo_genesys2.bit | ||
pulpissimo_zcu104.bin | ||
pulpissimo_zcu104.bit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# PULPissimo on the Digilent Genesys2 Board | ||
[\[Documentation\]](https://reference.digilentinc.com/reference/programmable-logic/genesys-2/start) | ||
|
||
## Bitstream Generation | ||
In the fpga folder, run | ||
```Shell | ||
make genesys2 | ||
``` | ||
which will generate `pulpissimo_genesys2.bit`. | ||
Use Vivado to load it into the FPGA. | ||
|
||
## Default SoC and Core Frequencies | ||
|
||
By default the clock generating IPs are synthesized to provide the following frequencies to PULPissimo: | ||
|
||
| Clock Domain | Default Frequency on Genesys2 board | | ||
|----------------|-------------------------------------| | ||
| Core Frequency | 20 MHz | | ||
| SoC Frequency | 10 MHz | | ||
|
||
|
||
## Peripherals | ||
PULPissimo is connected to the following board peripherals: | ||
|
||
|
||
| PULPissimo Pin | Mapped Board Peripheral | | ||
|----------------|-----------------------------------------------------| | ||
| `SPIM0` pins | QSPI Flash | | ||
| `I2C0` pins | I2C Bus (connects to Board Current Measurement ICs) | | ||
| `spim_csn1` | LED0 | | ||
| `cam_pclk` | LED1 | | ||
| `cam_hsync` | LED2 | | ||
| `cam_data0` | LED3 | | ||
| `cam_data1` | Switch 1 | | ||
| `cam_data2` | Switch 2 | | ||
| `cam_data3` | Button C | | ||
| `cam_data4` | Button D | | ||
| `cam_data5` | Button L | | ||
| `cam_data6` | Button R | | ||
| `cam_data7` | Button U | | ||
|
||
### Reset Button | ||
The USER RESET button (BTN1) resets the RISC-V CPU. | ||
|
||
### UART | ||
PULPissimo's UART port is mapped to the onboard FTDI FT232R USB-UART bridge and thus accessible through the UART micro-USB connector J15. | ||
|
||
### JTAG | ||
PULPIssimo's JTAG plug is connected to Channel 0 of the onboard FTDI USB JTAG | ||
programmer. Therefore we can attach OpenOCD withouth the need of an external | ||
JTAG programmer. Just attach a micro-USB cable to the JTAG SW17 micro-USB connector and use the | ||
provided OpenOCD configuration file: | ||
|
||
```Shell | ||
$OPENOCD/bin/openocd -f pulpissimo/fpga/pulpissimo-genesys2/openocd-genesys2.cfg | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#Ignore vivado project files generated by the tcl script | ||
**/.Xil/* | ||
**/reports/* | ||
**/*.cache/* | ||
**/*.hw/* | ||
**/*.ip_user_files/* | ||
**/*.runs/* | ||
**/*.sim/* | ||
**/*.srcs/* | ||
*.edf | ||
*.xpr | ||
*.jou | ||
*.log | ||
|
||
.cxl.* | ||
|
||
*_stub.v | ||
gmon.out | ||
|
||
/pulpissimo/**/pulpissimo.bit | ||
|
||
**/xdc/constraints.xdc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
PROJECT:=pulpissimo_zcu104 | ||
VIVADO ?= vivado | ||
VIVADOFLAGS ?= -nojournal -mode batch -source scripts/prologue.tcl | ||
|
||
include fpga-settings.mk | ||
|
||
.DEFAULT_GOAL:=help | ||
|
||
.PHONY: help | ||
|
||
all: ips ## Generate the bitstream for pulpissimo with vivado in batch mode. The vivado invocation command may be overriden with the env variable VIVADO. | ||
$(VIVADO) -mode batch -source tcl/run.tcl | ||
|
||
gui: ips ## Generates the bitstream for pulpissimo with vivado in GUI mode. The vivado invocation command may be overriden with the env variable VIVADO. | ||
$(VIVADO) -mode gui -source tcl/run.tcl & | ||
|
||
ips: clk ram ## Synthesizes necessary xilinx IP | ||
|
||
clean-ips: clean-clk clean-ram ## Clean all IPs | ||
|
||
clk: ## Synthesizes the Xilinx Clocking Manager IPs | ||
cd ips/xilinx_clk_mngr; make clean all | ||
cd ips/xilinx_slow_clk_mngr; make clean all | ||
|
||
clean-clk: ## Removes all Clocking Wizard IP outputs | ||
cd ips/xilinx_clk_mngr; make clean | ||
cd ips/xilinx_slow_clk_mngr; make clean | ||
|
||
ram: ## Synthesizes the Xilinx Block Memory Generator IPs for PULPissimo's L2 Ram | ||
cd ips/xilinx_interleaved_ram; make clean all | ||
cd ips/xilinx_private_ram; make clean all | ||
|
||
clean-ram: ## Removes all Block Ram IP outputs related to l2 ram | ||
cd ips/xilinx_interleaved_ram; make clean | ||
cd ips/xilinx_private_ram; make clean | ||
|
||
clean: ## Removes all bitstreams, *.log files and vivado related files (rm -rf vivado*) | ||
rm -rf ${PROJECT}.*[^'bit'] | ||
rm -rf ${PROJECT}.*[^'bin'] | ||
rm -rf *.log | ||
rm -rf vivado* | ||
|
||
help: | ||
@grep -E -h '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# PULPissimo on the Xilinx ZCU104 Board | ||
[\[Datasheet\]](https://www.xilinx.com/support/documentation/boards_and_kits/zcu104/ug1267-zcu104-eval-bd.pdf) | ||
|
||
## Bitstream Generation | ||
In the fpga folder, run | ||
```Shell | ||
make zcu104 | ||
``` | ||
which will generate `pulpissimo_zcu104.bit`. | ||
Use Vivado to load it into the FPGA. | ||
|
||
## Default SoC and Core Frequencies | ||
|
||
By default the clock generating IPs are synthesized to provide the following frequencies to PULPissimo: | ||
|
||
| Clock Domain | Default Frequency on ZCU104 board | | ||
|----------------|------------------------------------| | ||
| Core Frequency | 20 MHz | | ||
| SoC Frequency | 10 MHz | | ||
|
||
|
||
## Peripherals | ||
Most peripherals of are connected to the ARM processing system domain of the SoC and cannot be used from the programmable logic domain. | ||
The peripherals available to PULPissimo are thus very limited. | ||
|
||
### Reset Button | ||
The CPU RESET button (SW20) resets the RISC-V CPU. | ||
|
||
### UART | ||
PULPissimo's UART port is mapped to Channel D of the FT4232HL chip. | ||
When connecting the board to a computer using the USB/JTAG/UART micro-USB connector (J164), it is the last of the four detected serial devices. | ||
|
||
### JTAG | ||
Unfortunately, only one channel of the FT4232HL chip is connected to the programmable logic domain. | ||
Since we are using that channel for UART, the micro-USB connector on the board cannot be used to communicate with the RISC-V debug module over JTAG. | ||
Instead, you need to connect a separate JTAG adapter to the GPIO port (PMOD0 header) of the board: | ||
|
||
| JTAG Signal | FPGA Port | J55 Pin | | ||
|-------------|-----------|----------| | ||
| tms | PMOD0_0 | Pin 1 | | ||
| tdi | PMOD0_1 | Pin 3 | | ||
| tdo | PMOD0_2 | Pin 5 | | ||
| tck | PMOD0_3 | Pin 7 | | ||
| gnd | GND | Pin 9 | | ||
| vdd | 3V3 | Pin 11 | | ||
|
||
An OpenOCD configuration file for the Digilent JTAG-HS1 adapter is included. | ||
To use it, run | ||
|
||
```Shell | ||
$OPENOCD/bin/openocd -f pulpissimo/home/meggiman/projects/pulp/pulpissimo/fpga/pulpissimo-zcu104/openocd-zcu104-digilent-jtag-hs1.cfg | ||
``` |
Oops, something went wrong.