initial commit

This commit is contained in:
2023-03-18 15:35:53 +08:00
commit 5965eba577
3222 changed files with 4025781 additions and 0 deletions
@@ -0,0 +1,48 @@
#!/usr/bin/env python3
import math
import os
import sys
path = os.path.dirname(sys.argv[0])
f = open(os.path.join(path, 'modes.txt'))
conv = {}
for l in f:
if l[0] == "#":
continue
x = l.split()
if len(x) == 0:
continue
if len(x) == 1:
name = x[0]
modes = []
conv[name] = modes
continue
modes.append(list(map(int, x)))
f.close()
for name, modes in conv.items():
f = open(os.path.join(path, '..', '{}.qprs'.format(name)), 'w')
f.write('<?xml version="1.0" encoding="UTF-8"?>\n<ip><presets version="17.1">\n')
for m in modes:
f.write('\t<preset name="{} Mode {:02d}" kind="ad_ip_jesd204_tpl_dac" version="All" description="{}">\n'.format(name, m[0], name))
f.write('\t\t<parameter name="PART" value="{}" />\n'.format(name))
f.write('\t\t<parameter name="NUM_CHANNELS" value="{}" />\n'.format(m[1]))
f.write('\t\t<parameter name="NUM_LANES" value="{}" />\n'.format(m[2]))
if math.gcd(m[4], m[3]) != 1:
f.write('\t\t<parameter name="ENABLE_SAMPLES_PER_FRAME_MANUAL" value="1" />\n')
else:
f.write('\t\t<parameter name="ENABLE_SAMPLES_PER_FRAME_MANUAL" value="0" />\n')
f.write('\t\t<parameter name="SAMPLES_PER_FRAME_MANUAL" value="{}" />\n'.format(m[3]))
f.write('\t\t<parameter name="CONVERTER_RESOLUTION" value="{}" />\n'.format(m[6]))
f.write('\t\t<parameter name="BITS_PER_SAMPLE" value="{}" />\n'.format(m[7]))
f.write('\t</preset>\n')
f.write('</presets></ip>\n')
f.close()
@@ -0,0 +1,89 @@
# Mode M L S F HD N NP
AD9135
8 1 4 2 1 1 16 16
9 1 2 1 1 1 16 16
10 1 1 1 2 0 16 16
11 2 8 2 1 1 16 16
12 2 4 1 1 1 16 16
13 2 2 1 2 0 16 16
AD9136
8 1 4 2 1 1 16 16
9 1 2 1 1 1 16 16
10 1 1 1 2 0 16 16
11 2 8 2 1 1 16 16
12 2 4 1 1 1 16 16
13 2 2 1 2 0 16 16
AD9144
0 4 8 1 1 1 16 16
1 4 8 2 2 0 16 16
2 4 4 1 2 0 16 16
3 4 2 1 4 0 16 16
4 2 4 1 1 1 16 16
5 2 4 2 2 0 16 16
6 2 2 1 2 0 16 16
7 2 1 1 4 0 16 16
9 1 2 1 1 1 16 16
10 1 1 1 2 0 16 16
AD9152
4 2 4 1 1 1 16 16
5 2 4 2 2 0 16 16
6 2 2 1 2 0 16 16
7 2 1 1 4 0 16 16
9 1 2 1 1 1 16 16
10 1 1 1 2 0 16 16
AD9154
0 4 8 1 1 1 16 16
1 4 8 2 2 0 16 16
2 4 4 1 2 0 16 16
3 4 2 1 4 0 16 16
4 2 4 1 1 1 16 16
5 2 4 2 2 0 16 16
6 2 2 1 2 0 16 16
7 2 1 1 4 0 16 16
9 1 2 1 1 1 16 16
10 1 1 1 2 0 16 16
AD9171
0 2 1 1 4 1 16 16
3 2 2 1 2 1 16 16
5 2 1 1 3 1 12 12
AD9172
0 2 1 1 4 1 16 16
1 4 2 1 4 1 16 16
2 6 3 1 4 1 16 16
3 2 2 1 2 1 16 16
4 4 4 1 2 1 16 16
5 2 1 1 3 1 12 12
6 4 2 1 3 1 12 12
7 4 1 1 8 1 16 16
8 2 4 1 1 1 16 16
9 2 4 2 2 1 16 16
10 2 8 2 1 1 16 16
11 2 8 4 2 1 16 16
12 2 8 8 3 1 12 12
18 1 4 2 1 1 16 16
19 1 4 4 2 1 16 16
20 1 8 4 1 1 16 16
21 1 8 8 2 1 16 16
AD9173
0 2 1 1 4 1 16 16
1 4 2 1 4 1 16 16
2 6 3 1 4 1 16 16
3 2 2 1 2 1 16 16
4 4 4 1 2 1 16 16
5 2 1 1 3 1 12 12
6 4 2 1 3 1 12 12
7 4 1 1 8 1 16 16
8 2 4 1 1 1 16 16
9 2 4 2 2 1 16 16
13 2 4 1 1 1 11 16
14 2 4 2 2 1 11 16
15 2 8 2 1 1 11 16
16 2 8 4 2 1 11 16
17 2 8 8 3 1 11 12