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

Subversion Repositories minsoc

[/] [minsoc/] [trunk/] [backend/] [spartan3e_starter_kit/] [configure] - Blame information for rev 74

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

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

powered by: WebSVN 2.1.0

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