Hi, <@U017X0NM2E7> Iam trying lvs for such a dac c...
# magic
a
Hi, @Mitch Bailey Iam trying lvs for such a dac circuit however, the library spice for
sky130_fd_sc_hvl__lsbuflv2hv_1
Is incorrect. I have an inquiry how to fixed please? it is a technology file! Thanks
m
This https://github.com/google/skywater-pdk/issues/349 @Tim Edwards I thought this was patched, but maybe I’m thinking of a similar circuit. @Ahmed Reda it’s a pdk issue. You can make a temporary fix by copying
sky130_fd_sc_hvl.spice
from the pdk and in the
sky130_fd_sc_hvl__lsbuflv2hv_1
subckt, replacing
a_686_151#
with
VGND
and
a_1606_563#
with
VPWR
. You’ll need to modify the lvs setup to use your modified file.
t
@Mitch Bailey: Quick edit to your response above: Replace
a_686_151#
with
VGND
, not "VSS".
👍 1
@Mitch Bailey: Long answer: The invalid SPICE got into the google repository by being generated with an older version of magic, long since fixed in magic, but the error still persists in the generated cells in the PDK source. It probably makes the most sense to write a quick patch script for it. In theory, the original set was also generated from magic, so it might work just to tell open_pdks to generate the SPICE from scratch rather than copying it from the source. But that part of the Makefile is a bit complicated, so it might be simpler to write the patch script and do a simple regsub replacement. Need to figure out how many cells are incorrect in that library. It's not very many, as it can only occur in the double-height cells, of which there are only a handful.
@Ahmed Reda: The DAC in question (which I designed) has a fixed copy of the netlist for
sky130_fd_sc_hvl__lsbuflv2hv_1
among the design files.
@Mitch Bailey: And yes, you were thinking of another cell, which is the
hv2lv
cell, not the
lv2hv
. I do have a patch for the other one. But there are something like half a dozen different varieties of the level shifter cells, and I expect all of them are wrong.
@Mitch Bailey: I uncovered another problem when trying to create the corrected netlist. The nets that are connected only by label mess up the port order, so the port order no longer follows the indexes in the .mag or the .ext file. . .
👍 1
@Mitch Bailey, @Ahmed Reda: open_pdks version 1.0.378 will have the corrected netlist of this cell. But there are probably other cells in that library that remain incorrect.
a
Thanks @Mitch Bailey @Tim Edwards .I would like to inform that 1-
sky130_fd_sc_hvl.spice
is updated according to
sky130_fd_sc_hvl__lsbuflv2hv_1
.
sky130_fd_sc_hvl__lsbuflv2hv_1
issue is fixed. 2- I run LVS and found net mismatch as shown. Should I change something to pass it, please.
m
You might have an older version of the schematic that had too many dummy cells. @Tim Edwards I think I pushed a change to the closed source version. Do you know if it made it to the open source version?
t
I have never been entirely sure which version is where.
There is also a version where the low bit is flipped, leading to non-monotonic output from simulation, that kept popping up long after I thought I had fixed it.
m
@Ahmed Reda Where’s your repo? I’ll try to create a PR for the changes.
a
@Mitch Bailey here you are. The recent version is here after fixing flipping the low bit. https://github.com/efabless/analog-mixed-signal-blocks/tree/main/blizzard_adc_corrected/dac_3v_8bit
m
Looks like that might be a closed repo. Let me see if I can access it with a password.
a
m
@Ahmed Reda Are you sure that’s the right spice file? I couldn’t find the
dac_3v_8bit
subckt.
a
Do you mean this, right!
👍 1
m
Maybe try this (I think this is what I used to pass LVS)
a
@Mitch Bailey @Tim Edwards.Thanks you for your guidance and help. Device classes dac_3v_8bit and dac_3v_8bit are equivalent. However, I am wondering about if there is a command to avoid extracting unreal ports to match. Or should i remove it manually
t
@Ahmed Reda: It's possible that's caused by the version of magic. I think with the most recent versions of magic and the tech file from open_pdks, it should not have issues with the extra pins (they won't be seen as pins). At least when I look at the GDS you posted, I don't see the bit lines showing as ports in the layout.
1
a
@Mitch Bailey can you please check contents of
gds.analog.spice.tcl
is it OK to pass lvs? # magic commands to extract netlist, # well connectivity is detemined by tech file specified in magicrc. # output directory set by environment variable RUN_DIR puts "Extracting with top ports connected by name (analog)" foreach cell $::env(FLATGLOB_CELLS) { gds flatglob $cell } # list cells to be flattened puts "Flattening [gds flatglob]" gds flatten yes gds flatglob bgpg__pnp gds flatglob dac_3v_cell gds flatglob dac_3v_cell_top gds flatglob dac_3v_cell_odd gds flatglob dac_3v_cell_dummy gds flatglob level_shifter_array gds flatglob dac_3v_column_dummy gds read $::env(CURRENT_GDS) foreach cell $::env(ABSTRACT_CELLS) { load $cell -dereference property LEFview true property "-dac_3v_8bit $dev" delete mult perim pj } load $::env(TOP) -dereference select top cell cd $::env(RUN_DIR) extract no all extract do local extract unique extract ext2spice lvs ext2spice short resistor ext2spice -o $::env(TOP).gds.spice $::env(TOP).ext feedback save $::env(TOP)-ext2gds.spice.feedback.txt
t
It should not be necessary to do any flattening on GDS read. This layout was created by magic and should read back into magic without issues. The line
property "-dac_3v_8bit $dev" delete mult perim pj
looks like some mangled combination of magic and netgen commands. It is not a valid statement for either one. Why use so many environment variables? Why use environment variables at all?
m
@Tim Edwards This looks like a modified version of the script that I use in a shell script to extract gds. Some of the hierarchy has no pin/text (IIRC), so using
flatglob
made more readable extracted spice.