Skip to content

Commit

Permalink
Merge pull request f4pga#1787 from antmicro/install-200t-with-other-d…
Browse files Browse the repository at this point in the history
…evices

Install 200t with other devices
  • Loading branch information
acomodi committed Nov 19, 2020
2 parents 9453694 + 849d25f commit ac53394
Show file tree
Hide file tree
Showing 15 changed files with 200 additions and 190 deletions.
25 changes: 14 additions & 11 deletions .github/kokoro/install-200t.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,30 @@ echo "----------------------------------------"

echo
echo "========================================"
echo "Compressing and uploading install dir"
echo "Running installed toolchain tests"
echo "----------------------------------------"
(
du -ah install
pushd install
export GIT_HASH=$(git rev-parse --short HEAD)
tar vcf - * | xz -9 -T${MAX_CORES} - > ../symbiflow-arch-defs-install-200t-${GIT_HASH}.tar.xz
source env/conda/bin/activate symbiflow_arch_def_base
pushd build
export VPR_NUM_WORKERS=${CORES}
export CTEST_OUTPUT_ON_FAILURE=1
ctest -R binary_toolchain_test_50t -j${MAX_CORES}
ctest -R binary_toolchain_test_100t -j${MAX_CORES}
ctest -R binary_toolchain_test_200t -j${MAX_CORES}
popd
)
echo "----------------------------------------"

echo
echo "========================================"
echo "Running installed toolchain tests"
echo "Compressing and uploading install dir"
echo "----------------------------------------"
(
source env/conda/bin/activate symbiflow_arch_def_base
pushd build
export VPR_NUM_WORKERS=${CORES}
export CTEST_OUTPUT_ON_FAILURE=1
ctest -R binary_toolchain_test -j${MAX_CORES}
rm -rf build
du -ah install
pushd install
export GIT_HASH=$(git rev-parse --short HEAD)
tar vcf - * | xz -9 -T${MAX_CORES} - > ../symbiflow-arch-defs-install-200t-${GIT_HASH}.tar.xz
popd
)
echo "----------------------------------------"
25 changes: 14 additions & 11 deletions .github/kokoro/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,30 @@ echo "----------------------------------------"

echo
echo "========================================"
echo "Compressing and uploading install dir"
echo "Running installed toolchain tests"
echo "----------------------------------------"
(
du -ah install
pushd install
export GIT_HASH=$(git rev-parse --short HEAD)
tar vcf - * | xz -9 -T${MAX_CORES} - > ../symbiflow-arch-defs-install-${GIT_HASH}.tar.xz
source env/conda/bin/activate symbiflow_arch_def_base
pushd build
export VPR_NUM_WORKERS=${CORES}
export CTEST_OUTPUT_ON_FAILURE=1
ctest -R binary_toolchain_test_50t -j${MAX_CORES}
ctest -R binary_toolchain_test_100t -j${MAX_CORES}
ctest -R binary_toolchain_test_200t -j${MAX_CORES}
popd
)
echo "----------------------------------------"

echo
echo "========================================"
echo "Running installed toolchain tests"
echo "Compressing and uploading install dir"
echo "----------------------------------------"
(
source env/conda/bin/activate symbiflow_arch_def_base
pushd build
export VPR_NUM_WORKERS=${CORES}
export CTEST_OUTPUT_ON_FAILURE=1
ctest -R binary_toolchain_test -j${MAX_CORES}
rm -rf build
du -ah install
pushd install
export GIT_HASH=$(git rev-parse --short HEAD)
tar vcf - * | xz -9 -T${MAX_CORES} - > ../symbiflow-arch-defs-install-${GIT_HASH}.tar.xz
popd
)
echo "----------------------------------------"
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ set(ENV_DIR ${symbiflow-arch-defs_SOURCE_DIR}/env/conda/envs/symbiflow_arch_def_
set(YOSYS_DATADIR ${ENV_DIR}/share/yosys CACHE PATH "Path to yosys data directory")
set(OPENOCD_DATADIR ${ENV_DIR}/share/openocd CACHE PATH "Path to openocd data directory")
set(VPR_CAPNP_SCHEMA_DIR ${ENV_DIR}/capnp CACHE PATH "Path to VPR schema directory")
set(INSTALL_DEVICE "small_devices" CACHE STRING "The device to install, or 'small_devices', which includes all devices except xc7a200t.")


setup_env()
Expand Down
10 changes: 0 additions & 10 deletions common/cmake/install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ function(INSTALL_DEVICE_FILES)

set(INSTALL_FILES)

if("small_devices" STREQUAL ${INSTALL_DEVICE})
if(${DEVICE} STREQUAL "xc7a200t")
return()
endif()
else()
if(NOT ${DEVICE} STREQUAL ${INSTALL_DEVICE})
return()
endif()
endif()

# Get files to be installed
get_target_property_required(HAS_LOOKAHEAD ${DEVICE} "${PACKAGE}_HAS_LOOKAHEAD_CACHE")
get_target_property_required(HAS_PLACE_DELAY ${DEVICE} "${PACKAGE}_HAS_PLACE_DELAY_CACHE")
Expand Down
10 changes: 0 additions & 10 deletions xc/common/cmake/install.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,6 @@ function(DEFINE_XC_PINMAP_CSV_INSTALL_TARGET)
return()
endif()

if("small_devices" STREQUAL ${INSTALL_DEVICE})
if(${DEVICE} STREQUAL "xc7a200t")
return()
endif()
else()
if(NOT ${DEVICE} STREQUAL ${INSTALL_DEVICE})
return()
endif()
endif()

get_target_property_required(PINMAP ${BOARD} PINMAP)
get_file_location(PINMAP_FILE ${PINMAP})
get_filename_component(PINMAP_FILE_NAME ${PINMAP_FILE} NAME)
Expand Down
37 changes: 16 additions & 21 deletions xc/xc7/tests/install_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
set(INSTALLATION_DIR_BIN "${CMAKE_INSTALL_PREFIX}/bin")

if(${INSTALL_DEVICE} STREQUAL "xc7a200t")
add_test(NAME binary_toolchain_test
COMMAND ${CMAKE_COMMAND} -E env
PATH=${INSTALLATION_DIR_BIN}:$ENV{PATH}
${CMAKE_COMMAND} -E env
PYTHONPATH=${PRJXRAY_DIR}:${PRJXRAY_DIR}/third_party/fasm
DATABASE_DIR=${PRJXRAY_DB_DIR}
FRAMES2BIT=$<TARGET_FILE:xc7frames2bit>
make PARTNAME=xc7a200tsbg484-1 DEVICE=xc7a200t_test BOARD=nexys_video
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
else()
add_test(NAME binary_toolchain_test
COMMAND ${CMAKE_COMMAND} -E env
PATH=${INSTALLATION_DIR_BIN}:$ENV{PATH}
${CMAKE_COMMAND} -E env
PYTHONPATH=${PRJXRAY_DIR}:${PRJXRAY_DIR}/third_party/fasm
DATABASE_DIR=${PRJXRAY_DB_DIR}
FRAMES2BIT=$<TARGET_FILE:xc7frames2bit>
make
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()
function(add_binary_test test_name part_name device board)
add_test(NAME ${test_name}
COMMAND ${CMAKE_COMMAND} -E env
PATH=${INSTALLATION_DIR_BIN}:$ENV{PATH}
${CMAKE_COMMAND} -E env
PYTHONPATH=${PRJXRAY_DIR}:${PRJXRAY_DIR}/third_party/fasm
DATABASE_DIR=${PRJXRAY_DB_DIR}
FRAMES2BIT=$<TARGET_FILE:xc7frames2bit>
make PARTNAME=${part_name} DEVICE=${device} BOARD=${board}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endfunction()


add_binary_test(binary_toolchain_test_50t xc7a35tcpg236-1 xc7a50t_test basys3)
add_binary_test(binary_toolchain_test_100t xc7a100tcsg324-1 xc7a100t_test arty-100t)
add_binary_test(binary_toolchain_test_200t xc7a200tsbg484-1 xc7a200t_test nexys_video)
23 changes: 9 additions & 14 deletions xc/xc7/tests/install_test/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(patsubst %/,%,$(dir $(mkfile_path)))
TOP:=top
PARTNAME:= xc7a35tcpg236-1
DEVICE := xc7a50t_test
BOARD := basys3
BITSTREAM_DEVICE := artix7
VERILOG:=${current_dir}/counter_${BOARD}.v
PCF=${current_dir}/${BOARD}.pcf
XDC=${current_dir}/counter_${BOARD}.xdc
BUILDDIR:=build
PARTNAME?= xc7a35tcpg236-1
DEVICE ?= xc7a50t_test
BOARD ?= basys3
BITSTREAM_DEVICE ?= artix7
VERILOG:=${current_dir}/counter.v
XDC=${current_dir}/${BOARD}.xdc
BUILDDIR:=build_${BOARD}
ADDITIONAL_VPR_OPTIONS="--seed 1024"

all: ${BUILDDIR}/${TOP}.bit
Expand All @@ -17,17 +16,13 @@ ${BUILDDIR}:
mkdir ${BUILDDIR}

${BUILDDIR}/${TOP}.eblif: | ${BUILDDIR}
ifeq (,$(wildcard ${XDC}))
cd ${BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME}
else
cd ${BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -x ${XDC} -d ${BITSTREAM_DEVICE} -p ${PARTNAME}
endif
cd ${BUILDDIR} && symbiflow_synth -t ${TOP} -v ${VERILOG} -d ${BITSTREAM_DEVICE} -p ${PARTNAME} -x ${XDC}

${BUILDDIR}/${TOP}.net: ${BUILDDIR}/${TOP}.eblif
cd ${BUILDDIR} && symbiflow_pack -e ${TOP}.eblif -d ${DEVICE} -a ${ADDITIONAL_VPR_OPTIONS}

${BUILDDIR}/${TOP}.place: ${BUILDDIR}/${TOP}.net
cd ${BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} -p ${PCF} -n ${TOP}.net -P ${PARTNAME} -a ${ADDITIONAL_VPR_OPTIONS}
cd ${BUILDDIR} && symbiflow_place -e ${TOP}.eblif -d ${DEVICE} -n ${TOP}.net -P ${PARTNAME} -a ${ADDITIONAL_VPR_OPTIONS}

${BUILDDIR}/${TOP}.route: ${BUILDDIR}/${TOP}.place
cd ${BUILDDIR} && symbiflow_route -e ${TOP}.eblif -d ${DEVICE} -a ${ADDITIONAL_VPR_OPTIONS}
Expand Down
49 changes: 49 additions & 0 deletions xc/xc7/tests/install_test/arty-100t.xdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Pin IOSTANDARDs
set_property IOSTANDARD LVCMOS33 [get_ports clk]

set_property IOSTANDARD LVCMOS25 [get_ports {led[0]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[1]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[2]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[3]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[4]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[5]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[6]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[7]}]

set_property IOSTANDARD LVCMOS12 [get_ports {sw[0]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[1]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[2]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[3]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[4]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[5]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[6]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[7]}]

set_property IOSTANDARD LVCMOS12 [get_ports {tx}]
set_property IOSTANDARD LVCMOS12 [get_ports {rx}]

# Pin Locations
set_property PACKAGE_PIN E3 [get_ports {clk}]

set_property PACKAGE_PIN F6 [get_ports {led[0]}]
set_property PACKAGE_PIN J4 [get_ports {led[1]}]
set_property PACKAGE_PIN J2 [get_ports {led[2]}]
set_property PACKAGE_PIN H6 [get_ports {led[3]}]
set_property PACKAGE_PIN H5 [get_ports {led[4]}]
set_property PACKAGE_PIN J5 [get_ports {led[5]}]
set_property PACKAGE_PIN T9 [get_ports {led[6]}]
set_property PACKAGE_PIN T10 [get_ports {led[7]}]

set_property PACKAGE_PIN A8 [get_ports {sw[0]}]
set_property PACKAGE_PIN C11 [get_ports {sw[1]}]
set_property PACKAGE_PIN C10 [get_ports {sw[2]}]
set_property PACKAGE_PIN A10 [get_ports {sw[3]}]
set_property PACKAGE_PIN D9 [get_ports {sw[4]}]
set_property PACKAGE_PIN C9 [get_ports {sw[5]}]
set_property PACKAGE_PIN B9 [get_ports {sw[6]}]
set_property PACKAGE_PIN B8 [get_ports {sw[7]}]

set_property PACKAGE_PIN D10 [get_ports {tx}]
set_property PACKAGE_PIN A9 [get_ports {rx}]

create_clock -period 10.0 clk
41 changes: 0 additions & 41 deletions xc/xc7/tests/install_test/basys3.pcf

This file was deleted.

49 changes: 49 additions & 0 deletions xc/xc7/tests/install_test/basys3.xdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Pin IOSTANDARDs
set_property IOSTANDARD LVCMOS33 [get_ports clk]

set_property IOSTANDARD LVCMOS25 [get_ports {led[0]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[1]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[2]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[3]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[4]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[5]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[6]}]
set_property IOSTANDARD LVCMOS25 [get_ports {led[7]}]

set_property IOSTANDARD LVCMOS12 [get_ports {sw[0]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[1]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[2]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[3]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[4]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[5]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[6]}]
set_property IOSTANDARD LVCMOS12 [get_ports {sw[7]}]

set_property IOSTANDARD LVCMOS12 [get_ports {tx}]
set_property IOSTANDARD LVCMOS12 [get_ports {rx}]

# Pin Locations
set_property PACKAGE_PIN W5 [get_ports {clk}]

set_property PACKAGE_PIN U16 [get_ports {led[0]}]
set_property PACKAGE_PIN E19 [get_ports {led[1]}]
set_property PACKAGE_PIN U19 [get_ports {led[2]}]
set_property PACKAGE_PIN V19 [get_ports {led[3]}]
set_property PACKAGE_PIN W18 [get_ports {led[4]}]
set_property PACKAGE_PIN U15 [get_ports {led[5]}]
set_property PACKAGE_PIN U14 [get_ports {led[6]}]
set_property PACKAGE_PIN V14 [get_ports {led[7]}]

set_property PACKAGE_PIN V17 [get_ports {sw[0]}]
set_property PACKAGE_PIN V16 [get_ports {sw[1]}]
set_property PACKAGE_PIN W16 [get_ports {sw[2]}]
set_property PACKAGE_PIN W17 [get_ports {sw[3]}]
set_property PACKAGE_PIN W15 [get_ports {sw[4]}]
set_property PACKAGE_PIN V15 [get_ports {sw[5]}]
set_property PACKAGE_PIN W14 [get_ports {sw[6]}]
set_property PACKAGE_PIN W13 [get_ports {sw[7]}]

set_property PACKAGE_PIN A18 [get_ports {tx}]
set_property PACKAGE_PIN B18 [get_ports {rx}]

create_clock -period 10.0 clk
File renamed without changes.
25 changes: 0 additions & 25 deletions xc/xc7/tests/install_test/counter_basys3.v

This file was deleted.

20 changes: 0 additions & 20 deletions xc/xc7/tests/install_test/counter_nexys_video.xdc

This file was deleted.

0 comments on commit ac53394

Please sign in to comment.