Open mithro opened 4 years ago
Example;
diff --git a/libraries/sky130_fd_pr_rf2/v0.10.1/cells/rf2_xcmvpp6p8x6p1_lim4shield/sky130_fd_pr_rf2__rf2_xcmvpp6p8x6p1_lim4shield.spice b/libraries/sky130_fd_pr_rf2/v0.10.1/cells/rf2_xcmvpp6p8x6p1_lim4shield/sky130_fd_pr_rf2__rf2_xcmvpp6p8x6p1_lim4shield.spice
index 58f9d2da2a6..aec536b9b4c 100644
--- a/libraries/sky130_fd_pr_rf2/v0.10.1/cells/rf2_xcmvpp6p8x6p1_lim4shield/sky130_fd_pr_rf2__rf2_xcmvpp6p8x6p1_lim4shield.spice
+++ b/libraries/sky130_fd_pr_rf2/v0.10.1/cells/rf2_xcmvpp6p8x6p1_lim4shield/sky130_fd_pr_rf2__rf2_xcmvpp6p8x6p1_lim4shield.spice
@@ -1,7 +1,5 @@
-* NGSPICE file created from sky130_fd_pr_rf2__rf2_xcmvpp6p8x6p1_lim4shield.ext - technology: (null)
+* NGSPICE file created from sky130_fd_pr_rf2__rf2_xcmvpp6p8x6p1_lim4shield.ext - technology: sky130A
FYI - This is probably blocking the skywater low level primitive release.
@mithro : What is the difference in the environment above between the correct and incorrect examples? In principle, magic always knows what the technology is and always writes that into the .ext file, which then copies it into the .spice file. DBTechName (global variable) is always set; the default is "minimum", not NULL, so I don't know how the value ends up as "(null)". How can I reproduce this result?
That is the problem, I can't reliably reproduce the effect. It seems to happen randomly from the same input....
@mithro : There is no way for the DBTechName to be NULL under normal operation, so this appears to indicate some kind of memory corruption, and presumably is related to other problems like devices appearing or disappearing from the netlist. Probably it can be captured by running valgrind on magic during extraction. "ext2spice" is not implicated as the "(null)" value appears in the .ext file after running "extract".
Can you give me the valgrind command that I should run magic using?
@mithro : It should just be "valgrind magic -dnull
https://heeris.id.au/2016/valgrind-gdb/
In short, run "valgrind --vgdb-error=0 magic -dnull ..." which will print a statement about how to run gdb, and then block at main(). Follow the printed instructions in a separate terminal. When it hits a memory access error, gdb will break on the error and you can get a backtrace.
I just want a command which runs magic inside valgrind and then if memory corruption has been detected dumps a core and reports a failure exit code....
Just running "valgrind magic
Running valgrind didn't detect anything it seems, no leaks were detected. I wonder if there is a race condition that is not happening with valgrind being enabled.
Going to run the valgrind version 5 times and look at the output to see if it continues to vary....
Normally the output looks like this;
But sometimes I'm getting
I can't find a reproducible test case which causes it to occur however. I'm always using the same script and technology file.
It seems to happen more often while splitting the ram files....