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

Subversion Repositories ssbcc

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

Go to most recent revision | 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
source ${TOOL_DIR}/settings32.sh || { echo "ERROR:  settings32.sh failed" > /dev/stderr; exit 1; }
41
 
42
for fname in ${FILES}; do
43
  echo "verilog work \"${fname}\"";
44
done > ${NAME}.prj;
45
 
46
mkdir -p xst/projnav.tmp;
47
 
48
cat < ${NAME}.xst
49
set -tmpdir "xst/projnav.tmp"
50
set -xsthdpdir "xst"
51
run
52
-ifn ${NAME}.prj
53
-ofn ${NAME}
54
-p ${DEVICE}
55
-top ${NAME}
56
${XST_ARG}
57
EOF
58
 
59
xst \
60
  -ifn "${NAME}.xst" \
61
  -ofn "${NAME}.syr" \
62
|| { echo "ERROR:  XST Failed!"; exit 1; }
63
 
64
#
65
# Convert the ngc to an ngd.
66
#
67
 
68
ngdbuild \
69
  -dd _ngo \
70
  -nt timestamp \
71
  -uc ${NAME}.ucf \
72
  -p ${DEVICE} \
73
  ${NAME}.ngc ${NAME}.ngd \
74
|| { echo "ngdbuild Failed!"; exit 1; }
75
 
76
#
77
# Run map.
78
#
79
 
80
if [[ "${VERSION}" > "12.0" ]]; then
81
  MAP_ARG+=" -r 4";
82
fi
83
 
84
if [ -z "`echo ${MAP_ARG} | sed -n '/logic_opt/p'`" ]; then
85
  MAP_ARG+=" -logic_opt off";
86
fi
87
 
88
map                             \
89
  -p ${DEVICE}                  \
90
  -o ${NAME}.ncd                \
91
  -detail                       \
92
  -w                            \
93
  ${MAP_ARG}                    \
94
  ${NAME}.ngd ${NAME}.pcf       \
95
|| { echo "MAP Failed!"; exit 1; }
96
 
97
#
98
# Run par.
99
#
100
 
101
par             \
102
  -w            \
103
  -xe n         \
104
  ${NAME}.ncd ${NAME}.ncd ${NAME}.pcf \
105
|| { echo "PAR Failed!"; exit 1; }
106
 
107
#
108
# Optionally perform timing analysis
109
#
110
 
111
if [ `false` ]; then
112
  trce \
113
    -v 3 \
114
    -s 3 \
115
    -n 3 \
116
    -fastpaths \
117
    -xml ${NAME}.twx \
118
    ${NAME}.ncd \
119
    -o ${NAME}.twr \
120
    ${NAME}.pcf \
121
    -ucf ${NAME}.ucf
122
fi
123
 
124
# Successful execution!
125
exit 0;

powered by: WebSVN 2.1.0

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