URL
https://opencores.org/ocsvn/minsoc/minsoc/trunk
Subversion Repositories minsoc
[/] [minsoc/] [trunk/] [backend/] [std/] [configure] - Rev 158
Compare with Previous | Blame | View Log
#!/bin/bash#new boards have to udpate thisBOARD=std #this has to have the name of the directory this file is inDEVICE_PART='NONE'CONSTRAINT_FILE='NONE'#~new boards update#system workingsMINSOC_DIR=`pwd`/../..BACKEND_DIR=$MINSOC_DIR/backendSYN_DIR=$MINSOC_DIR/synSYNSRC_DIR=$MINSOC_DIR/prj/xilinxSYNSUPPORT_DIR=$SYN_DIR/buildSupportMAKEFILE_DIR=$SYN_DIR/xilinxSYN_FILES=(ethmac.xst uart_top.xst adbg_top.xst or1200_top.xst minsoc_top.xst)MAKEFILE=MakefileFIND_PART='DEVICE_PART'FIND_CONSTRAINT='CONSTRAINT_FILE'BOARD_DIR=$BACKEND_DIR/$BOARDBOARD_FILES=(board.h orp.ld minsoc_defines.v minsoc_bench_defines.v gcc-opt.mk $CONSTRAINT_FILE)in_minsoc=`pwd | grep minsoc/backend/${BOARD}$`if [ -z $in_minsoc ]thenecho ""echo " !!!WARNING!!!"echo "This script cannot be run if not in a board directory inside minsoc/backend,"echo "because it relies on the directory structure of the minsoc system."echo ""echo "Possibly your minsoc directory is named differently, minsoc_trunk for example."echo "Its name must be minsoc only."echo ""exit 1fiecho ""echo "This script sets up the SoC for simulations and synthesis."echo ""echo "In order to do so, SoC board's specific files for firmware compilation, "echo "testbench generation and synthesis are configured."echo "Firmware and testbench looks for board specific files under $BACKEND_DIR."echo "Synthesis work under $SYN_DIR."echo ""echo ""echo "Copying board specific SoC files from $BOARD_DIR to $BACKEND_DIR directory."echo "__________________________________________________________________________"echo ""for file in "${BOARD_FILES[@]}"doif [ $file != NONE ]thenecho "Copying $file, to backend directory..."cp $BOARD_DIR/$file $BACKEND_DIRfidoneecho ""echo ""echo "Generating project files for simulation and synthesis..."echo "__________________________________________________________________________"echo ""make -C $MINSOC_DIR/prjecho "Generation complete."echo ""echo ""if [ $CONSTRAINT_FILE == 'NONE' ]thenecho "Skipping synthesis preparation. Standard implementation can only be simulated."echo ""echo ""elseecho "Device part for files under $SYNSRC_DIR will be patched and stored "echo "temporarily."echo "Afterwards, they are copied to $SYNSUPPORT_DIR."echo "__________________________________________________________________________"echo ""for file in "${SYN_FILES[@]}"doecho "Updating synthesis file, $file..."echo "Copying $file to synthesis directory..."echo ""sed "s/$FIND_PART/$DEVICE_PART/g" $SYNSRC_DIR/$file > TMPFILEsed "s/$FIND_CONSTRAINT/$CONSTRAINT_FILE/g" TMPFILE > TMPFILE2 && mv TMPFILE2 $SYNSUPPORT_DIR/$filerm TMPFILEdoneecho "Updating Makefile file under $MAKEFILE_DIR..."echo "Copying Makefile to synthesis directory, $SYN_DIR..."echo ""sed "s/$FIND_PART/$DEVICE_PART/g" $MAKEFILE_DIR/$MAKEFILE > TMPFILEsed "s/$FIND_CONSTRAINT/$CONSTRAINT_FILE/g" TMPFILE > TMPFILE2 && mv TMPFILE2 $SYN_DIR/$MAKEFILErm TMPFILEcp $MAKEFILE_DIR/setup.bat $SYN_DIR/setup.batecho ""echo ""fi#Precompiling firmwaresecho "Precompiling delivered libraries and firmwares..."make -C ../../sw/utilsmake -C ../../sw/supportmake -C ../../sw/driversmake -C ../../sw/uartmake -C ../../sw/jspmake -C ../../sw/ethecho "done."echo ""echo ""echo "Configuration done."
