OpenCores
URL https://opencores.org/ocsvn/minsoc/minsoc/trunk

Subversion Repositories minsoc

[/] [minsoc/] [trunk/] [backend/] [spartan3a_dsp_kit/] [configure] - Blame information for rev 69

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 64 rfajardo
#!/bin/bash
2
 
3
#new boards have to udpate this
4
BOARD=spartan3a_dsp_kit                                         #this has to have the name of the directory this file is in
5
DEVICE_PART='xc3sd1800a-4-fg676'
6
CONSTRAINT_FILE='spartan3a_dsp_kit.ucf'
7
#~new boards update
8
 
9
#system workings
10
MINSOC_DIR=`pwd`/../..
11
BACKEND_DIR=$MINSOC_DIR/backend
12
SYN_DIR=$MINSOC_DIR/syn
13
SYNSRC_DIR=$SYN_DIR/src
14
SYNSUPPORT_DIR=$SYN_DIR/buildSupport
15
 
16
SYN_FILES=(eth_top.xst uart_top.xst adbg_top.xst or1200_top.xst minsoc_top.xst Makefile)
17
 
18
FIND_PART='DEVICE_PART'
19
FIND_CONSTRAINT='CONSTRAINT_FILE'
20
 
21
BOARD_DIR=$BACKEND_DIR/$BOARD
22 69 rfajardo
BOARD_FILES=(board.h orp.ld minsoc_defines.v minsoc_bench_defines.v gcc-opt.mk $CONSTRAINT_FILE)
23 64 rfajardo
 
24
in_minsoc=`pwd | grep minsoc/backend/${BOARD}$`
25
if [ -z $in_minsoc ]
26
then
27
        echo ""
28
        echo "                  !!!WARNING!!!"
29
        echo "This script cannot be run out of a board directory inside minsoc/backend,"
30
        echo "because it relies on the directory structure of the minsoc system."
31
        echo ""
32
        exit 1
33
fi
34
 
35
echo ""
36
echo "Configuring SoC board's specific files for firmware compilation, "
37
echo "testbench generation and synthesis."
38
echo "Firmware and testbench looks for board specific files under minsoc/backend."
39
echo "Synthesis work under minsoc/syn."
40
echo ""
41
echo ""
42
 
43
if [ $CONSTRAINT_FILE == 'NONE' ]
44
then
45
    echo "Skipping synthesis preparation. Standard implementation can only be simulated."
46
else
47
    echo "Device part for files under minsoc/syn/src will be patched and stored "
48
    echo "temporarily."
49
    echo "Afterwards, they are copied to minsoc/syn/buildSupport."
50
    echo "__________________________________________________________________________"
51
    echo ""
52
    for file in "${SYN_FILES[@]}"
53
    do
54
        echo "Updating synthesis file, $file..."
55
        echo "Copying $file to synthesis directory..."
56
        echo ""
57
        sed "s/$FIND_PART/$DEVICE_PART/g" $SYNSRC_DIR/$file > TMPFILE
58
        sed "s/$FIND_CONSTRAINT/$CONSTRAINT_FILE/g" TMPFILE > TMPFILE2 && mv TMPFILE2 $SYNSUPPORT_DIR/$file
59
        rm TMPFILE
60
    done
61
 
62
    echo "Moving Makefile back from minsoc/syn/buildSupport to minsoc/syn..."
63
    mv $SYNSUPPORT_DIR/Makefile $SYN_DIR
64
fi
65
echo ""
66
echo ""
67
 
68
 
69
echo "Copying board specific SoC files to backend directory."
70
echo "__________________________________________________________________________"
71
echo ""
72
for file in "${BOARD_FILES[@]}"
73
do
74
    if [ $file != NONE ]
75
    then
76
        echo "Copying $file, to backend directory..."
77
        cp $BOARD_DIR/$file $BACKEND_DIR
78
    fi
79
done
80
echo ""
81
echo ""

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.