@@ -162,18 +162,29 @@ def get_all_insertion_loss_list(
162162 y = [i for i in receivers if el in i ]
163163 for x1 in x :
164164 for y1 in y :
165- if x1 [- 2 :] == y1 [- 2 :]:
166- if math_formula :
165+ if x1 [- 2 :] == y1 [- 2 :] and x1 != y1 :
166+ if (
167+ math_formula
168+ and f"{ math_formula } (S({ x1 } ,{ y1 } ))" not in spar
169+ and f"{ math_formula } (S({ y1 } ,{ x1 } ))" not in spar
170+ ):
167171 spar .append (f"{ math_formula } (S({ x1 } ,{ y1 } ))" )
168- else :
172+ elif not math_formula and f"S( { y1 } , { x1 } )" not in spar and f"S( { x1 } , { y1 } )" not in spar :
169173 spar .append (f"S({ x1 } ,{ y1 } )" )
170174 break
171175 else :
172- for i , j in zip (drivers , receivers ):
173- if math_formula :
174- spar .append (f"{ math_formula } (S({ i } ,{ j } ))" )
175- else :
176- spar .append (f"S({ i } ,{ j } )" )
176+ for i in drivers :
177+ for j in receivers :
178+ if i == j :
179+ continue
180+ if (
181+ math_formula
182+ and f"{ math_formula } (S({ j } ,{ i } ))" not in spar
183+ and f"{ math_formula } (S({ i } ,{ j } ))" not in spar
184+ ):
185+ spar .append (f"{ math_formula } (S({ i } ,{ j } ))" )
186+ elif not math_formula and f"S({ i } ,{ j } )" not in spar and f"S({ j } ,{ i } )" not in spar :
187+ spar .append (f"S({ i } ,{ j } )" )
177188 return spar
178189
179190 @pyaedt_function_handler (trlist = "drivers" , tx_prefix = "drivers_prefix_name" , net_list = "nets" )
0 commit comments