<@U016HSAH6AE>: Are you suggesting that it worked...
# magic
t
@Philipp Gühring: Are you suggesting that it worked prior to (or some time prior to) rev 8.3.368? I find it surprising because there should be no difference between reading commands off of the command line and reading commands out of a file. The only think I can think of is that the separation of commands into separate lines is at issue when using
cat
. Try putting all commands on one line separated by
;
or on multiple lines separated by
;\
(as magic interprets backslash-newline as a line continuation). Does that work?
The above trick is what I do in Makefile recipes that invoke magic using
<< EOL ...  EOL
.
🌍 1
p
I think that I had it working somewhere before 8.3.368, but I am not 100% sure. Could it be that the before or after the -rcfile parsing something changes the state of magic? I'll try to create a small reproducible example.
One problem could be that I generated the file with DRC errors but without << checkpaint >> so magic thinks that the file is DRC clean.
https://pdk.libresilicon.com/magicdrc.zip <-- Just run the reproduce.sh
Perhaps a "drc invalidate" command would be nice that tells the DRC engine that it has to start fresh from scratch. But the commands I am sending. I don't like about the checkpaint that I have to give it a rectangle which has the risk that it might be too small.
t
"checkpaint" should force the DRC engine to run as soon as you turn it on. "drc check" should be the equivalent of your suggested "drc invalidate"---it will invalidate DRC and re-run all checks. The commands you're using and their sequence appear to be correct. The other possibility is that all these commands are non-blocking (although I thought that "drc catchup" is supposed to be blocking). If so, it might reach the end of the script and exit without waiting for the DRC to finish---except that was what "drc catchup" is supposed to prevent. That was what made me wonder if it's an issue of how the commands are passed to stdin.
p
I tried adding checkpaint now, but it doesn't help. I also reduced the tcl file now to this minimum: load INV.mag ; select top cell ; drc check ; drc catchup ; drc count total ; exit
Yes, it could be some race condition with the commands being passed in. I think I remember having had the behaviour that it sometimes worked and it sometimes didn't.
The faster you pass in the commands (in just one line), likely the worse.
t
This is a suggestion for debugging, not a solution, but try adding a line
after 1000
(1 second forced delay).
p
Still doesn't work: load INV.mag ; select top cell ; drc check ; after 10000 ; drc catchup ; drc count total ; exit
(even with 10 seconds)
It really delays for 10 seconds
I have updated the https://pdk.libresilicon.com/magicdrc.zip now with the minimized example for easier debugging
It had taken me quite a long time to figure out that the behviour is different for -rcfile and STDIN. I have implemented the workaround with the rcfiles into my flow now, so it's not urgent to get it fixed for me anymore.