-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathExamplePCB.py
More file actions
75 lines (66 loc) · 1.96 KB
/
ExamplePCB.py
File metadata and controls
75 lines (66 loc) · 1.96 KB
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
from PCBpy import *
schem_data = {
'cad_filename': 'muctpi_pstxref.dat',
'loop_a_net': ('XCVU160', 'XCKU095', 'CON38P'),
'loop_b_pin': ('AFBR')
}
part_specific_data = [
{
'xlx_filename': 'xcvu9pflgc2104pkg.csv',
'cad_part_num': 'XCVU160-H1FLGC2104',
'cad_instance': 'IC4',
'gt_types': ('MGTH', 'MGTY'),
'first_gtquad': 19,
'gtquad_initial': [1, 2],
'ibert_path':'localhost:3121/xilinx_tcf/*/0_1_0_*'
},
{
'xlx_filename': 'xcvu9pflgc2104pkg.csv',
'cad_part_num': 'XCVU160-H1FLGC2104',
'cad_instance': 'IC15',
'gt_types': ('MGTH', 'MGTY'),
'first_gtquad': 19,
'gtquad_initial': [1, 2],
'ibert_path':'localhost:3121/xilinx_tcf/*/1_1_0_*'
},
{
'xlx_filename': 'xcku095ffvb2104pkg.csv',
'cad_part_num': 'XCKU095-1FFVB2104C',
'cad_instance': 'IC39',
'gt_types': ('MGTH', 'MGTY'),
'first_gtquad': 24,
'gtquad_initial': [1, 2],
'ibert_path':'localhost:3121/xilinx_tcf/*/2_1_0_*'
},
{
'xlx_filename': 'xczu3egsfvc784pkg.csv',
'cad_part_num': 'XCZU3EG-1SFVC784E',
'cad_instance': 'IC84',
'gt_types': ('PS_MGTRRX', 'PS_MGTRTX'),
'first_gtquad': 5,
'gtquad_initial': [5],
'ibert_path':'localhost:3121/xilinx_tcf/*/3_1_0_*'
}
]
for part in part_specific_data:
PCBpy(part, schem_data)
# checking cross references
rfname = 'in/cad/muctpi_basenets.txt'
start_skip_conditions = ['%','Title:','Design:','Date:','Base','\n']
with open(rfname) as rf:
content = rf.readlines()
conditions = [
[endswith, 'P'],
[endswith, 'N'],
[endswith, '*'],
[anywhere, 'SCL'],
[anywhere, 'SDA'],
[anywhere, 'TCK'],
[anywhere, 'TDI'],
[anywhere, 'TDO'],
[anywhere, 'TMS'],
[anywhere, '12V'],
]
for c in conditions:
print("-----------------------------")
check_file(content, c[0], c[1], start_skip_conditions)