-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add files to perform the implementation on 35t and 100t boards
Add test.sh Add arty.xdc
- Loading branch information
Showing
2 changed files
with
97 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
## Clock signal | ||
|
||
set_property LOC E3 [ get_ports clk_i ] | ||
|
||
set_property IOSTANDARD LVCMOS33 [ get_ports clk_i ] | ||
|
||
create_clock -name sys_clk_pin -period 10.00 [ get_ports clk_i ] | ||
|
||
## UART | ||
|
||
set_property LOC A9 [ get_ports uart0_rxd_i ] | ||
set_property LOC D10 [ get_ports uart0_txd_o ] | ||
|
||
set_property IOSTANDARD LVCMOS33 [ get_ports uart0_rxd_i ] | ||
set_property IOSTANDARD LVCMOS33 [ get_ports uart0_txd_o ] | ||
|
||
## RESET | ||
|
||
set_property LOC C2 [ get_ports rstn_i ] | ||
set_property IOSTANDARD LVCMOS33 [ get_ports rstn_i ] | ||
|
||
## LEDs | ||
set_property LOC H5 [ get_ports gpio_o[0] ] | ||
set_property LOC J5 [ get_ports gpio_o[1] ] | ||
set_property LOC T9 [ get_ports gpio_o[2] ] | ||
set_property LOC T10 [ get_ports gpio_o[3] ] | ||
|
||
set_property IOSTANDARD LVCMOS33 [ get_ports gpio_o[0] ] | ||
set_property IOSTANDARD LVCMOS33 [ get_ports gpio_o[1] ] | ||
set_property IOSTANDARD LVCMOS33 [ get_ports gpio_o[2] ] | ||
set_property IOSTANDARD LVCMOS33 [ get_ports gpio_o[3] ] | ||
|
||
## Pmod Header JA (unused GPIO outputs) | ||
|
||
set_property LOC G13 [ get_ports gpio_o[4] ] | ||
set_property LOC B11 [ get_ports gpio_o[5] ] | ||
set_property LOC A11 [ get_ports gpio_o[6] ] | ||
set_property LOC D12 [ get_ports gpio_o[7] ] | ||
|
||
set_property IOSTANDARD LVCMOS33 [ get_ports gpio_o[4] ] | ||
set_property IOSTANDARD LVCMOS33 [ get_ports gpio_o[5] ] | ||
set_property IOSTANDARD LVCMOS33 [ get_ports gpio_o[6] ] | ||
set_property IOSTANDARD LVCMOS33 [ get_ports gpio_o[7] ] |
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,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
cd $(dirname "$0") | ||
|
||
if [[ -z "${Board}" ]]; then | ||
Arty='35t' | ||
elif [[ $Board == '35t' ]]; then | ||
Arty='35t' | ||
elif [[ $Board == '100t' ]]; then | ||
Arty='100t' | ||
else | ||
echo "Error Board must be 35t or 100t" | ||
exit | ||
fi | ||
|
||
echo "Selected board is" $Arty | ||
|
||
apt update -qq | ||
|
||
apt install -y git | ||
|
||
git clone --recursive https://github.com/stnolting/neorv32-setups | ||
|
||
mkdir -p build | ||
|
||
echo "Analyze NEORV32 CPU" | ||
|
||
ghdl -i --workdir=build --work=neorv32 ./neorv32-setups/neorv32/rtl/core/*.vhd | ||
ghdl -i --workdir=build --work=neorv32 ./neorv32-setups/neorv32/rtl/core/mem/neorv32_dmem.default.vhd | ||
ghdl -i --workdir=build --work=neorv32 ./neorv32-setups/neorv32/rtl/core/mem/neorv32_imem.default.vhd | ||
ghdl -i --workdir=build --work=neorv32 ./neorv32-setups/neorv32/rtl/test_setups/neorv32_test_setup_bootloader.vhd | ||
ghdl -m --workdir=build --work=neorv32 neorv32_test_setup_bootloader | ||
|
||
echo "Synthesis with yosys and ghdl as module" | ||
|
||
yosys -m ghdl -p 'ghdl --workdir=build --work=neorv32 neorv32_test_setup_bootloader; synth_xilinx -nodsp -nolutram -flatten -abc9 -arch xc7 -top neorv32_test_setup_bootloader; write_json neorv32_test_setup_bootloader.json' | ||
|
||
if [[ $Arty == '35t' ]]; then | ||
echo "Place and route" | ||
nextpnr-xilinx --chipdb /usr/local/share/nextpnr/xilinx-chipdb/xc7a35t.bin --xdc arty.xdc --json neorv32_test_setup_bootloader.json --write neorv32_test_setup_bootloader_routed.json --fasm neorv32_test_setup_bootloader.fasm | ||
echo "Generate bitstream" | ||
../../prjxray/utils/fasm2frames.py --part xc7a35tcsg324-1 --db-root /usr/local/share/nextpnr/prjxray-db/artix7 neorv32_test_setup_bootloader.fasm > neorv32_test_setup_bootloader.frames | ||
../../prjxray/build/tools/xc7frames2bit --part_file /usr/local/share/nextpnr/prjxray-db/artix7/xc7a35tcsg324-1/part.yaml --part_name xc7a35tcsg324-1 --frm_file neorv32_test_setup_bootloader.frames --output_file neorv32_test_setup_bootloader_35t.bit | ||
elif [[ $Arty == '100t' ]]; then | ||
echo "Place and route" | ||
nextpnr-xilinx --chipdb /usr/local/share/nextpnr/xilinx-chipdb/xc7a100t.bin --xdc arty.xdc --json neorv32_test_setup_bootloader.json --write neorv32_test_setup_bootloader_routed.json --fasm neorv32_test_setup_bootloader.fasm | ||
echo "Generate bitstream" | ||
../../prjxray/utils/fasm2frames.py --part xc7a100tcsg324-1 --db-root /usr/local/share/nextpnr/prjxray-db/artix7 neorv32_test_setup_bootloader.fasm > neorv32_test_setup_bootloader.frames | ||
../../prjxray/build/tools/xc7frames2bit --part_file /usr/local/share/nextpnr/prjxray-db/artix7/xc7a100tcsg324-1/part.yaml --part_name xc7a100tcsg324-1 --frm_file neorv32_test_setup_bootloader.frames --output_file neorv32_test_setup_bootloader_100t.bit | ||
fi | ||
|
||
echo "Implementation completed" |