Vern
05/07/2021, 2:01 AM# set light_colors {
# "#ffffff" "#0044ee" "#aaaaaa" "#222222" "#229900"
# "#bb2200" "#00ccee" "#ff0000" "#888800" "#00aaaa"
# "#880088" "#00ff00" "#0000cc" "#666600" "#557755"
# "#aa2222" "#7ccc40" "#00ffcc" "#ce0097" "#d2d46b"
# "#ef6158" "#fdb200" }
# set dark_colors {
# "#000000" "#00ccee" "#3f3f3f" "#cccccc" "#88dd00"
# "#bb2200" "#00ccee" "#ff0000" "#ffff00" "#ffffff"
# "#ff00ff" "#00ff00" "#0000cc" "#aaaa00" "#aaccaa"
# "#ff7777" "#bfff81" "#00ffcc" "#ce0097" "#d2d46b"
# "#ef6158" "#fdb200" }
The grid color is the third number. Oh, and you won't want the leading hash mark -- I just copied this straight out of the system xschemrc.
To test things out before you commit it to your xschemrc, though, you can select the grid layer from the "Layers" menu, then go through "View" > "Change Current Layer color". Colors are selected with your run-of-the-mill hex RGB values.Tom
05/07/2021, 6:24 AMTim Edwards
05/08/2021, 12:53 AMsky130_fd_pr
device sky130_fd_pr__pnp_05v5_W3p40L3p40
has always had a problem that the layout pin names don't match the SPICE model pin names (the W0p68L0p68
device is worse, because the layout doesn't have any pins at all. . .). Also, the PNP devices cannot have a 4th substrate terminal because the collector is already equal to the substrate. I have a patch file now in open_pdks that changes the SPICE netlist pin names to "Base", "Collector", and "Emitter", and removes the 4th terminal. Can you please change the PNP device model in xschem to match?Mohd Khairi Zulkalnain
05/08/2021, 10:22 AMyrrapt
05/08/2021, 11:37 AM.save all @M.x1.XMcas_p.msky130_fd_pr__pfet_01v8[vdsat]
For each parameter and each device.
That will save the op values to the results file. The next step would be adding the annotations either to the symbol or next to the symbol.
It slows me down a lot so I've got a TODO item to write a TCL script to pull out each of the devices and automatically place the op save commands in the netlist.
I will post here once I get something working for others to use/improve although this will likely be sometime in JulyMohd Khairi Zulkalnain
05/08/2021, 1:36 PMVern
05/08/2021, 11:17 PM.control
block.
.control
unset noglob
save @M.*[*]
set noglob
.endc
Now, I build my testbenches with my circuit under test in a lower level of hierarchy, so I actually use save @M.XDUT.**[**]
, but it should work either way.
That noglob
parameter is set by default so you can do multiplication with the asterisk character. When you unset noglob
, you can use asterisk for wildcards, along with question marks and... Something else; don't want to look it up right now. It's recommended that as soon as you're done with your wildcard characters that you promptly reset noglob
so you can multiply again.Mohd Khairi Zulkalnain
05/09/2021, 3:02 AMyrrapt
05/09/2021, 10:29 AMstefanoaz
05/11/2021, 1:07 AMstefanoaz
05/12/2021, 11:38 PMTim Edwards
05/21/2021, 1:31 AMStefan Schippers
05/21/2021, 8:05 AMOptions:
...
-b --batch Detach Xschem from console.
The purpose of that option is exactly that, use only gui. Let me know if it works fine. And yes, for most of tasks (even for me) everything is done from gui.Stefan Schippers
05/21/2021, 8:40 AM-r --no_readline Start without the tclreadline package ( this is
necessary if stdin and stdout are to be redirected
for example to /dev/null).
yrrapt
05/22/2021, 7:02 PMschematic="cell_name_${mode}"
But nothing was really working.
The use case I'm facing right now is that I have inductors in my design. For simulation I want the model to be used in the netlist, for LVS i want a short between input and output as that's what the extraction tool sees.
So I am trying to default a TCL mode
variable to sim
and then override the variable when doing the LVS netlist generation. I really want to do this with flags applied at a global level rather than having to descend the heirarchy and change the schematic=
expression for multiple cells.
Do you have any tips on how I can achieve this?Hongzhe Jiang
05/23/2021, 3:17 PMEslam Morsie
05/24/2021, 9:02 AMWeston Braun
05/24/2021, 7:16 PMWeston Braun
05/24/2021, 7:16 PMWeston Braun
05/24/2021, 9:58 PMStefan Schippers
05/24/2021, 10:00 PM@pinlist
in the symbol '`format="..."`' attribute then the order is the creation order of the symbol pins. You can change this order: select a pin you want to be netlisted first (the small red square) in a symbol, press 'Shift-S' and set it's sequence number to zero (first pin). Then select the pin you want to be netlisted in second position , set it's sequence number to 1, and so on (see picture).
A more flexible approach is to replace the @pinlist
attribute with the explicit order of pins: for example for a NAND2 gate (inputs A,B, output Z) the format string should be something like: format="@name @@A @@B @@Z @model ..."
or (for a subcircuit) format="@name @@A @@B @@Z @symname"
. This way you get rid of any ordering of pins in the symbol. The @@X
syntax means: "put the name of the net attached to the '`X`' pin'. The .subckt declaration and the instance call (X line) will consistently have the same and matching pin ordering.Yuan Mei
05/26/2021, 1:29 PMopen_pdks
, sky130A
, the (patched) spice models and the files under libs.tech/xschem
are quite out of sync. I tried to open test_nmos
for simulation using ngspice and found that the paths of a lot of the .include
files need to be updated. For instance, there's no cells
in the file path anymore. Also, the following two lines seems to be needed in the generated test_nmos.spice
netlist in order to make the simulation work: .param mc_mm_switch=0
,
.param mc_pr_switch=1
. Could you please check and update the repo? These very good example schematics are very useful for beginners to take a look at and they better work out of the box. Thanks!Stefan Schippers
05/26/2021, 9:58 PMTim Edwards
05/27/2021, 12:41 AMmkk
mkk
Stefan Schippers
05/27/2021, 9:52 PMStefan Schippers
05/27/2021, 10:00 PMstimuli.test_comparator
, copy this file from the xschem_sky130/sky130_tests/ to ~/.xschem/simulations, on my system:
cp ~/.xschem/xschem_library/xschem_sky130/sky130_tests/stimuli.test_comparator ~/.xschem/simulations/
then before launching simulation, in xschem, in the test_comparator schematic: simulation->Utile stimuli editor(GUI)
, press 'Translate', 'Dismiss'. This creates a spice pwl stimuli file, stimuli_test_comparator.cir
, needed for the ngspice simulation.Tim Edwards
05/28/2021, 12:31 AM.lib <path_to>/sky130.lib.spice mc
. . . and that should be the only thing you need to do. However, all non-MC simulations have to set .param mc_mm_switch=0
or =1
to disallow or allow mismatch simulation (the reason being that any corner simulation can run either with mismatch enabled or with mismatch disabled, but mc
is mutually exclusive with all corner simulations). The only alternative I can think of is to duplicate all the entries in sky130.lib.spice
so that there is one corner with mismatch and one corner without mismatch, such as tt
and, say, mmtt
. I might do that if people have a hard time figuring out that they need to set the mc_mm_switch
parameter.Stefan Schippers
05/29/2021, 9:05 PM