Chipathon2024 Mahowald-ers Cascode Common Source Block - #339
Conversation
…ove the M2 north of M1.
…horizontal or vertical placement.
|
@chetanyagoyal / @srpathen ,
`Circuit 1 contains 6 devices, Circuit 2 contains 2 devices. *** MISMATCH *** Final result: Logging to file "/tmp/tmp4n_a1thr/cascode_common_source_lvs_lvs.rpt" disabled Circuit 1 cell sky130_fd_pr__nfet_01v8 and Circuit 2 cell sky130_fd_pr__nfet_01v8 are black boxes. Subcircuit pins:
Cell pin lists are equivalent. Class cascode_common_source_lvs (0): Merged 8 parallel devices.
NET mismatches: Class fragments follow (with fanout counts): Net: w_n780_n522# |Net: IOUT
|
| Circuit 1: cascode_common_source_lvs | Circuit 2: cascode_common_source_lvs |
|---|---|
| (no matching pin) | VIN |
| (no matching pin) | VBIAS |
| (no matching pin) | VSS |
| (no matching pin) | IOUT |
| proxyIOUT | (no matching pin) |
Cell pin lists for cascode_common_source_lvs and cascode_common_source_lvs altered to match.
Device classes cascode_common_source_lvs and cascode_common_source_lvs are equivalent.
Final result: Top level cell failed pin matching.
`
|
@chetanyagoyal could you kindly clarify the netlist function used for the LVS check as the lvs fail implies that the Netlist is not getting extracted with the correct pins. ` return Netlist( ` Also the extract scipt gave the following error whenused with the gds ` Magic 8.3 revision 464 - Compiled on Sat Mar 9 23:18:29 UTC 2024. |
Apologies for the late replies, you can just dump the netlist from the python function to a file ( Try modifying the function until the dumped netlist matches your expectations |
chetanyagoyal
left a comment
There was a problem hiding this comment.
Please address the comments and look through the code in the repo to debug, let us know if youre stuck after this
|
LVS checks are in progress. Have added the ports to the layout . LVS checks are still failing. Subcircuit pins:
Cell pin lists are equivalent. Subcircuit summary:
NET mismatches: Class fragments follow (with fanout counts): Net: IOUT |Net: IOUT
|
| Circuit 1: cascode_common_source_lvs | Circuit 2: cascode_common_source_lvs |
|---|---|
| (no pins) | VBIAS Mismatch |
| (no matching pin) | VIN |
| (no matching pin) | VSS |
| (no matching pin) | IOUT |
| (no matching pin) | INT |
Cell pin lists for cascode_common_source_lvs and cascode_common_source_lvs altered to match.
Device classes cascode_common_source_lvs and cascode_common_source_lvs are equivalent.
Final result: Top level cell failed pin matching.`
Unable to store the LVS, DRC results in DRC, LVS directory as I see error below
magic_drc_result = sky130.drc_magic(Cascode_cs_component, Cascode_cs_component.name, output_file_path="DRC/") File "/usr/bin/miniconda3/lib/python3.10/site-packages/pydantic/deprecated/decorator.py", line 55, in wrapper_function return vd.call(*args, **kwargs) File "/usr/bin/miniconda3/lib/python3.10/site-packages/pydantic/deprecated/decorator.py", line 149, in call m = self.init_model_instance(*args, **kwargs) File "/usr/bin/miniconda3/lib/python3.10/site-packages/pydantic/deprecated/decorator.py", line 146, in init_model_instance return self.model(**values) File "/usr/bin/miniconda3/lib/python3.10/site-packages/pydantic/main.py", line 209, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) File "/usr/bin/miniconda3/lib/python3.10/site-packages/pydantic/deprecated/decorator.py", line 255, in check_kwargs raise TypeError(f'unexpected keyword argument{plural}: {keys}') TypeError: unexpected keyword argument: 'output_file_path'
…LVS but netlist fails to match. Debug required.
|
The LVS passes when all the bulks are tied to VSS for NMOS, but I cannot short the M2 bulk to M2 source. The LVS fails when each bulk is connected to it's source ports. Please feedback on how to short the bulk to the source. `Logging to file "/tmp/tmp79w4dkic/cascode_common_source_lvs_lvs.rpt" disabled Circuit 1 cell sky130_fd_pr__nfet_01v8 and Circuit 2 cell sky130_fd_pr__nfet_01v8 are black boxes. Subcircuit pins:
Cell pin lists are equivalent. Subcircuit summary:
Netlists match uniquely. Subcircuit pins:
Cell pin lists are equivalent. Final result: Circuits match uniquely. |
|
|
||
| instance_format = "X{name} {nodes} {circuit_name} l={length} w={width} m={mult}" | ||
|
|
||
| return Netlist( |
There was a problem hiding this comment.
You do not need to construct the whole netlist. You can use the sub-devices (the NMOS) and use python to construct the netlist.
There was a problem hiding this comment.
Thanks, sure have tried to use this.
def cascode_common_source_netlist( ) -> Netlist: fet_type = 'nfet' if 'n' in n_or_p_fet else 'pfet' csrc_netlist=Netlist(circuit_name='CASCODECOMMONSRC', nodes=['VIN', 'VBIAS', 'VSS', 'IOUT', "INT"]) csrc_netlist.connect_node(fet_netlist(pdk=pdk, circuit_name= "M1", model= pdk.models[fet_type], width= 3, length= None, fingers= 1, multipliers= m1_fingers, with_dummy= False), node_mapping= [("D","INT"), ("G","VIN"), ("S", "VSS"), ("B","VSS")] ) csrc_netlist.connect_node(fet_netlist(pdk=pdk, circuit_name= "M2", model= pdk.models[fet_type], width= 3, length= None, fingers= 1, multipliers= m2_fingers, with_dummy= False), node_mapping= [("D","IOUT"), ("G","VBIAS"), ("S", "INT"), ("B","INT")] ) return csrc_netlist
I see an error as below:
File "/usr/bin/miniconda3/lib/python3.10/site-packages/glayout/flow/spice/netlist.py", line 153, in connect_node net_index = net if type(net) == int else self.sub_netlists.index(net) ValueError: <glayout.flow.spice.netlist.Netlist object at 0x7f38bb7e28c0> is not in list .
While using the connect_node() for the 'nfet'/'pfet' primitive, what should be the circuit_name argument to be able to use the function ?
There was a problem hiding this comment.
@harshkhandeparkar : I've now updated the netlist construct using this.
| with_dummy=False, #with_dummy, | ||
| with_substrate_tap=False, | ||
| **kwargs) | ||
| print("FETS are instantiated now") |
There was a problem hiding this comment.
Is this required? It might clutter the logs. Perhaps it can be changed to give out slightly more specific information.
| if device in ['nmos', 'nfet']: | ||
| print(f"NMOS device") | ||
| # add a pwell | ||
| top_level.add_padding(layers = (pdk.get_glayer("pwell"),), default = pdk.get_grule("pwell", "active_tap")["min_enclosure"], ) |
There was a problem hiding this comment.
Both of these statements only change the value nwell or pwell, code duplication can be reduced.
|
|
||
|
|
||
| generated_netlist_for_lvs = top_level.info['netlist'].generate_netlist() | ||
| print(f"Type of generated netlist is :", generated_netlist_for_lvs) |
There was a problem hiding this comment.
It would be good if this is done outside the function. This function returns a component, the extra code may cause unintended side effects.
| print(f"Verify the file availability and type: ", generated_netlist_for_lvs, type(generated_netlist_for_lvs)) | ||
| return top_level | ||
|
|
||
| # Function to add labels to the port definitions |
There was a problem hiding this comment.
This can be moved into a docstring.
There was a problem hiding this comment.
@harshkhandeparkar : Could you kindly provide a reference to the docstring function that could be used ?
|
|
||
| return CMS.flatten() | ||
|
|
||
| mapped_pdk_build = sky130 |
There was a problem hiding this comment.
This code should also be in a separate file.
| top_level = Component("cascode common source amplifier") | ||
| # Create the transistors | ||
| print(f"Creating ", device, " devices with these parameters: ",m1_fingers,m1_multipliers, m2_fingers, m2_multipliers) | ||
| if device in ['nmos', 'nfet']: |
There was a problem hiding this comment.
Code duplication can be reduced in the FET instantiation as only the type of fet changes with the rest of the code being same.
|
Thanks harshkhandeparkar for the feedbacks. Will work on them and address the comments. Thanks. |
|
@Sud-ana Any updates? |






PR for a cascode common source . LVS is failing with
Final result: Top level cell failed pin matching. Please review and let us know the function parameters for LVS.