diff --git a/minitests/roi_harness/README.md b/minitests/roi_harness/README.md index 2dfde7ae..4c0841cd 100644 --- a/minitests/roi_harness/README.md +++ b/minitests/roi_harness/README.md @@ -1,20 +1,110 @@ # ROI_HARNESS Minitest ## Purpose -Creates an ROI with clk, inputs, and outputs to use as a partial reconfiguration test harness -Basic idea: -- LOC LUTs in the ROI to terminate input and output routing -- Let Vivado LOC the rest of the logic -- Manually route signals in and out of the ROI enough to avoid routing loops into the ROI -- Let Vivado finish the rest of the routes +Creates an harness bitstream which maps peripherals into a region of interest +which can be reconfigured. -There is no logic outside of the ROI in order to keep IOB to ROI delays short -Its expected the end user will rip out everything inside the ROI +The currently supported boards are; -To target Arty A7 you should source the artix DB environment script then source arty.sh + * Artix 7 boards; + - [Basys 3](https://github.com/SymbiFlow/prjxray-db/tree/master/artix7/harness#basys-3) + - [Arty A7-35T](https://github.com/SymbiFlow/prjxray-db/tree/master/artix7/harness#arty-a7-35t) -To build the baseline harness: + * Zynq boards; + - [Zybo Z7-10](https://github.com/SymbiFlow/prjxray-db/tree/master/zynq7/harness#zybo-z7-10) + +The following configurations are supported; + + * SWBUT - Harness which maps a board's switches, buttons and LEDs into the + region of interest (plus clock). + + + * PMOD - Harness which maps a board's PMOD connectors into the region of + interest (plus a clock). + + * UART - Harness which maps a board's UART + + +"ARTY-A7-SWBUT" + # 4 switches then 4 buttons + A8 C11 C10 A10 D9 C9 B9 B8 + # 4 LEDs then 4 RGB LEDs (green only) + H5 J5 T9 T10 F6 J4 J2 H6 + + # clock + E3 + +"ARTY-A7-PMOD" + # CLK on Pmod JA + G13 B11 A11 D12 D13 B18 A18 K16 + # DIN on Pmod JB + E15 E16 D15 C15 J17 J18 K15 J15 + # DOUT on Pmod JC + U12 V12 V10 V11 U14 V14 T13 U13 + +"ARTY-A7-UART" + # RST button and UART_RX + C2 A9 + # LD7 and UART_TX + T10 D10 + # 100 MHz CLK onboard + E3 + +"BASYS3-SWBUT" + # Slide switch pins + V17 V16 W16 W17 W15 V15 W14 W13 V2 T3 T2 R3 W2 U1 T1 R2 + # LEDs pins + U16 E19 U19 V19 W18 U15 U14 V14 V13 V3 W3 U3 P3 N3 P1 L1 + + # UART + B18 # ins + A18 # outs + + # 100 MHz CLK onboard + W5 + +"ZYBOZ7-SWBUT" + # J15 - UART_RX - JE3 + # G15 - SW0 + # K18 - BTN0 + # K19 - BTN1 + J15 G15 K18 K19 + + # H15 - UART_TX - JE4 + # E17 - ETH PHY reset (active low, keep high for 125 MHz clock) + # M14 - LD0 + # G14 - LD2 + # M15 - LD1 + # D18 - LD3 + + # 125 MHz CLK onboard + K17 + +# Quickstart + +``` +source settings/artix7.sh +cd minitests/roi_harness +source arty-swbut.sh +make clean +make copy +``` + +# How it works + +Basic idea: +- LOC LUTs in the ROI to terminate input and output routing +- Let Vivado LOC the rest of the logic +- Manually route signals in and out of the ROI enough to avoid routing loops into the ROI +- Let Vivado finish the rest of the routes + +There is no logic outside of the ROI in order to keep IOB to ROI delays short +Its expected the end user will rip out everything inside the ROI + +To target Arty A7 you should source the artix DB environment script then source arty.sh + +To build the baseline harness: ``` ./runme.sh ``` diff --git a/minitests/roi_harness/arty.sh b/minitests/roi_harness/arty-common.sh similarity index 75% rename from minitests/roi_harness/arty.sh rename to minitests/roi_harness/arty-common.sh index d7eccd3f..2a3145c6 100644 --- a/minitests/roi_harness/arty.sh +++ b/minitests/roi_harness/arty-common.sh @@ -1,8 +1,18 @@ # XC7A35TICSG324-1L export XRAY_PART=xc7a35tcsg324-1 -export XRAY_PINCFG=ARTY-A7-UART -export XRAY_DIN_N_LARGE=2 -export XRAY_DOUT_N_LARGE=2 + +if [ -z "$XRAY_PINCFG" ]; then + echo "XRAY_PINCFG not set" + return 1 +fi +if [ -z "$XRAY_DIN_N_LARGE" ]; then + echo "XRAY_DIN_N_LARGE not set" + return 1 +fi +if [ -z "$XRAY_DOUT_N_LARGE" ]; then + echo "XRAY_DOUT_N_LARGE not set" + return 1 +fi # For generating DB export XRAY_PIN_00="G13" diff --git a/minitests/roi_harness/arty-pmod.sh b/minitests/roi_harness/arty-pmod.sh new file mode 100644 index 00000000..70660ffd --- /dev/null +++ b/minitests/roi_harness/arty-pmod.sh @@ -0,0 +1,7 @@ +# XC7A35TICSG324-1L +export XRAY_PINCFG=ARTY-A7-PMOD +export XRAY_DIN_N_LARGE=8 +export XRAY_DOUT_N_LARGE=8 +export HARNESS_DIR=$XRAY_DIR/database/artix7/harness/arty-a7/pmod/ + +source $XRAY_DIR/minitests/roi_harness/arty-common.sh diff --git a/minitests/roi_harness/arty-swbut.sh b/minitests/roi_harness/arty-swbut.sh new file mode 100644 index 00000000..56f50581 --- /dev/null +++ b/minitests/roi_harness/arty-swbut.sh @@ -0,0 +1,7 @@ +# XC7A35TICSG324-1L +export XRAY_PINCFG=ARTY-A7-SWBUT +export XRAY_DIN_N_LARGE=8 +export XRAY_DOUT_N_LARGE=8 +export HARNESS_DIR=$XRAY_DIR/database/artix7/harness/arty-a7/swbut/ + +source $XRAY_DIR/minitests/roi_harness/arty-common.sh diff --git a/minitests/roi_harness/arty-uart.sh b/minitests/roi_harness/arty-uart.sh new file mode 100644 index 00000000..dbdb92d4 --- /dev/null +++ b/minitests/roi_harness/arty-uart.sh @@ -0,0 +1,7 @@ +# XC7A35TICSG324-1L +export XRAY_PINCFG=ARTY-A7-UART +export XRAY_DIN_N_LARGE=2 +export XRAY_DOUT_N_LARGE=2 +export HARNESS_DIR=$XRAY_DIR/database/artix7/harness/arty-a7/uart/ + +source $XRAY_DIR/minitests/roi_harness/arty-common.sh diff --git a/minitests/roi_harness/basys3.sh b/minitests/roi_harness/basys3-common.sh similarity index 77% rename from minitests/roi_harness/basys3.sh rename to minitests/roi_harness/basys3-common.sh index 2efb33f9..a76c8653 100644 --- a/minitests/roi_harness/basys3.sh +++ b/minitests/roi_harness/basys3-common.sh @@ -1,8 +1,17 @@ # XC7A35T-1CPG236C export XRAY_PART=xc7a35tcpg236-1 -export XRAY_PINCFG=BASYS3-SWBUT -export XRAY_DIN_N_LARGE=17 -export XRAY_DOUT_N_LARGE=17 +if [ -z "$XRAY_PINCFG" ]; then + echo "XRAY_PINCFG not set" + return 1 +fi +if [ -z "$XRAY_DIN_N_LARGE" ]; then + echo "XRAY_DIN_N_LARGE not set" + return 1 +fi +if [ -z "$XRAY_DOUT_N_LARGE" ]; then + echo "XRAY_DOUT_N_LARGE not set" + return 1 +fi # For generating DB export XRAY_PIN_00="V17" diff --git a/minitests/roi_harness/basys3-swbut.sh b/minitests/roi_harness/basys3-swbut.sh new file mode 100644 index 00000000..402e8a0d --- /dev/null +++ b/minitests/roi_harness/basys3-swbut.sh @@ -0,0 +1,7 @@ +# XC7A35T-1CPG236C +export XRAY_PINCFG=BASYS3-SWBUT +export XRAY_DIN_N_LARGE=17 +export XRAY_DOUT_N_LARGE=17 +export HARNESS_DIR=$XRAY_DIR/database/artix7/harness/basys3/swbut/ + +source $XRAY_DIR/minitests/roi_harness/basys3-common.sh diff --git a/minitests/roi_harness/runme.tcl b/minitests/roi_harness/runme.tcl index 710c72a1..3aa2e0a6 100644 --- a/minitests/roi_harness/runme.tcl +++ b/minitests/roi_harness/runme.tcl @@ -149,8 +149,8 @@ if {$part eq "xc7a50tfgg484-1"} { set net2pin(dout[$i]) $pin } } elseif {$part eq "xc7a35tcsg324-1"} { - # Arty A7 switch, button, and LED if {$pincfg eq "ARTY-A7-SWBUT"} { + # Arty A7 switch, button, and LED # https://reference.digilentinc.com/reference/programmable-logic/arty/reference-manual?redirect=1 # 4 switches then 4 buttons set sw_but "A8 C11 C10 A10 D9 C9 B9 B8" @@ -173,9 +173,9 @@ if {$part eq "xc7a50tfgg484-1"} { set net2pin(dout[$i]) $pin } + } elseif {$pincfg eq "ARTY-A7-PMOD"} { # Arty A7 pmod # Disabled per above - } elseif {$pincfg eq "ARTY-A7-PMOD"} { # https://reference.digilentinc.com/reference/programmable-logic/arty/reference-manual?redirect=1 set pmod_ja "G13 B11 A11 D12 D13 B18 A18 K16" set pmod_jb "E15 E16 D15 C15 J17 J18 K15 J15" diff --git a/minitests/roi_harness/zybo.sh b/minitests/roi_harness/zybo-common.sh similarity index 76% rename from minitests/roi_harness/zybo.sh rename to minitests/roi_harness/zybo-common.sh index dd1eff9c..1aa60baf 100644 --- a/minitests/roi_harness/zybo.sh +++ b/minitests/roi_harness/zybo-common.sh @@ -1,8 +1,18 @@ # XC7010-1CLG400C export XRAY_PART=xc7z010clg400-1 -export XRAY_PINCFG=ZYBOZ7-SWBUT -export XRAY_DIN_N_LARGE=4 -export XRAY_DOUT_N_LARGE=6 + +if [ -z "$XRAY_PINCFG" ]; then + echo "XRAY_PINCFG not set" + return 1 +fi +if [ -z "$XRAY_DIN_N_LARGE" ]; then + echo "XRAY_DIN_N_LARGE not set" + return 1 +fi +if [ -z "$XRAY_DOUT_N_LARGE" ]; then + echo "XRAY_DOUT_N_LARGE not set" + return 1 +fi # For generating DB export XRAY_PIN_00="G15" diff --git a/minitests/roi_harness/zybo-swbut.sh b/minitests/roi_harness/zybo-swbut.sh new file mode 100644 index 00000000..6e3dc4b3 --- /dev/null +++ b/minitests/roi_harness/zybo-swbut.sh @@ -0,0 +1,7 @@ +# XC7010-1CLG400C +export XRAY_PINCFG=ZYBOZ7-SWBUT +export XRAY_DIN_N_LARGE=4 +export XRAY_DOUT_N_LARGE=6 +export HARNESS_DIR=$XRAY_DIR/database/zynq7/harness/zybo/swbut/ + +source $XRAY_DIR/minitests/roi_harness/zybo-common.sh