Skip to content

Commit

Permalink
Preparing pictures for presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
amisapta15 committed Dec 12, 2024
1 parent 49c0b67 commit 1dcb1d8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


.subckt CurrentMirror VREF VCOPY VDD
XA VREF VREF VDD VDD sky130_fd_pr__pfet_01v8 l=1 w=3 m=2 nf=1
XB VCOPY VREF VDD VDD sky130_fd_pr__pfet_01v8 l=1 w=3 m=2 nf=1
XDUMMY VDD VDD VDD VDD sky130_fd_pr__pfet_01v8 l=1 w=3 m=2
.subckt CurrentMirror VREF VCOPY VSS
XA VREF VREF VSS VSS sky130_fd_pr__nfet_01v8 l=0.5 w=3 m=2 nf=1
XB VCOPY VREF VSS VSS sky130_fd_pr__nfet_01v8 l=0.5 w=3 m=2 nf=1
XDUMMY VSS VSS VSS VSS sky130_fd_pr__nfet_01v8 l=0.5 w=3 m=2
.ends CurrentMirror
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,18 @@ def CurrentMirror(

source_short = CurrentMirror << c_route(pdk,CurrentMirror.ports["currm_A_source_E"],CurrentMirror.ports["currm_B_source_E"],fullbottom=True)


# Connecting dummies to the welltie
try:
CurrentMirror << straight_route(pdk, CurrentMirror.ports["A_0_dummy_L_gsdcon_top_met_W"],CurrentMirror.ports["welltie_W_top_met_W"],glayer2="met1")
except KeyError:
pass
try:
end_col = num_cols - 1
port1 = f'B_{end_col}_dummy_R_gdscon_top_met_E'
CurrentMirror << straight_route(pdk, CurrentMirror.ports[port1], CurrentMirror.ports["welltie_E_top_met_E"], glayer2="met1")
except KeyError:
pass
if with_dummy:
# Connecting dummies to the welltie
try:
CurrentMirror << straight_route(pdk, CurrentMirror.ports["A_0_dummy_L_gsdcon_top_met_W"],CurrentMirror.ports["welltie_W_top_met_W"],glayer2="met1")
except KeyError:
pass
try:
end_col = num_cols - 1
port1 = f'B_{end_col}_dummy_R_gdscon_top_met_E'
CurrentMirror << straight_route(pdk, CurrentMirror.ports[port1], CurrentMirror.ports["welltie_E_top_met_E"], glayer2="met1")
except KeyError:
pass


# add well (probably unnecessary)
Expand All @@ -202,7 +202,7 @@ def CurrentMirror(
else:
raise ValueError("type must be either nfet or pfet")


#Connecting the source of the fets to the bulk ???
src2bulk=CurrentMirror << straight_route(pdk, source_short.ports["con_N"],CurrentMirror.ports["currm_welltie_N_top_met_W"], glayer2="met2")

Expand Down Expand Up @@ -316,10 +316,12 @@ def sky130_add_current_mirror_labels(

# Main function to generate the current mirror layout
# mappedpdk, Width, Length, num_cols, fingers, transistor type
comp = CurrentMirror(sky130,3,1,2,1, type='nfet', with_substrate_tap=False, with_tie=True)
comp = CurrentMirror(sky130,3,0.5,2,1, type='nfet')
# Add labels to the current mirror layout
comp = sky130_add_current_mirror_labels(comp, transistor_type='nfet', pdk=sky130)



# Write the current mirror layout to a GDS file
comp.name = "CM"
delete_files_in_directory("GDS/")
Expand Down

0 comments on commit 1dcb1d8

Please sign in to comment.