File: colbuf_logic.sh

package info (click to toggle)
fpga-icestorm 0~20160913git266e758-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,628 kB
  • ctags: 1,871
  • sloc: python: 15,333; cpp: 3,356; sh: 1,598; ansic: 531; makefile: 417
file content (29 lines) | stat: -rw-r--r-- 598 bytes parent folder | download | duplicates (5)
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
#!/bin/bash

set -ex

mkdir -p colbuf_logic.work
cd colbuf_logic.work

glb_pins="93 21 128 50 20 94 49 129"

for x in 1 2 {4..9} 11 12; do
for y in {1..16}; do
	pf="colbuf_logic_${x}_${y}"
	gpin=$( echo $glb_pins | tr ' ' '\n' | sort -R | head -n1; )
	cat > ${pf}.v <<- EOT
		module top (input c, d, output q);
			SB_DFF dff (
				.C(c),
				.D(d),
				.Q(q)
			);
		endmodule
	EOT
	echo "set_location dff $x $y 0" > ${pf}.pcf
	echo "set_io c $gpin" >> ${pf}.pcf
	bash ../../icecube.sh ${pf}.v > ${pf}.log 2>&1
	../../../icebox/icebox_explain.py ${pf}.asc > ${pf}.exp
	rm -rf ${pf}.tmp
done; done