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

Subversion Repositories minsoc

[/] [minsoc/] [trunk/] [prj/] [scripts/] [xilinxxst.sh] - Blame information for rev 130

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

Line No. Rev Author Line
1 85 rfajardo
#!/bin/bash
2
 
3
#system workings
4
MINSOC_DIR=`pwd`/..
5
 
6
PROJECT=$1
7
DIR_OUTPUT=$2
8
PROJECT_FILE=$3
9
TOP_MODULE_NAME=$4
10
TOP_MODULE=$5
11
 
12 108 rfajardo
ENV=`uname -o`
13
 
14
function adaptpath
15
{
16
    if [ "$ENV" == "Cygwin" ]
17
    then
18
        local cygpath=`cygpath -w $1`
19
        echo "$cygpath"
20
    else
21
        echo "$1"
22
    fi
23
}
24
 
25 85 rfajardo
if [ ! -f $PROJECT ]
26
then
27
    echo "Unexistent project file."
28
    exit 1
29
fi
30
 
31
if [ -z "$DIR_OUTPUT" ]
32
then
33
    echo "Second argument should be the destintion file for the directory inclusions."
34
    exit 1
35
fi
36 88 rfajardo
echo -n "" > $DIR_OUTPUT
37 85 rfajardo
 
38
source $PROJECT
39
 
40
echo "set -tmpdir "./xst"" >> $DIR_OUTPUT
41
echo "run" >> $DIR_OUTPUT
42
 
43
DIR_PATH="-vlgincdir {"
44
 
45
for dir in "${PROJECT_DIR[@]}"
46
do
47 108 rfajardo
    adapted_dir=`adaptpath $MINSOC_DIR/$dir`
48
    DIR_PATH="$DIR_PATH \"$adapted_dir\" "
49 85 rfajardo
done
50
 
51
DIR_PATH="$DIR_PATH }"
52
echo $DIR_PATH >> $DIR_OUTPUT
53
 
54 108 rfajardo
adapted_project_file=`adaptpath $MINSOC_DIR/prj/xilinx/${PROJECT_FILE}`
55
echo "-ifn $adapted_project_file" >> $DIR_OUTPUT
56 85 rfajardo
echo "-ifmt Verilog" >> $DIR_OUTPUT
57
echo "-ofn ${TOP_MODULE_NAME}" >> $DIR_OUTPUT
58
echo "-ofmt NGC" >> $DIR_OUTPUT
59
echo "-p DEVICE_PART" >> $DIR_OUTPUT
60
echo "-top ${TOP_MODULE_NAME}" >> $DIR_OUTPUT
61
echo "-opt_mode Speed" >> $DIR_OUTPUT
62
echo "-opt_level 1" >> $DIR_OUTPUT
63
if [ -n "$TOP_MODULE" ]
64
then
65
    echo "-iobuf yes" >> $DIR_OUTPUT
66
else
67
    echo "-iobuf no" >> $DIR_OUTPUT
68
fi

powered by: WebSVN 2.1.0

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