Enable quasar fpga genaration.
This commit is contained in:
parent
2780c08c6a
commit
0948bc9cfa
|
@ -1,51 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
# if [ $# -ne 1 -o ! -d "$1" ]; then
|
||||
# echo "Usage: $0 <design>" >&2
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
set -ex
|
||||
|
||||
PWD=$(pwd)
|
||||
SOC=$PWD/../../soc
|
||||
design=${1%/}
|
||||
|
||||
YOSYS_COARSE=true
|
||||
YOSYS_GLOBRST=false
|
||||
YOSYS_SPLITNETS=false
|
||||
TOP="soc_top"
|
||||
RTL=$(cat ../../soc/soc_top.mk)
|
||||
SOC=$PWD/../soc/
|
||||
SOCFILE=../soc/soc_top.mk
|
||||
|
||||
rtl_files=""
|
||||
DEFINE_DIR=$PWD/../design/snapshots/default
|
||||
DEFINE="${DEFINE_DIR}/pd_defines.vh"
|
||||
|
||||
rtl_files+=" /home/colin/develop/Cores-SweRV-EL2/demo/jtag/build/el2_pdef.vh "
|
||||
rtl_files+=" /home/colin/develop/Cores-SweRV-EL2/demo/jtag/build/common_defines.vh "
|
||||
rtl_files+=" /home/colin/develop/Cores-SweRV-EL2/demo/jtag/build/pd_defines.vh "
|
||||
# rtl_files+=" /home/colin/develop/Cores-SweRV-EL2/demo/jtag/build/el2_param.vh "
|
||||
# rtl_files+=" /home/colin/develop/Cores-SweRV-EL2/demo/jtag/build/pic_map_auto.h "
|
||||
|
||||
for src in $RTL; do
|
||||
rtl_files="$rtl_files $SOC/$src"
|
||||
done
|
||||
|
||||
mkdir -p gen
|
||||
rm -rf gen/*
|
||||
mkdir gen/design
|
||||
|
||||
YOSYS_COARSE=true
|
||||
YOSYS_GLOBRST=false
|
||||
YOSYS_SPLITNETS=false
|
||||
TOP="soc_top"
|
||||
|
||||
filelist=""
|
||||
for file in $rtl_files; do
|
||||
filelist="$filelist $file"
|
||||
done
|
||||
# sv2v $filelist > gen/soc_top.v
|
||||
sv2v -Ibuild $filelist > gen/soc_top.v
|
||||
RTL_FILES="$DEFINE $(cat $SOCFILE | sed 's/[[:space:]]//g' | sed '/^$/d' | sed -e "s!^!$SOC!" | tr '\n' ' ')"
|
||||
|
||||
sv2v -I${DEFINE_DIR} $RTL_FILES > gen/soc_top.v
|
||||
|
||||
{
|
||||
# echo "read_verilog -sv -Igen/ gen/common_defines.vh"
|
||||
# for file in $rtl_files; do
|
||||
# echo "read_verilog -sv -I../../design/include $file"
|
||||
# done
|
||||
echo "read_verilog gen/soc_top.v"
|
||||
|
||||
if test -n "$TOP"; then
|
||||
|
|
Loading…
Reference in New Issue