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

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [example/] [hello_world/] [Xilinx/] [SP601/] [make] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sinclairrf
#!/bin/sh
2
#
3
# Make script for SP601 board.
4
 
5
# Ensure the script to build the micro processor is present.
6
if [ -n "`which ssbcc | sed -n -e '/^which:/p'`" ]; then
7
  echo "FATAL ERROR:" > /dev/stderr;
8
  echo "Could not find \"ssbcc\" required for build" > /dev/stderr;
9
  exit 1;
10
fi
11
 
12
#
13
# Set the build parameters.
14
#
15
 
16
NAME=sp601
17
DEVICE=xc6slx16-2-csg324
18
 
19
FILES="";
20
FILES+=" ../../hello_world.v";
21
FILES+=" ${NAME}.v";
22
 
23
#
24
# Prepatory work
25
#
26
 
27
# Build the micro processor.
28
( cd ../..; ssbcc --define-clog hello_world.9x8 ) || exit 1;
29
 
30
#
31
# Configure and run the synthesis
32
#
33
 
34
for fname in ${FILES}; do
35
  echo "verilog work \"${fname}\"";
36
done > ${NAME}.prj;
37
 
38
mkdir -p xst/projnav.tmp;
39
 
40
cat < ${NAME}.xst
41
set -tmpdir "xst/projnav.tmp"
42
set -xsthdpdir "xst"
43
run
44
-ifn ${NAME}.prj
45
-ifmt mixed
46
-ofn ${NAME}
47
-ofmt NGC
48
-p ${DEVICE}
49
-top ${NAME}
50
-opt_mode Speed
51
-opt_level 1
52
-power NO
53
-iuc NO
54
-keep_hierarchy No
55
-netlist_hierarchy As_Optimized
56
-rtlview Yes
57
-glob_opt AllClockNets
58
-read_cores YES
59
-write_timing_constraints NO
60
-cross_clock_analysis NO
61
-hierarchy_separator /
62
-bus_delimiter <>
63
-case Maintain
64
-slice_utilization_ratio 100
65
-bram_utilization_ratio 100
66
-dsp_utilization_ratio 100
67
-lc Auto
68
-reduce_control_sets Auto
69
-fsm_extract YES -fsm_encoding Auto
70
-safe_implementation No
71
-fsm_style LUT
72
-ram_extract Yes
73
-ram_style Auto
74
-rom_extract Yes
75
-shreg_extract YES
76
-rom_style Auto
77
-auto_bram_packing NO
78
-resource_sharing YES
79
-async_to_sync NO
80
-shreg_min_size 2
81
-use_dsp48 Auto
82
-iobuf YES
83
-max_fanout 100000
84
-bufg 16
85
-register_duplication YES
86
-register_balancing No
87
-optimize_primitives NO
88
-use_clock_enable Auto
89
-use_sync_set Auto
90
-use_sync_reset Auto
91
-iob Auto
92
-equivalent_register_removal YES
93
-slice_utilization_ratio_maxmargin 5
94
EOF
95
 
96
xst \
97
  -ifn "${NAME}.xst" \
98
  -ofn "${NAME}.syr" \
99
|| { echo "XST Failed!"; exit 1; }
100
 
101
#
102
# Run through PAR
103
#
104
 
105
ngdbuild \
106
  -dd _ngo \
107
  -nt timestamp \
108
  -uc ${NAME}.ucf \
109
  -p ${DEVICE} \
110
  ${NAME}.ngc ${NAME}.ngd \
111
|| { echo "ngdbuild Failed!"; exit 1; }
112
 
113
map \
114
  -p ${DEVICE} \
115
  -w \
116
  -logic_opt off \
117
  -ol high \
118
  -t 1 \
119
  -xt 0 \
120
  -register_duplication off \
121
  -r 4 \
122
  -global_opt off \
123
  -mt off \
124
  -ir off \
125
  -pr off \
126
  -lc off \
127
  -power off \
128
  -o ${NAME}.ncd \
129
  ${NAME}.ngd ${NAME}.pcf \
130
|| { echo "MAP Failed!"; exit 1; }
131
 
132
par \
133
  -w \
134
  -ol high \
135
  -mt off \
136
  ${NAME}.ncd ${NAME}.ncd ${NAME}.pcf \
137
|| { echo "PAR Failed!"; exit 1; }
138
 
139
#
140
# Optionally perform timing analysis
141
#
142
 
143
if [ `false` ]; then
144
  trce \
145
    -v 3 \
146
    -s 3 \
147
    -n 3 \
148
    -fastpaths \
149
    -xml ${NAME}.twx \
150
    ${NAME}.ncd \
151
    -o ${NAME}.twr \
152
    ${NAME}.pcf \
153
    -ucf ${NAME}.ucf
154
fi
155
 
156
#
157
# Generate the bitstream file
158
#
159
 
160
cat <${NAME}.ut
161
-w
162
-g DebugBitstream:No
163
-g Binary:no
164
-g CRC:Enable
165
-g Reset_on_err:No
166
-g ConfigRate:2
167
-g ProgPin:PullUp
168
-g TckPin:PullUp
169
-g TdiPin:PullUp
170
-g TdoPin:PullUp
171
-g TmsPin:PullUp
172
-g UnusedPin:PullDown
173
-g UserID:0xFFFFFFFF
174
-g ExtMasterCclk_en:No
175
-g SPI_buswidth:1
176
-g TIMER_CFG:0xFFFF
177
-g multipin_wakeup:No
178
-g StartUpClk:CClk
179
-g DONE_cycle:4
180
-g GTS_cycle:5
181
-g GWE_cycle:6
182
-g LCK_cycle:NoWait
183
-g Security:None
184
-g DonePipe:No
185
-g DriveDone:No
186
-g en_sw_gsr:No
187
-g drive_awake:No
188
-g sw_clk:Startupclk
189
-g sw_gwe_cycle:5
190
-g sw_gts_cycle:4
191
EOF
192
 
193
bitgen -f ${NAME}.ut ${NAME}.ncd \
194
|| { echo "BITGEN Failed!"; exit 1; }

powered by: WebSVN 2.1.0

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