From 5a7f83c705d6ea52e9e5bb7b182b32040d15a13a Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Tue, 16 Feb 2021 12:24:15 -0800 Subject: Add examples invoking FPGA interchange nextpnr. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fpga_interchange/examples/archcheck/Makefile | 16 +++++ fpga_interchange/examples/archcheck/test_data.yaml | 7 +++ fpga_interchange/examples/lut/Makefile | 8 +++ fpga_interchange/examples/lut/lut.v | 5 ++ fpga_interchange/examples/lut/lut.xdc | 5 ++ fpga_interchange/examples/lut/run.tcl | 14 +++++ fpga_interchange/examples/template.mk | 68 ++++++++++++++++++++++ fpga_interchange/examples/wire/Makefile | 8 +++ fpga_interchange/examples/wire/run.tcl | 14 +++++ fpga_interchange/examples/wire/wire.v | 5 ++ fpga_interchange/examples/wire/wire.xdc | 2 + 11 files changed, 152 insertions(+) create mode 100644 fpga_interchange/examples/archcheck/Makefile create mode 100644 fpga_interchange/examples/archcheck/test_data.yaml create mode 100644 fpga_interchange/examples/lut/Makefile create mode 100644 fpga_interchange/examples/lut/lut.v create mode 100644 fpga_interchange/examples/lut/lut.xdc create mode 100644 fpga_interchange/examples/lut/run.tcl create mode 100644 fpga_interchange/examples/template.mk create mode 100644 fpga_interchange/examples/wire/Makefile create mode 100644 fpga_interchange/examples/wire/run.tcl create mode 100644 fpga_interchange/examples/wire/wire.v create mode 100644 fpga_interchange/examples/wire/wire.xdc (limited to 'fpga_interchange/examples') diff --git a/fpga_interchange/examples/archcheck/Makefile b/fpga_interchange/examples/archcheck/Makefile new file mode 100644 index 00000000..8984e1b4 --- /dev/null +++ b/fpga_interchange/examples/archcheck/Makefile @@ -0,0 +1,16 @@ +NEXTPNR_PATH := $(shell echo ~/cat_x/nextpnr) +NEXTPNR_BIN := $(NEXTPNR_PATH)/build/nextpnr-fpga_interchange +BBA_PATH := $(NEXTPNR_PATH)/build/test.bin + +PACKAGE := csg324 + +.PHONY: + +check: + $(NEXTPNR_BIN) \ + --chipdb $(BBA_PATH) \ + --package $(PACKAGE) \ + --test + $(NEXTPNR_BIN) \ + --chipdb $(BBA_PATH) \ + --run $(NEXTPNR_PATH)/python/check_arch_api.py diff --git a/fpga_interchange/examples/archcheck/test_data.yaml b/fpga_interchange/examples/archcheck/test_data.yaml new file mode 100644 index 00000000..b41112cf --- /dev/null +++ b/fpga_interchange/examples/archcheck/test_data.yaml @@ -0,0 +1,7 @@ +pip_test: + - src_wire: CLBLM_R_X11Y93/CLBLM_L_D3 + dst_wire: SLICE_X15Y93.SLICEL/D3 +bel_pin_test: + - bel: SLICE_X15Y93.SLICEL/D6LUT + pin: A3 + wire: SLICE_X15Y93.SLICEL/D3 diff --git a/fpga_interchange/examples/lut/Makefile b/fpga_interchange/examples/lut/Makefile new file mode 100644 index 00000000..54fc8994 --- /dev/null +++ b/fpga_interchange/examples/lut/Makefile @@ -0,0 +1,8 @@ +DESIGN := lut +DESIGN_TOP := top +PACKAGE := csg324 + +include ../template.mk + +build/lut.json: lut.v | build + yosys -c run.tcl diff --git a/fpga_interchange/examples/lut/lut.v b/fpga_interchange/examples/lut/lut.v new file mode 100644 index 00000000..ca18e665 --- /dev/null +++ b/fpga_interchange/examples/lut/lut.v @@ -0,0 +1,5 @@ +module top(input i0, input i1, output o); + +assign o = i0 | i1; + +endmodule diff --git a/fpga_interchange/examples/lut/lut.xdc b/fpga_interchange/examples/lut/lut.xdc new file mode 100644 index 00000000..4f7e948b --- /dev/null +++ b/fpga_interchange/examples/lut/lut.xdc @@ -0,0 +1,5 @@ +set_property PACKAGE_PIN N16 [get_ports i0] +set_property PACKAGE_PIN N15 [get_ports i1] +set_property PACKAGE_PIN M17 [get_ports o] + +#set_property IOSTANDARD LVCMOS33 [get_ports] diff --git a/fpga_interchange/examples/lut/run.tcl b/fpga_interchange/examples/lut/run.tcl new file mode 100644 index 00000000..1edd8bb7 --- /dev/null +++ b/fpga_interchange/examples/lut/run.tcl @@ -0,0 +1,14 @@ +yosys -import + +read_verilog lut.v + +synth_xilinx -nolutram -nowidelut -nosrl -nocarry -nodsp + +# opt_expr -undriven makes sure all nets are driven, if only by the $undef +# net. +opt_expr -undriven +opt_clean + +setundef -zero -params + +write_json build/lut.json diff --git a/fpga_interchange/examples/template.mk b/fpga_interchange/examples/template.mk new file mode 100644 index 00000000..11710058 --- /dev/null +++ b/fpga_interchange/examples/template.mk @@ -0,0 +1,68 @@ +NEXTPNR_PATH := $(shell echo ~/cat_x/nextpnr) +NEXTPNR_BIN := $(NEXTPNR_PATH)/build/nextpnr-fpga_interchange +BBA_PATH := $(NEXTPNR_PATH)/build/test.bin + +RAPIDWRIGHT_PATH := $(shell echo ~/cat_x/RapidWright) + +INTERCHANGE_PATH := $(NEXTPNR_PATH)/3rdparty/fpga-interchange-schema/interchange + +DEVICE := $(shell echo ~/cat_x/python-fpga-interchange/xc7a35tcpg236-1_constraints_luts.device) + +.DELETE_ON_ERROR: +.PHONY: all debug clean + +all: build/$(DESIGN).dcp + +build: + mkdir build + +build/$(DESIGN).netlist: build/$(DESIGN).json + /usr/bin/time -v python3 -mfpga_interchange.yosys_json \ + --schema_dir $(INTERCHANGE_PATH) \ + --device $(DEVICE) \ + --top $(DESIGN_TOP) \ + build/$(DESIGN).json \ + build/$(DESIGN).netlist + +build/$(DESIGN)_netlist.yaml: build/$(DESIGN).netlist + /usr/bin/time -v python3 -mfpga_interchange.convert \ + --schema_dir $(INTERCHANGE_PATH) \ + --schema logical \ + --input_format capnp \ + --output_format yaml \ + build/$(DESIGN).netlist \ + build/$(DESIGN)_netlist.yaml + +build/$(DESIGN).phys: build/$(DESIGN).netlist + $(NEXTPNR_BIN) \ + --chipdb $(BBA_PATH) \ + --xdc $(DESIGN).xdc \ + --netlist build/$(DESIGN).netlist \ + --phys build/$(DESIGN).phys \ + --package $(PACKAGE) + +build/$(DESIGN)_phys.yaml: build/$(DESIGN).phys + /usr/bin/time -v python3 -mfpga_interchange.convert \ + --schema_dir $(INTERCHANGE_PATH) \ + --schema physical \ + --input_format capnp \ + --output_format yaml \ + build/$(DESIGN).phys \ + build/$(DESIGN)_phys.yaml + +debug: build/$(DESIGN).netlist + gdb --args $(NEXTPNR_BIN) \ + --chipdb $(BBA_PATH) \ + --xdc $(DESIGN).xdc \ + --netlist build/$(DESIGN).netlist \ + --phys build/$(DESIGN).phys \ + --package $(PACKAGE) + +build/$(DESIGN).dcp: build/$(DESIGN).netlist build/$(DESIGN).phys $(DESIGN).xdc + RAPIDWRIGHT_PATH=$(RAPIDWRIGHT_PATH) \ + $(RAPIDWRIGHT_PATH)/scripts/invoke_rapidwright.sh \ + com.xilinx.rapidwright.interchange.PhysicalNetlistToDcp \ + build/$(DESIGN).netlist build/$(DESIGN).phys $(DESIGN).xdc build/$(DESIGN).dcp + +clean:: + rm -rf build diff --git a/fpga_interchange/examples/wire/Makefile b/fpga_interchange/examples/wire/Makefile new file mode 100644 index 00000000..49194f53 --- /dev/null +++ b/fpga_interchange/examples/wire/Makefile @@ -0,0 +1,8 @@ +DESIGN := wire +DESIGN_TOP := top +PACKAGE := csg324 + +include ../template.mk + +build/wire.json: wire.v | build + yosys -c run.tcl diff --git a/fpga_interchange/examples/wire/run.tcl b/fpga_interchange/examples/wire/run.tcl new file mode 100644 index 00000000..9127be20 --- /dev/null +++ b/fpga_interchange/examples/wire/run.tcl @@ -0,0 +1,14 @@ +yosys -import + +read_verilog wire.v + +synth_xilinx -nolutram -nowidelut -nosrl -nocarry -nodsp + +# opt_expr -undriven makes sure all nets are driven, if only by the $undef +# net. +opt_expr -undriven +opt_clean + +setundef -zero -params + +write_json build/wire.json diff --git a/fpga_interchange/examples/wire/wire.v b/fpga_interchange/examples/wire/wire.v new file mode 100644 index 00000000..429d05ff --- /dev/null +++ b/fpga_interchange/examples/wire/wire.v @@ -0,0 +1,5 @@ +module top(input i, output o); + +assign o = i; + +endmodule diff --git a/fpga_interchange/examples/wire/wire.xdc b/fpga_interchange/examples/wire/wire.xdc new file mode 100644 index 00000000..e1fce5f0 --- /dev/null +++ b/fpga_interchange/examples/wire/wire.xdc @@ -0,0 +1,2 @@ +set_property PACKAGE_PIN N16 [get_ports i] +set_property PACKAGE_PIN N15 [get_ports o] -- cgit v1.2.3 From cc687b3b726d538be4a8dfa6cb8e1b4b96a837e2 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Tue, 16 Feb 2021 17:22:24 -0800 Subject: Change makefiles to build a FPGA interchange BBA. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fpga_interchange/examples/archcheck/Makefile | 10 +-- fpga_interchange/examples/common.mk | 8 +++ fpga_interchange/examples/create_bba/Makefile | 90 +++++++++++++++++++++++++++ fpga_interchange/examples/template.mk | 14 +---- 4 files changed, 106 insertions(+), 16 deletions(-) create mode 100644 fpga_interchange/examples/common.mk create mode 100644 fpga_interchange/examples/create_bba/Makefile (limited to 'fpga_interchange/examples') diff --git a/fpga_interchange/examples/archcheck/Makefile b/fpga_interchange/examples/archcheck/Makefile index 8984e1b4..cf82013b 100644 --- a/fpga_interchange/examples/archcheck/Makefile +++ b/fpga_interchange/examples/archcheck/Makefile @@ -1,16 +1,16 @@ -NEXTPNR_PATH := $(shell echo ~/cat_x/nextpnr) -NEXTPNR_BIN := $(NEXTPNR_PATH)/build/nextpnr-fpga_interchange -BBA_PATH := $(NEXTPNR_PATH)/build/test.bin +include ../common.mk PACKAGE := csg324 -.PHONY: +.PHONY: check check_test_data -check: +check: check_test_data $(NEXTPNR_BIN) \ --chipdb $(BBA_PATH) \ --package $(PACKAGE) \ --test + +check_test_data: $(NEXTPNR_BIN) \ --chipdb $(BBA_PATH) \ --run $(NEXTPNR_PATH)/python/check_arch_api.py diff --git a/fpga_interchange/examples/common.mk b/fpga_interchange/examples/common.mk new file mode 100644 index 00000000..8a8dc471 --- /dev/null +++ b/fpga_interchange/examples/common.mk @@ -0,0 +1,8 @@ +NEXTPNR_PATH := $(realpath ../../..) +NEXTPNR_BIN := $(NEXTPNR_PATH)/build/nextpnr-fpga_interchange +BBA_PATH := $(realpath ..)/create_bba/build/test.bin + +RAPIDWRIGHT_PATH := $(realpath ..)/create_bba/build/RapidWright +INTERCHANGE_PATH := $(realpath ..)/create_bba/build/fpga-interchange-schema/interchange + +DEVICE := $(realpath ..)/create_bba/build/python-fpga-interchange/xc7a35tcpg236-1_constraints_luts.device diff --git a/fpga_interchange/examples/create_bba/Makefile b/fpga_interchange/examples/create_bba/Makefile new file mode 100644 index 00000000..43f43a29 --- /dev/null +++ b/fpga_interchange/examples/create_bba/Makefile @@ -0,0 +1,90 @@ +# +# nextpnr -- Next Generation Place and Route +# +# Copyright (C) 2021 Symbiflow Authors +# +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +# This Makefile provides a streamlined way to create an example +# FPGA interchange BBA suitable for placing and routing on Xilinx A35 parts. +# +# FPGA interchange device database is generated via RapidWright. +# +# Currently FPGA interchange physical netlist (e.g. place and route route) to +# FASM support is not done, so bitstream generation relies on RapidWright to +# convert FPGA interchange logical and physical netlist into a Vivado DCP. + +include ../common.mk + +.DELETE_ON_ERROR: + +.PHONY: all chipdb + +all: chipdb + +build: + mkdir build + +build/RapidWright: | build + # FIXME: Update URL / branch as fixes are merged upstream and / or + # interchange branch on Xilinx/RapidWright is merged to master branch. + # + #cd build && git clone -b interchange https://github.com/Xilinx/RapidWright.git + cd build && git clone -b move_strlist https://github.com/litghost/RapidWright.git + +build/env: | build + python3 -mvenv build/env + +build/python-fpga-interchange: | build + cd build && git clone https://github.com/SymbiFlow/python-fpga-interchange.git + +build/fpga-interchange-schema: | build + cd build && git clone https://github.com/SymbiFlow/fpga-interchange-schema.git + +build/.setup: | build/env build/fpga-interchange-schema build/python-fpga-interchange build/RapidWright + source build/env/bin/activate && \ + cd build/python-fpga-interchange/ && \ + pip install -r requirements.txt + touch build/.setup + +$(NEXTPNR_PATH)/build: + mkdir $(NEXTPNR_PATH)/build + +$(NEXTPNR_PATH)/build/bba/bbasm: | $(NEXTPNR_PATH)/build + $(NEXTPNR_PATH)/build && cmake -DARCH=fpga_interchange .. + make -j -C $(NEXTPNR_PATH)/build + +$(NEXTPNR_PATH)/fpga_interchange/chipdb.bba: build/.setup + source build/env/bin/activate && \ + cd build/python-fpga-interchange/ && \ + make \ + -f Makefile.rapidwright \ + NEXTPNR_PATH=$(NEXTPNR_PATH) \ + RAPIDWRIGHT_PATH=$(RAPIDWRIGHT_PATH) \ + INTERCHANGE_PATH=$(INTERCHANGE_PATH) + +$(BBA_PATH): $(NEXTPNR_PATH)/build/bba/bbasm $(NEXTPNR_PATH)/fpga_interchange/chipdb.bba + $(NEXTPNR_PATH)/build/bba/bbasm -l $(NEXTPNR_PATH)/fpga_interchange/chipdb.bba $(BBA_PATH) + +chipdb: $(BBA_PATH) + +test: chipdb + $(NEXTPNR_PATH)/build/nextpnr-fpga_interchange \ + --chipdb $(BBA_PATH) \ + --package csg324 \ + --test + +clean: + rm -rf build diff --git a/fpga_interchange/examples/template.mk b/fpga_interchange/examples/template.mk index 11710058..8bdded3f 100644 --- a/fpga_interchange/examples/template.mk +++ b/fpga_interchange/examples/template.mk @@ -1,12 +1,4 @@ -NEXTPNR_PATH := $(shell echo ~/cat_x/nextpnr) -NEXTPNR_BIN := $(NEXTPNR_PATH)/build/nextpnr-fpga_interchange -BBA_PATH := $(NEXTPNR_PATH)/build/test.bin - -RAPIDWRIGHT_PATH := $(shell echo ~/cat_x/RapidWright) - -INTERCHANGE_PATH := $(NEXTPNR_PATH)/3rdparty/fpga-interchange-schema/interchange - -DEVICE := $(shell echo ~/cat_x/python-fpga-interchange/xc7a35tcpg236-1_constraints_luts.device) +include ../common.mk .DELETE_ON_ERROR: .PHONY: all debug clean @@ -39,7 +31,7 @@ build/$(DESIGN).phys: build/$(DESIGN).netlist --xdc $(DESIGN).xdc \ --netlist build/$(DESIGN).netlist \ --phys build/$(DESIGN).phys \ - --package $(PACKAGE) + --package $(PACKAGE) \ build/$(DESIGN)_phys.yaml: build/$(DESIGN).phys /usr/bin/time -v python3 -mfpga_interchange.convert \ @@ -64,5 +56,5 @@ build/$(DESIGN).dcp: build/$(DESIGN).netlist build/$(DESIGN).phys $(DESIGN).xdc com.xilinx.rapidwright.interchange.PhysicalNetlistToDcp \ build/$(DESIGN).netlist build/$(DESIGN).phys $(DESIGN).xdc build/$(DESIGN).dcp -clean:: +clean: rm -rf build -- cgit v1.2.3 From 9e0ca7282743afd6a17fe347c1ad3a5d1cd4070d Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Wed, 17 Feb 2021 09:31:55 -0800 Subject: Keep all build artifacts under create_bba/build. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fpga_interchange/examples/common.mk | 2 +- fpga_interchange/examples/create_bba/Makefile | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'fpga_interchange/examples') diff --git a/fpga_interchange/examples/common.mk b/fpga_interchange/examples/common.mk index 8a8dc471..967ae367 100644 --- a/fpga_interchange/examples/common.mk +++ b/fpga_interchange/examples/common.mk @@ -1,6 +1,6 @@ NEXTPNR_PATH := $(realpath ../../..) NEXTPNR_BIN := $(NEXTPNR_PATH)/build/nextpnr-fpga_interchange -BBA_PATH := $(realpath ..)/create_bba/build/test.bin +BBA_PATH := $(realpath ..)/create_bba/build/xc7a35tcpg236-1.bin RAPIDWRIGHT_PATH := $(realpath ..)/create_bba/build/RapidWright INTERCHANGE_PATH := $(realpath ..)/create_bba/build/fpga-interchange-schema/interchange diff --git a/fpga_interchange/examples/create_bba/Makefile b/fpga_interchange/examples/create_bba/Makefile index 43f43a29..3033daca 100644 --- a/fpga_interchange/examples/create_bba/Makefile +++ b/fpga_interchange/examples/create_bba/Makefile @@ -63,20 +63,21 @@ $(NEXTPNR_PATH)/build: mkdir $(NEXTPNR_PATH)/build $(NEXTPNR_PATH)/build/bba/bbasm: | $(NEXTPNR_PATH)/build - $(NEXTPNR_PATH)/build && cmake -DARCH=fpga_interchange .. + cd $(NEXTPNR_PATH)/build && cmake -DARCH=fpga_interchange .. make -j -C $(NEXTPNR_PATH)/build $(NEXTPNR_PATH)/fpga_interchange/chipdb.bba: build/.setup + mkdir -p build/nextpnr/fpga_interchange source build/env/bin/activate && \ cd build/python-fpga-interchange/ && \ make \ -f Makefile.rapidwright \ - NEXTPNR_PATH=$(NEXTPNR_PATH) \ + NEXTPNR_PATH=$(realpath .)/build/nextpnr \ RAPIDWRIGHT_PATH=$(RAPIDWRIGHT_PATH) \ INTERCHANGE_PATH=$(INTERCHANGE_PATH) $(BBA_PATH): $(NEXTPNR_PATH)/build/bba/bbasm $(NEXTPNR_PATH)/fpga_interchange/chipdb.bba - $(NEXTPNR_PATH)/build/bba/bbasm -l $(NEXTPNR_PATH)/fpga_interchange/chipdb.bba $(BBA_PATH) + $(NEXTPNR_PATH)/build/bba/bbasm -l build/nextpnr/fpga_interchange/chipdb.bba $(BBA_PATH) chipdb: $(BBA_PATH) -- cgit v1.2.3 From b3dcc9d507547713b49b3be7c2978b7d47e52111 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Wed, 17 Feb 2021 11:58:28 -0800 Subject: Add IOSTANDARD to ports. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fpga_interchange/examples/lut/lut.xdc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fpga_interchange/examples') diff --git a/fpga_interchange/examples/lut/lut.xdc b/fpga_interchange/examples/lut/lut.xdc index 4f7e948b..4f390f25 100644 --- a/fpga_interchange/examples/lut/lut.xdc +++ b/fpga_interchange/examples/lut/lut.xdc @@ -2,4 +2,6 @@ set_property PACKAGE_PIN N16 [get_ports i0] set_property PACKAGE_PIN N15 [get_ports i1] set_property PACKAGE_PIN M17 [get_ports o] -#set_property IOSTANDARD LVCMOS33 [get_ports] +set_property IOSTANDARD LVCMOS33 [get_ports i0] +set_property IOSTANDARD LVCMOS33 [get_ports i1] +set_property IOSTANDARD LVCMOS33 [get_ports o] -- cgit v1.2.3 From 8ef5411f703da784cf0d0a6f829bae427602ef8c Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Wed, 17 Feb 2021 11:58:57 -0800 Subject: Add utility targets for getting plain text outputs. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fpga_interchange/examples/template.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fpga_interchange/examples') diff --git a/fpga_interchange/examples/template.mk b/fpga_interchange/examples/template.mk index 8bdded3f..819cdb1f 100644 --- a/fpga_interchange/examples/template.mk +++ b/fpga_interchange/examples/template.mk @@ -1,7 +1,7 @@ include ../common.mk .DELETE_ON_ERROR: -.PHONY: all debug clean +.PHONY: all debug clean netlist_yaml phys_yaml all: build/$(DESIGN).dcp @@ -25,6 +25,8 @@ build/$(DESIGN)_netlist.yaml: build/$(DESIGN).netlist build/$(DESIGN).netlist \ build/$(DESIGN)_netlist.yaml +netlist_yaml: build/$(DESIGN)_netlist.yaml + build/$(DESIGN).phys: build/$(DESIGN).netlist $(NEXTPNR_BIN) \ --chipdb $(BBA_PATH) \ @@ -42,6 +44,8 @@ build/$(DESIGN)_phys.yaml: build/$(DESIGN).phys build/$(DESIGN).phys \ build/$(DESIGN)_phys.yaml +phys_yaml: build/$(DESIGN)_phys.yaml + debug: build/$(DESIGN).netlist gdb --args $(NEXTPNR_BIN) \ --chipdb $(BBA_PATH) \ -- cgit v1.2.3 From 532954847ae9c4643dc068786ea78957a6d9bb36 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Thu, 18 Feb 2021 13:01:42 -0800 Subject: Update README's with latest instructions and features. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fpga_interchange/examples/common.mk | 2 +- fpga_interchange/examples/create_bba/README.md | 40 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 fpga_interchange/examples/create_bba/README.md (limited to 'fpga_interchange/examples') diff --git a/fpga_interchange/examples/common.mk b/fpga_interchange/examples/common.mk index 967ae367..ce558472 100644 --- a/fpga_interchange/examples/common.mk +++ b/fpga_interchange/examples/common.mk @@ -1,6 +1,6 @@ NEXTPNR_PATH := $(realpath ../../..) NEXTPNR_BIN := $(NEXTPNR_PATH)/build/nextpnr-fpga_interchange -BBA_PATH := $(realpath ..)/create_bba/build/xc7a35tcpg236-1.bin +BBA_PATH := $(realpath ..)/create_bba/build/xc7a35.bin RAPIDWRIGHT_PATH := $(realpath ..)/create_bba/build/RapidWright INTERCHANGE_PATH := $(realpath ..)/create_bba/build/fpga-interchange-schema/interchange diff --git a/fpga_interchange/examples/create_bba/README.md b/fpga_interchange/examples/create_bba/README.md new file mode 100644 index 00000000..d2ca5188 --- /dev/null +++ b/fpga_interchange/examples/create_bba/README.md @@ -0,0 +1,40 @@ +## Makefile-driven BBA creation + +This Makefile will generate a Xilinx A35 chipdb if java, capnproto and +capnproto-java are installed. + +### Installing dependencies + +Install java and javac if not already installed: +``` +# Or equivalent for your local system. +sudo apt-get install openjdk-10-jdk +``` + +Install capnproto if not already installed: +``` +# Or equivalent for your local system. +sudo apt-get install capnproto libcapnp-dev +``` + +Install capnproto-java if not already installed: +``` +git clone https://github.com/capnproto/capnproto-java.git +cd capnproto-java +make +sudo make install +``` + +### Instructions + +Once dependencies are installed, just run "make". This should download +remaining dependencies and build the chipdb and build nextpnr if not built. + +#### Re-building the chipdb + +``` +# Remove the text BBA +rm build/nextpnr/fpga_interchange/chipdb.bba +# Build the BBA +make +``` -- cgit v1.2.3