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

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [core/] [9x8/] [build/] [xilinx-xc6slx4/] [make] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sinclairrf
#!/bin/bash
2
# Copyright 2013, Sinclair R.F., Inc.
3
# Make script for Xilinx Spartan 6
4
 
5
XST_ARG="";
6
MAP_ARG="";
7
 
8
TOOL_DIR="$1";
9
NAME="$2";
10
if [ -n "$3" ]; then
11
  MAP_ARG+=" $3";
12
fi
13
 
14
#DEVICE=xc6slx4l-tqg144;  # low power device
15
DEVICE=xc6slx4-2tqg144;  # standard performance device
16
#DEVICE=xc6slx4-3tqg144;  # high performance device
17
 
18
( cd ../uc; ../../../../ssbcc -q --define-clog2 ${NAME}.9x8; ) || exit 1;
19
 
20
FILES="";
21
FILES+=" ../uc/${NAME}.v";
22
 
23
VERSION="`echo ${TOOL_DIR} | sed -e 's/^[^0-9]\+//' -e 's/[^0-9]\+$//'`";
24
 
25
#
26
# Optional configuration parameters.
27
#
28
 
29
# Configure tools for minimum area implementation.
30
#XST_ARG+="-opt_mode area -fsm_encoding user ";
31
#MAP_ARG+=" -global_opt area -lc area";
32
 
33
# Configure tools for maximum speed.
34
XST_ARG+="-opt_mode speed -resource_sharing no ";
35
#MAP_ARG+=" -global_opt speed -lc auto -logic_opt on -register_duplication on -retiming on -timing -xe c";
36
 
37
#
38
# Configure and run the synthesis
39
#
40
 
41 6 sinclairrf
SETTINGS="";
42
if [[ "`uname --machine`" == "x86_64" && -f "${TOOL_DIR}/settings64.sh" ]]; then
43
  SETTINGS="${TOOL_DIR}/settings64.sh";
44
fi
45
if [ -z "${SETTINGS}" ]; then
46
  SETTINGS="${TOOL_DIR}/settings32.sh";
47
fi
48
source ${SETTINGS} || { echo "ERROR:  ${SETTINGS} failed" > /dev/stderr; exit 1; }
49 2 sinclairrf
 
50
for fname in ${FILES}; do
51
  echo "verilog work \"${fname}\"";
52
done > ${NAME}.prj;
53
 
54
mkdir -p xst/projnav.tmp;
55
 
56
cat < ${NAME}.xst
57
set -tmpdir "xst/projnav.tmp"
58
set -xsthdpdir "xst"
59
run
60
-ifn ${NAME}.prj
61
-ofn ${NAME}
62
-p ${DEVICE}
63
-top ${NAME}
64
${XST_ARG}
65
EOF
66
 
67
xst \
68
  -ifn "${NAME}.xst" \
69
  -ofn "${NAME}.syr" \
70
|| { echo "ERROR:  XST Failed!"; exit 1; }
71
 
72
#
73
# Convert the ngc to an ngd.
74
#
75
 
76
ngdbuild \
77
  -dd _ngo \
78
  -nt timestamp \
79
  -uc ${NAME}.ucf \
80
  -p ${DEVICE} \
81
  ${NAME}.ngc ${NAME}.ngd \
82
|| { echo "ngdbuild Failed!"; exit 1; }
83
 
84
#
85
# Run map.
86
#
87
 
88
if [[ "${VERSION}" > "12.0" ]]; then
89
  MAP_ARG+=" -r 4";
90
fi
91
 
92
if [ -z "`echo ${MAP_ARG} | sed -n '/logic_opt/p'`" ]; then
93
  MAP_ARG+=" -logic_opt off";
94
fi
95
 
96
map                             \
97
  -p ${DEVICE}                  \
98
  -o ${NAME}.ncd                \
99
  -detail                       \
100
  -w                            \
101
  ${MAP_ARG}                    \
102
  ${NAME}.ngd ${NAME}.pcf       \
103
|| { echo "MAP Failed!"; exit 1; }
104
 
105
#
106
# Run par.
107
#
108
 
109
par             \
110
  -w            \
111
  -xe n         \
112
  ${NAME}.ncd ${NAME}.ncd ${NAME}.pcf \
113
|| { echo "PAR Failed!"; exit 1; }
114
 
115
#
116
# Optionally perform timing analysis
117
#
118
 
119
if [ `false` ]; then
120
  trce \
121
    -v 3 \
122
    -s 3 \
123
    -n 3 \
124
    -fastpaths \
125
    -xml ${NAME}.twx \
126
    ${NAME}.ncd \
127
    -o ${NAME}.twr \
128
    ${NAME}.pcf \
129
    -ucf ${NAME}.ucf
130
fi
131
 
132
# Successful execution!
133
exit 0;

powered by: WebSVN 2.1.0

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