Skip to content

Commit

Permalink
use correct cu thickness
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffen-W committed Oct 11, 2023
1 parent de39a26 commit 0be4b62
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 9 additions & 5 deletions plugins/Get_Parasitic.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ def RunSimulation(resistors, conn1, conn2):
# return round_n(R, 6)


# in https://www.youtube.com/watch?v=hNHTwpegFBw
# rho_cu = 1/47e6 # Ohm * m # 26% more than 1.68e-8

rho_cu = 1.68e-8 # Ohm * m
cu_thickness = 0.035 # mm


def calcResWIRE(Length, Width, freq=0):
def calcResWIRE(Length, Width, cu_thickness=0.035, freq=0):
# https://learnemc.com/EXT/calculators/Resistance_Calculator/rect.html

if freq == 0:
Expand All @@ -68,7 +70,7 @@ def calcResWIRE(Length, Width, freq=0):
return Length * rho_cu / (cu_thickness * Width) * 1000.0


def calcResVIA(Drill, Length):
def calcResVIA(Drill, Length, cu_thickness=0.035):
radius = Drill / 2
area = np.pi * ((radius + cu_thickness) ** 2 - radius**2)
return Length * rho_cu / area * 1000
Expand Down Expand Up @@ -100,10 +102,11 @@ def Get_Parasitic(data, CuStack, conn1, conn2, netcode):
for i in range(1, len(d["Layer"])):
Layer1 = d["Layer"][i - 1]
Layer2 = d["Layer"][i]
thickness = CuStack[0]["thickness"] # from Layer Top
distance = CuStack[Layer2]["abs_height"] - CuStack[Layer1]["abs_height"]
if "Drill" not in d:
continue
resistor = calcResVIA(d["Drill"], distance)
resistor = calcResVIA(d["Drill"], distance, cu_thickness=thickness)
resistors.append(
[d["netStart"][Layer1], d["netStart"][Layer2], resistor, distance]
)
Expand All @@ -124,7 +127,8 @@ def Get_Parasitic(data, CuStack, conn1, conn2, netcode):
if d["type"] == "WIRE":
netStart = d["netStart"][Layer]
netEnd = d["netEnd"][Layer]
resistor = calcResWIRE(d["Length"], d["Width"])
thickness = CuStack[Layer]["thickness"]
resistor = calcResWIRE(d["Length"], d["Width"], cu_thickness=thickness)
resistors.append([netStart, netEnd, resistor, d["Length"]])

coordinates[d["netStart"][Layer]] = (
Expand Down
6 changes: 4 additions & 2 deletions plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ def Run(self):
message += "\nRough area estimation of the signal"
message += " (without zones and vias):"
for layer in Area.keys():
message += "\nLayer {}: {:.3f} mm²".format(
CuStack[layer]["name"], Area[layer]
message += "\nLayer {}: {:.3f} mm², {} μm copper".format(
CuStack[layer]["name"],
Area[layer],
CuStack[layer]["thickness"] * 1000,
)

dlg = wx.MessageDialog(
Expand Down

0 comments on commit 0be4b62

Please sign in to comment.