... forgot to upload the attached!
# xschem
d
... forgot to upload the attached!
@Stefan Schippers: Just to update, I fixed all the issues and my tb netlists now. Doing this raised the following questions: 1. I had to change the pin types from input / output to inouts. After I changed the schematic I needed to create a whole new symbol to reflect this. Can xschem update an existing symbol as is done in Cadence? Avoids me having to recreate a new symbol each time something changes in the schematic. 2. Say I have a symbol instantiated somewhere. If I change that symbol, this change is not automatically seen where it is instantiated. In order to see the new changes, the symbol needs to be deleted and re-inserted. Not a major issue but a slight inconvience. Is there a work around? 3. When netlisting errors occur, how exactly do they read? For example, the attached gives a few path names and errors. How are these interpreted? 4. The netlisting errors give net names. How do I search for these in a schematic (e.g. to find net#6). I couldnt see an obvious search function. 5. Im sure it is possible to snap a wire to a pin. How can you do this? 6. When I select a block and move it, the nets attached to that block dont automatically move with it. How can this be done as it is a bit annoying to have to re-join connections everytime I move a box. Thanks,
s
Diarmuid, I am missing these .sym/.sch files and sub symbols / sub schematics if any therein: •
Input_Stage_OA1
Input_Stage_OA2
x1_x32_OA
Universal_R_2R_Block2
Output_OA
If you can send the missing files I can do some tests on the complete design. As I have it now some errors are real since some nets don't connect anywhere as shown below. in the sub blocks
For question 1. A mismatch in pin types (in / inout / out) in schematic vs symbol raises an error reporting, but does not affect spice netlist generation since spice does not use at all pin directions. Usually you need to descend into the symbol, click the corresponding small red square representing the pin, press'q' and set the dir attribute according to schematic type.
For question 2. Symbols instantiated in a schematic are cached in memory for efficiency reasons. If you change a symbol you can simply do a File->Reload (Alt-s) in the schematic to force a reload (and update all symbol caches). If there are unsaved modifications in the schematic save them before doing the reload.
Question 3.: • Open net: this is a net that has a driver but goes nowhere: see 1st image • Undriven net: a net that is used as input in a block but has no drivers (no instances driving the net or no input port). See second image. • Shorted output node: two or more drivers with out port driving the same net. This is usually not reported with inout ports that are often used when connecting more tristatable drivers on a bus.see 3rd pic. The warning / error messages are related to the block containg the nets. see the first ------- line above. These messages do not prevent correct netlist generation. but it is wise to fix them.
Question 4.: to search for a reported net go into the schematic containing that net, hit Ctrl-f, set token field to 'lab' and write the net name. see image. In some cases the message is related to some instance pins not connected to anything. This was considered an error in xschem years ago, but many users asked to waive this behavior. A resistor with a 'b' terminal not connected to anything will have this terminal connected to a #net<n> created by xschem, this net is not visible. Locating these nets require an xschem command: xschem instances_to_net {#net11}. see 2nd pic. I will eventually add some visual help to help finding these nets. The suggestion, if you deliberately want to leave some terminals unconnected, is to add a small wire anyway. xschem highights these nets when doing a netlist. see 3rd pic (you can press the '5' key to enhance visibility of these highlights)
🙌 1
Question 5: pressing Shift-W will start a wire rom the closest (to the mouse pointer) instance terminal or other wire endpoint. Holding the Shift key and clicking the mouse left button will land the net on the closest instance terminal or wire endpoint. If you add these two lines in xschemrc: set draw_crosshair 1 set crosshair_size 3 a small cursor shows you where the wire will snap. Pressing the space bar while placing a wire toggles between oblique, H-V or V-H paths see gif.
Question 6: select the objects you want to move, click on one of the selected items with ctrl key down and move.
@Diarmuid Collins in the example below due to missing blocks there are many nets that go nowhere or undriven/floating nets, they are all highlighted after a netlisting operation. A netlist of a subblock is effectively used also to do a ERC rulecheck of the block. Pressing '5' will dim the schematic but keeps all the hilight nets:
d
Thanks @Stefan Schippers. Lots of excellent usage guides there. Much appreciated! One follow on question I have from question 1: Suppose I add a new pin to my schematic. How do I update the existing symbol, as opposed to having to re-create one? And one new question: I will be setting the digital bits into the INA using a vloga block. For now however I would like to set the input vector manually. In the attached, I want to set the vector to "0100000001" using the syntax that would be used in commercial editors. How do I perform this in xschem? I presume what I have done is not correct since the net highlights red when I try to netlist. It doesnt however give an error message but the sim results dont look right. Do I have to enable some setting to see the error message which presumably will report a syntax error? Cheers,
Screenshot from 2025-02-01 07-57-13.png
s
You don't need brackets:
vssa,vdda,7*vssa,vdda
expands to:
vssa,vdda,vssa,vssa,vssa,vssa,vssa,vssa,vssa,vdda
. manual page here. Note: Do not add spaces between commas, as you correctly did in the example above.
@Diarmuid Collins the procedure of adding a pin to an existing symbol:
@Diarmuid Collins to see warnings or errors when netlisting: View ->Show/Hide -> Show ERC info window. With the <*2> syntax xschem does not understand the net name and you see something like this:
d
Brillant @Stefan Schippers! This answers all my questions! Thanks for the quick feedback.