<@U01819B63HP>, I'm trying to use raw_read -within...
# xschem
a
@Stefan Schippers, I'm trying to use raw_read -within a launcher symbol tclcommand- to read multiple tran raw files and get them all plotted on a waveform graph, but I can see that raw_read deletes any pre-loaded data. Is there a way to load multiple files and plot them on the same waveform graph, overlaid on top of each other?
s
@Ahmed Reda yes it is possible. Use the command:
xschem raw read file analysis
example:
xschem raw read $netlist_dir/poweramp.raw tran
See the manual page: in particular the section
Specify a different raw file in a graph
and following. You can display more graphs, each one using one different raw file OR you can plot more signals in the same graph, each signal from a different raw file. the
xschem raw
comand is quite powerful, see the description here (search for
raw what ...
)
๐Ÿ‘ 1
a
@Stefan Schippers well, yes.. I managed to load all the needed
.raw
files but I was expecting the waveform graph to display the specified signal from all the loaded
.raw
files once I
ctrl-left click
on the waveform launcher. Here's my use case: I load all the
.raw
files that are listed in a file called `tran_sim_base_file.txt`` using the tcl code shown in the snapshot and I though that If I write a signal name, say
por
, in the graph dialog box then all
por
signals from the loaded
.raw
files will be displayed which isn't the case because only the latest loaded
.raw
file is active. Instead, I had to go and list all the paths for the different
.raw
files within the dialog box, as shown in the other snapshot. Ideally, I would like the same signal from all loaded files to be displayed automatically once the signal name is specified. I guess I'll have to automate that inside the dialog box, somehow. Is that doable? Is there an easier way?
s
@Ahmed Reda I prefer not to display all the raw files when specifying a node. An equal number of users want to control which file a signal is linked to. While loading the raw files build also a "node" variable:
append node "\\\"por$cnt; por % $netlist_dir/$raw_file_path tran\\\"\n"
where cnt is a counter variable. (0, 1, 2, ...) at the end of the raw loading loop assign the node variable to the graph node attribute:
xschem setprop rect 2 3 node $node
in above line, '2' is the grap rectangle layer number. It is always 2 (grey) the '3' above is the graph number in the schematic, in the example it is the fourth graph (0, 1, 2, 3). You can get the graph number by selecting it (click close to the inner border and press Shift-S). Pay attention to the backslashes above.
\\
means "add a backslash',
\"
means "add a quote". These are needed because we are already using quotes to group the whole line, and quotes inside quotes, as well as backslashes must be escaped by a backslash.
๐Ÿ‘ 1
a
@Stefan Schippers, it worked. Thanks a lot. I think it would be useful if another panel, similar to the search list panel, is added to the waveform graph dialog box where it lists the different loaded
.raw
files such that when you click on one of them, only the relevant signals are shown in the search list. This way each signal will be linked to a known .raw file and we could also add the capability to group multiple
.raw
files where grouping implies that only common signals would appear in the search list, and if you add any of these signals it would be plotted from all the grouped files with, maybe, a suffix added to the plotted signal names that refers to the relevant
.raw
file.
Btw, the tcl code didn't run as expected when I added:
append node "\\\"por$cnt; por % $netlist_dir/$raw_file_path tran\\\"\n"
to the launcher symbol. It kept giving an error about a missing close brace. It only worked when I replaced the enclosing
""
with
{}
or wrote the command into a separate script and then called it from within the launcher.
s
@Ahmed Reda yes the above command written inside a tclcommand does not work, because the whole tclcommand attribute is also within double quotes, the append string must be wrapped in quotes and the text inside contains quotes. You just entered the Quoting Hell. you need to add another layer of escapes, but this will make the text unreadable (like \\\\ for a single backslash and so on). In these cases it's better to write tclcommand="source myproc.tcl; myproc" and write the whole thing in a separate script file. I will think if there are options to make this whole thing a bit more user friendly.
๐Ÿ˜… 1
a
Yup, writing a separate script is exactly what I ended up doing (y)