Tim Edwards
09/21/2023, 8:13 PMStefan Schippers
09/23/2023, 11:55 PMxschem raw_read [file] [sim]
file
is the (binary) raw file
sim
is the analysis to load (ac | tran | dc | ..)
if sim
is unspecified then load the first dataset found.
If multiple datasets of the same analysis follow xschem will load them all as multiple runs.
A simple procedure can be created to generate a graph in an empty schematic:
# procedure to create a graph in an empty xschem window and display waveforms
proc create_graph {rawfile node {analysis tran} {color {4 5 6 7 8 9 10 11 12 13 14}}} {
# clear window if not already empty
xschem clear force
# clear loaded raw file if any
xschem raw_clear
# set current layer to graph layer (grey, layer 2)
xschem set rectcolor 2
# create a 300x400 rectangle
xschem rect 0 -300 400 0
# make it a graph
xschem setprop rect 2 0 flags graph
# read a simulation raw file
xschem raw_read $rawfile $analysis
# add nodes to display
xschem setprop rect 2 0 node $node
# set node colors
xschem setprop rect 2 0 color $color
# make xschem display full the graph rectangle
xschem zoom_full
# full zoom graph data on x axis
xschem setprop rect 2 0 fullxzoom
# full zoom graph data on y axis
xschem setprop rect 2 0 fullyzoom
# clear modified flag so we can quit without xschem asking to save changed file.
xschem set_modify 0
}
Calling it in following way:
create_graph .xschem/simulations/solar_panel.raw {led panel}
does the job.
A title can be created by placing a text object.
I need to add some helper commands make it easy to do from scripts. (yes , it's a bit embarassing it's not already there!). It is easy then to export as a png image or pdf page from CLI commands.Tim Edwards
09/24/2023, 1:07 AMStefan Schippers
09/24/2023, 1:38 AMxschem print pdf_full plot.pdf
or the png:
xschem print png plot.png
and works fine.
thanks to your comment also added the new xschem create_text
command for placing titles / text objects in generalMatthew Siyu Chen
04/19/2024, 12:19 AMBoris Murmann
04/19/2024, 6:15 AMChristoph Maier
04/19/2024, 10:06 AM==> WARNING: A newer version of conda exists. <==
current version: 23.11.0
latest version: 24.3.0
Please update conda by running
$ conda update -n base -c conda-forge conda
indicate to me that someone suggests to solve a problem that involves some O(10⁶ bits) of information with libraries and dependencies that suck O(10⁹ bits) of information onto your local storage, with all the hidden state and side effects in these dependencies.
Even though a friendly colleague gave me the helpful advice:
"Don't look at the restaurant's kitchen, , or into an EDA software company's internal code. No design flow is perfect. The database is dark and full of terrors."
I strongly warn against software engineer's attitute
„there's an app for that“, because with a software engineering mindset, you are encouraged, even coerced,
to ignore that
nearly everything that matters is a side effect
and, to paraphrase Steve Bannon,
flood your code base with unforeseen bugs and side effects.
Case in point:
You might find a really cozy tenured spot in a place others go for expensive, CO₂-producing vacations,
only to find that there.Stefan Schippers
04/19/2024, 2:12 PMxschem -x -q --command '
source scripts/get_raw_data.tcl
write_data \
[get_raw_data $netlist_dir/tb_bandgap_opamp.raw tran {time out diffout_n} 11] \
data.csv
'
this writes nodes time
(the X axis), out
and diffout_n
into a data.csv
file, extracting info from a `tran`sient simulation in tb_bandgap_opamp.raw
.
get_raw_data
does the data extraction job, while write_data
(a xschem available procedure) writes the result into the specified file.
The data.csv looks like:
time,out,diffout_n
1e-11,0.1182831,0.4711588
1.036514e-11,0.11327989,0.46848608
1.109542e-11,0.10285642,0.46093548
1.2555979e-11,0.083816773,0.44480401
...
...
and can be processed for example with a spreadsheet (not the best option, expecially if you have 1million points, but just to show the process), see image.
The good point is that data extraction is extremely fast. the raw file in the example above is 620MBytes (spice binary format) and the whole process to generate data.csv
takes 1.4 seconds on a laptop All cpu intensive functions in xschem are done in C, while TCL does only the command dispatching.Christoph Maier
04/19/2024, 4:13 PMMatthew Siyu Chen
04/19/2024, 5:32 PM11
signify in the second-to-last line? I am trying a variety of net numbers, net labels, and equations to see if there would be any output in the csv file. I am able to plot all of these in gaw, but the script or commands don't seem to be working. Do you see an issue here? ThanksChristoph Maier
04/19/2024, 6:02 PMStefan Schippers
04/19/2024, 9:11 PMStefan Schippers
04/19/2024, 9:15 PMget_raw_data.tcl
script today so it will propagate downstream if you update / reinstall the open_pdks.
Just copy the file to .../share/pdk/sky130A/libs.tech/xschem/scripts/Christoph Maier
04/20/2024, 8:46 AM~/EDA/OpenLane$ cat pdks/open_pdks/.git/config
[remote "origin"]
url = <https://github.com/rtimothyedwards/open_pdks>
fetch = +refs/heads/*:refs/remotes/origin/*
There's a (probably not related) git repository two steps up in the directory hierarchy:
~/EDA/OpenLane$ cat .git/config
[remote "origin"]
url = <https://github.com/The-OpenROAD-Project/OpenLane.git>
fetch = +refs/heads/*:refs/remotes/origin/*
~/EDA/OpenLane$ cat .gitmodules
[submodule "designs/ci"]
path = designs/ci
url = <https://github.com/efabless/openlane-ci-designs>
and what seems to be a parallel installation
~/EDA/OpenLane$ cat pdks/skywater-pdk/.git/config
[remote "origin"]
url = <https://github.com/google/skywater-pdk>
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
remote = origin
merge = refs/heads/main
[submodule "libraries/sky130_fd_io/latest"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_io.git>
[submodule "libraries/sky130_fd_io/v0.0.1"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_io.git>
[submodule "libraries/sky130_fd_io/v0.0.2"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_io.git>
[submodule "libraries/sky130_fd_io/v0.1.0"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_io.git>
[submodule "libraries/sky130_fd_io/v0.2.0"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_io.git>
[submodule "libraries/sky130_fd_io/v0.2.1"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_io.git>
[submodule "libraries/sky130_fd_pr/latest"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_pr.git>
[submodule "libraries/sky130_fd_pr/v0.0.9"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_pr.git>
[submodule "libraries/sky130_fd_pr/v0.10.0"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_pr.git>
[submodule "libraries/sky130_fd_pr/v0.10.1"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_pr.git>
[submodule "libraries/sky130_fd_pr/v0.11.0"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_pr.git>
[submodule "libraries/sky130_fd_pr/v0.12.0"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_pr.git>
[submodule "libraries/sky130_fd_pr/v0.12.1"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_pr.git>
[submodule "libraries/sky130_fd_pr/v0.13.0"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_pr.git>
[submodule "libraries/sky130_fd_pr/v0.20.0"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_pr.git>
[submodule "libraries/sky130_fd_pr/v0.20.1"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_pr.git>
[submodule "libraries/sky130_fd_sc_hd/latest"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hd.git>
[submodule "libraries/sky130_fd_sc_hd/v0.0.1"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hd.git>
[submodule "libraries/sky130_fd_sc_hd/v0.0.2"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hd.git>
[submodule "libraries/sky130_fd_sc_hdll/latest"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hdll.git>
[submodule "libraries/sky130_fd_sc_hdll/v0.1.0"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hdll.git>
[submodule "libraries/sky130_fd_sc_hdll/v0.1.1"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hdll.git>
[submodule "libraries/sky130_fd_sc_hs/latest"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hs.git>
[submodule "libraries/sky130_fd_sc_hs/v0.0.1"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hs.git>
[submodule "libraries/sky130_fd_sc_hs/v0.0.2"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hs.git>
[submodule "libraries/sky130_fd_sc_hvl/latest"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hvl.git>
[submodule "libraries/sky130_fd_sc_hvl/v0.0.1"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hvl.git>
[submodule "libraries/sky130_fd_sc_hvl/v0.0.2"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hvl.git>
[submodule "libraries/sky130_fd_sc_hvl/v0.0.3"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_hvl.git>
[submodule "libraries/sky130_fd_sc_lp/latest"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_lp.git>
[submodule "libraries/sky130_fd_sc_lp/v0.0.1"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_lp.git>
[submodule "libraries/sky130_fd_sc_lp/v0.0.2"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_lp.git>
[submodule "libraries/sky130_fd_sc_ls/latest"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_ls.git>
[submodule "libraries/sky130_fd_sc_ls/v0.1.0"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_ls.git>
[submodule "libraries/sky130_fd_sc_ls/v0.1.1"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_ls.git>
[submodule "libraries/sky130_fd_sc_ms/latest"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_ms.git>
[submodule "libraries/sky130_fd_sc_ms/v0.0.1"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_ms.git>
[submodule "libraries/sky130_fd_sc_ms/v0.0.2"]
active = true
url = <https://github.com/google/skywater-pdk-libs-sky130_fd_sc_ms.git>
[submodule "third_party/make-env"]
active = true
url = <https://github.com/SymbiFlow/make-env.git>
Now I do find something that looks like your repository
~/EDA/OpenLane$ cat pdks/open_pdks/sources/xschem_sky130/.git/config
[remote "origin"]
url = <https://github.com/StefanSchippers/xschem_sky130>
fetch = +refs/heads/main:refs/remotes/origin/main
[branch "main"]
remote = origin
merge = refs/heads/main
… but how (from where, exactly) do I git pull your repository with the script, so that I don't mess up my PDK installation[s] even further?Stefan Schippers
04/20/2024, 9:12 AM./configure --enable-gf180mcu-pdk --enable-sky130-pdk --prefix=$HOME
then make
and make install
Stefan Schippers
04/20/2024, 9:20 AMChristoph Maier
04/20/2024, 9:24 AM/usr/local/share/
, so while I still have a non-zero chance to get a design in time for the April tapeout, I won't rock that boat.
If I really need to export waveforms from SPICE, I probably need to look up the Child's Play (7.7, page 232) I did back in 2000.
Somehow, I got ASCII data vectors out of macspice3f4 and imported them into Mathematica.Christoph Maier
04/20/2024, 9:34 AM