summaryrefslogtreecommitdiff
path: root/tests/xsthammer/run-xst.sh
blob: 879ce75c51cf76485e76bfa8205b8594a53bcee3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash

set -e
mkdir -p xst
. /opt/Xilinx/14.2/ISE_DS/settings64.sh

rm -rf xst_temp
mkdir xst_temp
cd xst_temp

if [ $# -eq 0 ]; then
	set -- $( ls ../rtl | sed 's,\.v$,,' )
fi

for job
do
	cat > $job.xst <<- EOT
		run
		-ifn $job.prj
		-ifmt mixed
		-ofn $job
		-ofmt NGC
		-p xc6vlx75t-2-ff784
		-top $job
		-opt_mode Speed
		-opt_level 1
		-power NO
		-iuc NO
		-keep_hierarchy NO
		-rtlview Yes
		-glob_opt AllClockNets
		-read_cores YES
		-write_timing_constraints NO
		-cross_clock_analysis NO
		-hierarchy_separator /
		-bus_delimiter <>
		-case maintain
		-slice_utilization_ratio 100
		-bram_utilization_ratio 100
		-dsp_utilization_ratio 100
		-fsm_extract YES -fsm_encoding Auto
		-safe_implementation No
		-fsm_style lut
		-ram_extract Yes
		-ram_style Auto
		-rom_extract Yes
		-shreg_extract YES
		-rom_style Auto
		-auto_bram_packing NO
		-resource_sharing YES
		-async_to_sync NO
		-use_dsp48 auto
		-iobuf NO
		-max_fanout 100000
		-bufg 32
		-register_duplication YES
		-register_balancing No
		-optimize_primitives NO
		-use_clock_enable Auto
		-use_sync_set Auto
		-use_sync_reset Auto
		-iob auto
		-equivalent_register_removal YES
		-slice_utilization_ratio_maxmargin 5
	EOT

	cat > $job.prj <<- EOT
		verilog work "../rtl/$job.v"
	EOT

	xst -ifn $job.xst
	netgen -w -ofmt verilog $job.ngc $job
	cp $job.v ../xst/$job.v
done