mirror of
https://github.com/EEVengers/ThunderScope.git
synced 2025-04-11 23:19:16 +00:00
Got multi-channel routing working
Needed to change refdes on front end channel components
This commit is contained in:
parent
f7a7227757
commit
8475c29d0c
LOADING design file
LOADING design file
LOADING design file
LOADING design file
LOADING design file
LOADING design file
LOADING design file
LOADING design file
@ -9,8 +9,16 @@
|
||||
"PWR"
|
||||
],
|
||||
"hidden_nets": [
|
||||
"/VCM",
|
||||
"/ADC/ADC_CLK_P",
|
||||
"/ADC/ADC_CLK_N",
|
||||
"/CH1/ATTEN_50X_R",
|
||||
"/CH2/ATTEN_50X_R",
|
||||
"/CH3/ATTEN_50X_R",
|
||||
"/TRIM_1",
|
||||
"/TRIM_2",
|
||||
"/TRIM_3",
|
||||
"/TRIM_4",
|
||||
"+2V5",
|
||||
"Net-(J4-Pad2)",
|
||||
"AGND",
|
||||
@ -22,9 +30,24 @@
|
||||
"-5V",
|
||||
"+VBIAS",
|
||||
"+3V3_PGA",
|
||||
"/CH1/TERM_50Z",
|
||||
"/CH2/TERM_50Z",
|
||||
"/CH3/TERM_50Z",
|
||||
"/CH1/BNC_IN",
|
||||
"/CH2/BNC_IN",
|
||||
"/CH3/BNC_IN",
|
||||
"+1V8APLL",
|
||||
"+5V2",
|
||||
"-VBIAS",
|
||||
"/CH1/TERM_50Z_R",
|
||||
"/CH2/TERM_50Z_R",
|
||||
"/CH3/TERM_50Z_R",
|
||||
"/CH1_N",
|
||||
"/CH1_P",
|
||||
"/CH2_N",
|
||||
"/CH2_P",
|
||||
"/CH3_P",
|
||||
"/CH3_N",
|
||||
"+1V8_ACQ",
|
||||
"/TERM_1",
|
||||
"/TERM_2",
|
||||
@ -34,6 +57,10 @@
|
||||
"/ATTEN_2",
|
||||
"/ATTEN_3",
|
||||
"/ATTEN_4",
|
||||
"/PGA_CSn_1",
|
||||
"/PGA_CSn_2",
|
||||
"/PGA_CSn_3",
|
||||
"/PGA_CSn_4",
|
||||
"/DC_CPL_1",
|
||||
"/DC_CPL_2",
|
||||
"/DC_CPL_3",
|
||||
@ -60,6 +87,8 @@
|
||||
"/ADC/LCLK_P",
|
||||
"/ADC/D4A_P",
|
||||
"/ADC/D4B_N",
|
||||
"/PGA_SDIO",
|
||||
"/PGA_SCLK",
|
||||
"+VUSB",
|
||||
"Net-(D1-R)",
|
||||
"Net-(D1-G)",
|
||||
@ -132,7 +161,76 @@
|
||||
"/COMP",
|
||||
"/FPGA/PROBE_COMP",
|
||||
"/FPGA/LED_R",
|
||||
"/FPGA/LED_B"
|
||||
"/FPGA/LED_B",
|
||||
"/CH1/TERM_1M_R",
|
||||
"/CH2/TERM_1M_R",
|
||||
"/CH3/TERM_1M_R",
|
||||
"/CH1/ATTEN_50X",
|
||||
"/CH2/ATTEN_50X",
|
||||
"/CH3/ATTEN_50X",
|
||||
"/CH1/BUF_IN",
|
||||
"/CH1/ATTEN_OUT_R",
|
||||
"/CH2/BUF_IN",
|
||||
"/CH2/ATTEN_OUT_R",
|
||||
"/CH3/BUF_IN",
|
||||
"/CH3/ATTEN_OUT_R",
|
||||
"/CH1/SW_COM",
|
||||
"/CH1/SW_NO",
|
||||
"/CH2/SW_COM",
|
||||
"/CH2/SW_NO",
|
||||
"/CH3/SW_NO",
|
||||
"/CH3/SW_COM",
|
||||
"/CH1/BUF_IN_AUX",
|
||||
"/CH2/BUF_IN_AUX",
|
||||
"/CH3/BUF_IN_AUX",
|
||||
"/CH1/DC_FB",
|
||||
"/CH1/OPA_OUT",
|
||||
"/CH2/DC_FB",
|
||||
"/CH2/OPA_OUT",
|
||||
"/CH3/DC_FB",
|
||||
"/CH3/OPA_OUT",
|
||||
"/CH1/+VPGA",
|
||||
"/CH2/+VPGA",
|
||||
"/CH3/+VPGA",
|
||||
"/CH1/PGA_BIAS",
|
||||
"/CH2/PGA_BIAS",
|
||||
"/CH3/PGA_BIAS",
|
||||
"/CH1/OUT_R_N",
|
||||
"/CH2/OUT_R_N",
|
||||
"/CH3/OUT_R_N",
|
||||
"/CH1/OUT_R_P",
|
||||
"/CH2/OUT_R_P",
|
||||
"/CH3/OUT_R_P",
|
||||
"/CH1/TERM_1M",
|
||||
"/CH1/ATTEN_IN",
|
||||
"/CH2/TERM_1M",
|
||||
"/CH2/ATTEN_IN",
|
||||
"/CH3/TERM_1M",
|
||||
"/CH3/ATTEN_IN",
|
||||
"/CH1/ATTEN_1X",
|
||||
"/CH1/ATTEN_OUT",
|
||||
"/CH2/ATTEN_OUT",
|
||||
"/CH2/ATTEN_1X",
|
||||
"/CH3/ATTEN_1X",
|
||||
"/CH3/ATTEN_OUT",
|
||||
"/CH1/DC_CPLn",
|
||||
"/CH2/DC_CPLn",
|
||||
"/CH3/DC_CPLn",
|
||||
"/CH1/BUF_R_BIAS",
|
||||
"/CH2/BUF_R_BIAS",
|
||||
"/CH3/BUF_R_BIAS",
|
||||
"/CH1/BUF_OUT",
|
||||
"/CH1/BUF_OUT_R",
|
||||
"/CH2/BUF_OUT_R",
|
||||
"/CH2/BUF_OUT",
|
||||
"/CH3/BUF_OUT",
|
||||
"/CH3/BUF_OUT_R",
|
||||
"/CH1/BUF_IN_BIAS",
|
||||
"/CH2/BUF_IN_BIAS",
|
||||
"/CH3/BUF_IN_BIAS",
|
||||
"/CH1/DC_FB_TRIM",
|
||||
"/CH2/DC_FB_TRIM",
|
||||
"/CH3/DC_FB_TRIM"
|
||||
],
|
||||
"high_contrast_mode": 0,
|
||||
"net_color_mode": 1,
|
||||
@ -145,17 +243,17 @@
|
||||
"zones": 0.6
|
||||
},
|
||||
"selection_filter": {
|
||||
"dimensions": false,
|
||||
"dimensions": true,
|
||||
"footprints": true,
|
||||
"graphics": false,
|
||||
"keepouts": false,
|
||||
"graphics": true,
|
||||
"keepouts": true,
|
||||
"lockedItems": false,
|
||||
"otherItems": false,
|
||||
"pads": false,
|
||||
"text": false,
|
||||
"otherItems": true,
|
||||
"pads": true,
|
||||
"text": true,
|
||||
"tracks": true,
|
||||
"vias": true,
|
||||
"zones": false
|
||||
"zones": true
|
||||
},
|
||||
"visible_items": [
|
||||
"vias",
|
||||
@ -177,7 +275,7 @@
|
||||
"conflict_shadows",
|
||||
"shapes"
|
||||
],
|
||||
"visible_layers": "00000000_00000000_00000002_2200888c",
|
||||
"visible_layers": "00000000_00000000_00000002_2200888d",
|
||||
"zone_display_mode": 0
|
||||
},
|
||||
"git": {
|
||||
|
@ -643,7 +643,7 @@
|
||||
"page_layout_descr_file": ""
|
||||
},
|
||||
"schematic": {
|
||||
"annotate_start_num": 0,
|
||||
"annotate_start_num": 1000,
|
||||
"bom_export_filename": "TS-PCIE.csv",
|
||||
"bom_fmt_presets": [],
|
||||
"bom_fmt_settings": {
|
||||
|
@ -7,7 +7,7 @@ with open(output_filename, "w") as output_file:
|
||||
with open(input_filename) as input_file:
|
||||
for line in input_file:
|
||||
match line:
|
||||
case x if x.startswith(' (property "Footprint"'):
|
||||
case x if x.startswith(' (property "Reference"'):
|
||||
footprint_old = line.split('"')[3]
|
||||
if footprint_old != "":
|
||||
footprint_new = "Thunderscope_Rev5:" + footprint_old
|
||||
|
@ -2,39 +2,29 @@
|
||||
input_filename = "FE_Channel.kicad_sch"
|
||||
output_filename = "FE_Channel_Copy.kicad_sch"
|
||||
|
||||
instance_spacing = 3
|
||||
per_channel_spacing = 4
|
||||
num_channels = 4
|
||||
designator_suffix_order = ["B","A","C","D"]
|
||||
|
||||
instance_counter = 0
|
||||
per_channel_counter = 0
|
||||
num_channel_counter = 0
|
||||
designator_suffix_order = ["2","1","3","4"]
|
||||
designator = ""
|
||||
is_valid = False
|
||||
num_channels = 4
|
||||
channel_count = 0
|
||||
|
||||
# Open the file and read its content.
|
||||
with open(output_filename, "w") as output_file:
|
||||
with open(input_filename) as input_file:
|
||||
for line in input_file:
|
||||
if "(instances" in line:
|
||||
instance_counter = instance_spacing
|
||||
elif instance_counter > 1:
|
||||
instance_counter -= 1
|
||||
elif instance_counter == 1:
|
||||
instance_counter -= 1
|
||||
if "#PWR?" not in line:
|
||||
designator = line.split('"')[1]
|
||||
num_channel_counter = num_channels
|
||||
line = (line.split('"')[0] + '"' + designator + designator_suffix_order[4-num_channel_counter] + '"' + line.split('"')[2])
|
||||
per_channel_counter = per_channel_spacing
|
||||
print (line)
|
||||
elif per_channel_counter > 1:
|
||||
per_channel_counter -= 1
|
||||
elif per_channel_counter == 1:
|
||||
per_channel_counter -= 1
|
||||
if (num_channel_counter > 1):
|
||||
num_channel_counter -= 1
|
||||
per_channel_counter = per_channel_spacing
|
||||
line = (line.split('"')[0] + '"' + designator + designator_suffix_order[4-num_channel_counter] + '"' + line.split('"')[2])
|
||||
print (line)
|
||||
match line:
|
||||
case x if x.startswith(' (property "Reference"'):
|
||||
reference_old = line.split('"')[3]
|
||||
print(reference_old)
|
||||
if "#PWR" not in reference_old:
|
||||
reference_new = reference_old[:-2] + "_1"
|
||||
print (reference_new)
|
||||
line = line.split(reference_old)[0] + reference_new + line.split(reference_old)[1]
|
||||
channel_count = num_channels
|
||||
case x if x.startswith(' (reference'):
|
||||
if channel_count > 0:
|
||||
reference_old = line.split('"')[1]
|
||||
line = line.split(reference_old)[0] + reference_new[:-1] + designator_suffix_order[4-channel_count] + line.split(reference_old)[1]
|
||||
channel_count -= 1
|
||||
print (line)
|
||||
output_file.write(line)
|
Loading…
Reference in New Issue
Block a user