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

Subversion Repositories ssbcc

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

powered by: WebSVN 2.1.0

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