-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added draft PR of generator for strongARM comparator #338
base: main
Are you sure you want to change the base?
Conversation
Draft PR
Can you please describe your design and provide more details in general? |
I would advise against using smart route for these generators as it not as parameterizable as the "dumb" routes, and parameterization is what we're looking for here. Furthermore please look at routing widths to account for the routes through which more current would flow if the circuit was used |
|
||
#cross_coupled_load(gf180_mapped_pdk,2,0.5).show() | ||
|
||
def mystrongARM(pdk: MappedPDK, diffp_w, diffp_l, ccinv_col, clk_fing, reset_w, reset_l): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add more parameterization here, for the diffpair transistors' length, width,etc.
also add options for taprings, welltaps and such
lvs_result = sky130_mapped_pdk.lvs_netgen(diffPair,'diffPair') | ||
return diffPair | ||
|
||
diffPair(sky130_mapped_pdk,2,0.4).show() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line once the PR is ready
mystrongARM.add_ports(diffp_ref.get_ports_list(), prefix="strongARM_") | ||
mystrongARM.add_ports(cross_couple_ref.get_ports_list(), prefix="strongARM_") | ||
mystrongARM.add_ports(clk_nmos_ref.get_ports_list(), prefix="strongARM_clk_nmos_") | ||
mystrongARM.add_ports(reset_pmos_ref1.get_ports_list(), prefix="strongARM_clk_reset_pmos_r_") | ||
mystrongARM.add_ports(reset_pmos_ref2.get_ports_list(), prefix="strongARM_clk_reset_pmos_l_") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add ports after all the routing has been done, it is beneficial to include the routes' ports as well
mystrongARM.add(cross_couple_ref) | ||
|
||
|
||
clk_nmos = nmos(pdk, width=4, fingers=clk_fing, rmult=1, with_substrate_tap=False, with_dnwell=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you decide default width to be 4 micron?
@utkarsh5086 Are you still stuck here? |
I cleared the symmetry errors in LVS. I also passed LVS manually editing the netlist. I will make some changes to the LVS script and add them here. |
any updates on this @utkarsh5086? |
) | ||
return diffPair_netlist | ||
|
||
def diffPair(pdk: MappedPDK, width, length): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the existing diff pair component be used for this? Or alternatively, modify it slightly to make it more customizable to work with this?
|
||
#cross_coupled_load(gf180_mapped_pdk,2,0.5).show() | ||
|
||
def mystrongARM(pdk: MappedPDK, diffp_w, diffp_l, ccinv_col, clk_fing, reset_w, reset_l): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the strongarm latch have a netlist?
I have updated all my files using the above provided feedbacks. The generated layout is LVS clean with some DRC still to be cleaned. @chetanyagoyal , @harshkhandeparkar can you guys review it and see if it needs some more changes? I am in the process of adding more programability but that will be in addition to the committed code. |
Can you send the generated netlist and the expected netlist? |
from glayout.flow.primitives.via_gen import via_stack, via_array | ||
|
||
def x_coupled_netlist(nfetA: Component, nfetB: Component, pfetA: Component, pfetB: Component, nfetdum: Component, pfetdum: Component): | ||
x_coupled_netlist = Netlist(circuit_name ='cross_cpoupled_load', nodes=['VSN1', 'VSN2', 'VSP1', 'VSP2', 'VO1', 'VO2', 'VBULKN', 'VBULKP']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal but there is a typo in the circuit name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a copy of the existing diff pair or are there differences? If it is a copy, you can directly import and use it. If not, can the changes be incorporated into the main one as options/parameters?
strong.write_gds("./mystrongARM.gds") | ||
strong.show() | ||
|
||
#magic_drc_result = sky130_mapped_pdk.drc_magic(strong, strong.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these lines are not used, remove them instead of commenting.
mystrongARM.add(compref) | ||
return mystrongARM.flatten() | ||
|
||
strong = add_strongARM_labels(sky130_mapped_pdk,mystrongARM(sky130_mapped_pdk, 8, 0.4, 2, 4, 3, 0.4)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add these lines in a separate function or in a separate file so that this block can be imported in other generators without any side effects.
A single python file with complete strongARM layout. Four subcells in total: diff_pair, cross_coupled pair and nmos, pmos reset switches. Plan to pick diff_pair and X_coupled pair from the repo in the future. Currently having errors in LVS and trying to debug it.
I will add testbench and automation setup to complete the analog generator.