Hello. I'm in the process of creating a 4-bit SAR ...
# xschem
u
Hello. I'm in the process of creating a 4-bit SAR logic using the structure described on the image below. However, I'm encountering an issue where xschem forcibly terminates during the test bench creation process, and there is no error message to indicate in terminal what the problem might be. Have there been any reports of a similar error in the past? I also experienced a similar problem when connecting symbols without internal structure to compose the top layer. (Clicking on a block or another component in the state shown in the image below causes xschem to terminate. However, in other areas, clicking does not cause any issues.) (You are using Ubuntu on a VirtualBox with 10GB of allocated RAM.)
s
Hi, @정진형학부생, this is probably an xschem bug, so if you can please assemble the smallest schematic that shows the problem, add all the necessary schematics/symbols/files in a tar or zip file, add a small readme.txt file telling what to do to cause the crash and send it to me. I will certainly investigate. I assume you are using the latest xschem version. If not please tell me also what xschem version you are using.
u
Thank you. As you mentioned, I have uploaded the zip file. I am using xschem version 3.4.0.
s
@정진형학부생 I have edited the testbench (and subcells) with xschem 3.4.3 (the latest one) and was not able to get a crash. Anyway, the attached zip file contains the corrected design. I made the following changes: • there is a
xschemrc
file, edit this file and set the
PDK_ROOT
variable to point to your pdk installation. If you start
xschem tb_4bit_sar_logic.sch
in this directory it should load the design with no missing symbols. • in the schematics I have removed absolute paths in symbol references (for example changed
/foss/designs/mySAR_SKY130/xschem/4bit_sar_logic.sym
to just
4bit_sar_logic.sym
. Always add the directory where symbols and schematics are located (or the directory one level above) to the
XSCHEM_LIBRARY_PATH
search path. See this manual page for more info. • The
4bit_sar_logic.sym
symbol was missing all attributes. I entered the symbol and after doing '`q`' added the following text. See first attached image:
Copy code
type=subcircuit
format="@name @pinlist @symname"
template="name=x1"
• I also added
name=x1
to the
4bit_sar_logic.sym
instance in the testbench. See second attached image
To help me investigate further, if you have the debugger installed (
sudo apt install gdb
) you can do this:
gdb xschem
at the gdb prompt write:
run tb_4bit_sar_logic.sch
this will start xschem with the testbench loaded. You can work in xschem as usual, so try to trigger the crash. Afer xschem has crashed you can press
bt
(backtrace) at the debugger prompt. Copy the text shown and send it to me. This shows the exact line of the code where the crash occurred. to quit the debugger press '`exit`' at the debugger prompt and confim you want to quit.
u
Thank you for your attention. I opened and worked on the file you modified, and I confirmed that unlike the file I created, there were no forced shutdown issues under the same conditions. It seems that I should review the changes you made to understand what the problem was. Thanks again.
s
You are welcome. However crashes should never happen, even on malformed circuits. If something is missing or wrong a warning or error should be reported, a crash with no explanation to the user is not the right behavior. If you see again xschem crashes let me know. If the crash can be triggered again try to run xschem with the debugger as explained above and send the backtrace. This will help a lot.
👍 1
u
@Stefan Schippers Hello. I would like to inquire about the issue I'm experiencing, which is also causing a crash. I made transmission gate named 'sw_vref_gen.' When I try to attempt to copy it at 'vref_gen.sch', it automatically shuts down. I've tried changing the path, but the same problem occurs. I'm attaching the file contents for your reference. Please check the "vref_gen.sch" file. I would appreciate it if you could take a look.
s
@권용진학부생 • when you say "*I made a transmission gate named sw_vref_gen*" you mean you drew the schematic and saved it as
sw_vref_gen
? or you mean
sw_vref_gen.sch
? • When you say copy it at 'vref_gen.sch' what are the operations you do ?
Save as
from the menu? I can not cause a crash, so please send the very detailed list of actions to reproduce the problem. Anyway I found a bug when doing a Save As to a different filename where xschem incorrectly popped up the dialog box shown in the image. This is now corrected, so please update xschem to latest revision and check again. Thank you for your report.
1.png
u
@Stefan Schippers I meant that when using 'sw_vref_gen.sym' inside 'vref_gen.sch', I encountered an error while copying 'sw_vref_gen.sym'. Upon investigation, it seems like the symbol was created incorrectly, possibly leading to the crash. It appears that not specifying '@name' in the sym file might have caused the issue. I appreciate your efforts in helping me resolve this.
s
If you can reproduce the problem please tell me. Even if a symbol is incorrect xschem should give some warnings instead of crashing. Thank you in advance.
[Update] I was able to reproduce the crash, now, see video. WIll investigate. Thanks
The crash is now fixed in xschem. Thank you for the report. If you can please update xschem and test again the crash condition. The problem is triggered by the incomplete symbol definition, however xschem should not crash anyway. To fix the symbol edit the
sw_vref_gen.sym
file, press '`q`' and add this text:
Copy code
type=subcircuit
format="@name @pinlist @symname"
template="name=X1"
If you already have instances of this symbol delete and add them again or do a 'q' on the instances and add:
name=X1
, (if there are more
name=X2
, ...)