Skip to content

Commit

Permalink
Make sure data width is good (#2002)
Browse files Browse the repository at this point in the history
* Make sure SERDES data with is good

* Revert peer gearbox PEER_IS_ON setting

* Port latest FOEDAG_rs and yosys_verific_rs
  • Loading branch information
chungshien-chai authored Sep 18, 2024
1 parent 1c3777f commit 3cbde01
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 6 deletions.
2 changes: 1 addition & 1 deletion FOEDAG_rs
Submodule FOEDAG_rs updated 1 files
+1 −1 FOEDAG
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"g_boot_clock_resources = 0",
"g_pin_resources = {}",
"g_fabric_clock_resources = 0",
"g_pll_resources = []"
"g_pll_resources = []",
"g_gearbox_width = {}"
]
},
"__primary_validation__" : {
Expand Down Expand Up @@ -533,6 +534,7 @@
"__secondary_validation__" : {
"__seqeunce__" : [
"__check_fabric_clock_resource__",
"__check_data_width_parameter__",
"__check_data_rate_parameter__",
"__check_dpa_mode_parameter__",
"__check_clock_phase_parameter__",
Expand All @@ -546,6 +548,25 @@
"pin_result = (__connectivity_count__ + g_fabric_clock_resources) <= MAX_FABRIC_CLOCK_RESOURCE"
]
},
"__check_data_width_parameter__" : {
"__module__" : ["I_SERDES", "O_SERDES"],
"__parameter__" : ["WIDTH"],
"__equation__" : [
"import re",
"assert '__location__' in g_all_pins",
"m = re.search(r'H(P|R?)_(\\d?)(|_CC?)_(\\d+?)_(\\d\\d?)(P|N?)', '__location__')",
"assert m != None",
"pn = 'P' if m.group(6) == 'N' else 'N'",
"index = int(m.group(4)) & ~1",
"index += (1 if pn == 'N' else 0)",
"peer_location = 'H%s_%s%s_%d_%s%s' % (m.group(1), m.group(2), m.group(3), index, m.group(5), pn)",
"width = int('WIDTH')",
"pin_result = width >= 3 and width <= (10 if m.group(6) == 'P' else 5)",
"pin_result = pin_result and ((peer_location not in g_gearbox_width) or (g_gearbox_width[peer_location] <= 5 and width <=5))",
"g_gearbox_width['__location__' if pin_result else ''] = width",
"g_gearbox_width.pop('', None)"
]
},
"__check_data_rate_parameter__" : {
"__module__" : ["I_SERDES", "O_SERDES", "O_SERDES_CLK"],
"__parameter__" : ["DATA_RATE"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"g_boot_clock_resources = 0",
"g_pin_resources = {}",
"g_fabric_clock_resources = 0",
"g_pll_resources = []"
"g_pll_resources = []",
"g_gearbox_width = {}"
]
},
"__primary_validation__" : {
Expand Down Expand Up @@ -533,6 +534,7 @@
"__secondary_validation__" : {
"__seqeunce__" : [
"__check_fabric_clock_resource__",
"__check_data_width_parameter__",
"__check_data_rate_parameter__",
"__check_dpa_mode_parameter__",
"__check_clock_phase_parameter__",
Expand All @@ -546,6 +548,25 @@
"pin_result = (__connectivity_count__ + g_fabric_clock_resources) <= MAX_FABRIC_CLOCK_RESOURCE"
]
},
"__check_data_width_parameter__" : {
"__module__" : ["I_SERDES", "O_SERDES"],
"__parameter__" : ["WIDTH"],
"__equation__" : [
"import re",
"assert '__location__' in g_all_pins",
"m = re.search(r'H(P|R?)_(\\d?)(|_CC?)_(\\d+?)_(\\d\\d?)(P|N?)', '__location__')",
"assert m != None",
"pn = 'P' if m.group(6) == 'N' else 'N'",
"index = int(m.group(4)) & ~1",
"index += (1 if pn == 'N' else 0)",
"peer_location = 'H%s_%s%s_%d_%s%s' % (m.group(1), m.group(2), m.group(3), index, m.group(5), pn)",
"width = int('WIDTH')",
"pin_result = width >= 3 and width <= (10 if m.group(6) == 'P' else 5)",
"pin_result = pin_result and ((peer_location not in g_gearbox_width) or (g_gearbox_width[peer_location] <= 5 and width <=5))",
"g_gearbox_width['__location__' if pin_result else ''] = width",
"g_gearbox_width.pop('', None)"
]
},
"__check_data_rate_parameter__" : {
"__module__" : ["I_SERDES", "O_SERDES", "O_SERDES_CLK"],
"__parameter__" : ["DATA_RATE"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@
"g_boot_clock_resources = 0",
"g_pin_resources = {}",
"g_fabric_clock_resources = 0",
"g_pll_resources = []"
"g_pll_resources = []",
"g_gearbox_width = {}"
]
},
"__primary_validation__" : {
Expand Down Expand Up @@ -533,6 +534,7 @@
"__secondary_validation__" : {
"__seqeunce__" : [
"__check_fabric_clock_resource__",
"__check_data_width_parameter__",
"__check_data_rate_parameter__",
"__check_dpa_mode_parameter__",
"__check_clock_phase_parameter__",
Expand All @@ -546,6 +548,25 @@
"pin_result = (__connectivity_count__ + g_fabric_clock_resources) <= MAX_FABRIC_CLOCK_RESOURCE"
]
},
"__check_data_width_parameter__" : {
"__module__" : ["I_SERDES", "O_SERDES"],
"__parameter__" : ["WIDTH"],
"__equation__" : [
"import re",
"assert '__location__' in g_all_pins",
"m = re.search(r'H(P|R?)_(\\d?)(|_CC?)_(\\d+?)_(\\d\\d?)(P|N?)', '__location__')",
"assert m != None",
"pn = 'P' if m.group(6) == 'N' else 'N'",
"index = int(m.group(4)) & ~1",
"index += (1 if pn == 'N' else 0)",
"peer_location = 'H%s_%s%s_%d_%s%s' % (m.group(1), m.group(2), m.group(3), index, m.group(5), pn)",
"width = int('WIDTH')",
"pin_result = width >= 3 and width <= (10 if m.group(6) == 'P' else 5)",
"pin_result = pin_result and ((peer_location not in g_gearbox_width) or (g_gearbox_width[peer_location] <= 5 and width <=5))",
"g_gearbox_width['__location__' if pin_result else ''] = width",
"g_gearbox_width.pop('', None)"
]
},
"__check_data_rate_parameter__" : {
"__module__" : ["I_SERDES", "O_SERDES", "O_SERDES_CLK"],
"__parameter__" : ["DATA_RATE"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,8 @@
"g_boot_clock_resources = 0",
"g_pin_resources = {}",
"g_fabric_clock_resources = 0",
"g_pll_resources = []"
"g_pll_resources = []",
"g_gearbox_width = {}"
]
},
"__primary_validation__" : {
Expand Down Expand Up @@ -532,6 +533,7 @@
"__secondary_validation__" : {
"__seqeunce__" : [
"__check_fabric_clock_resource__",
"__check_data_width_parameter__",
"__check_data_rate_parameter__",
"__check_dpa_mode_parameter__",
"__check_clock_phase_parameter__",
Expand All @@ -545,6 +547,25 @@
"pin_result = (__connectivity_count__ + g_fabric_clock_resources) <= MAX_FABRIC_CLOCK_RESOURCE"
]
},
"__check_data_width_parameter__" : {
"__module__" : ["I_SERDES", "O_SERDES"],
"__parameter__" : ["WIDTH"],
"__equation__" : [
"import re",
"assert '__location__' in g_all_pins",
"m = re.search(r'H(P|R?)_(\\d?)(|_CC?)_(\\d+?)_(\\d\\d?)(P|N?)', '__location__')",
"assert m != None",
"pn = 'P' if m.group(6) == 'N' else 'N'",
"index = int(m.group(4)) & ~1",
"index += (1 if pn == 'N' else 0)",
"peer_location = 'H%s_%s%s_%d_%s%s' % (m.group(1), m.group(2), m.group(3), index, m.group(5), pn)",
"width = int('WIDTH')",
"pin_result = width >= 3 and width <= (10 if m.group(6) == 'P' else 5)",
"pin_result = pin_result and ((peer_location not in g_gearbox_width) or (g_gearbox_width[peer_location] <= 5 and width <=5))",
"g_gearbox_width['__location__' if pin_result else ''] = width",
"g_gearbox_width.pop('', None)"
]
},
"__check_data_rate_parameter__" : {
"__module__" : ["I_SERDES", "O_SERDES", "O_SERDES_CLK"],
"__parameter__" : ["DATA_RATE"],
Expand Down
2 changes: 1 addition & 1 deletion yosys_verific_rs

0 comments on commit 3cbde01

Please sign in to comment.