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

Subversion Repositories ssbcc

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

powered by: WebSVN 2.1.0

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