SR latch (syntax errors?)

72 views
Skip to first unread message

pablo_sole...@brown.edu

unread,
Jan 30, 2019, 11:33:47 AM1/30/19
to xyce-users

U1 NOR(2) 1 0 5 10 9 DMOD
U2 NOR(2) 1 0 4 9 10 DMOD

.MODEL DMOD DIG ()

I just want to make an SR latch with default parameters (I plan to make more robust parameters later). I am having a hard time with the syntax in xyce and 
am getting an error that seems like it's coming from syntax



Circuit: *NOR gate Xyce Simulation

Unknown model type "dig" -- ignored
Error on line 32 : u1 nor(2) 1 0 5 10 9 dmod
Unable to find definition of model "0"
*  Unknown parameter "10"
Error on line 33 : u2 nor(2) 1 0 4 9 10 dmod
Unable to find definition of model "0"
*  Unknown parameter "9"
Fatal Error: No analysis request found.

I dont want to run analysis just yet. I do want, however, to have a working NOR gate. U1 "should be" a two input nor gate with logic/power level at vdd and ground at node 0, an input at net 5 and 10 and input at 9. 
With the model name being DMOD arbitrarily, with parameters to be filled in later.  In the end, I want two to make an SR latch. 

How do I make this work? On this note, do I always need to set device parameters and model parameters? Or can I leave it blank "()" as I just did? 






xyce-users

unread,
Jan 30, 2019, 12:47:22 PM1/30/19
to xyce-users

The syntax of your U lines appears fine, and yes, it is legal to use all default parameters in the model card.  That Xyce is saying the model type "dig" is unknown is bizarre.

There must be more in your netlist that is wrong, but without seeing the whole thing we can't diagnose what the actual issue is.

Here's a very simple 2-input NOR circuit that does in fact work, and uses the exact U lines you post here.  It is a simple modification of the nor4_unit_test.cir circuit in the DIGITAL directory of the Xyce test suite.  You can swap out the DMOD model card for the DMOD2 model card (which is all defaults), and the circuit will run (but will do nothing interesting because the parameters aren't suitable for the inputs).

If you provide the full circuit that reproduces the error, we may be able to help you.  It would also help to know which version of Xyce you are using and on what operating system.
nor2_unit_test.cir

pablo_sole...@brown.edu

unread,
Jan 30, 2019, 1:07:27 PM1/30/19
to xyce-users
I am using Xyce 6.10 on Windows 10. The SR latch is part of a larger circuit but so far the error is coming from these lines. If I open the dual SR latch file in an ltspice editor, I receive the same errors as before.  I tried to just copy over exactly the lines you mentioned from unit_test but still the same issues.  

-------------------------------------------------------------------------------------
* SR Latches (Behavioral Digital Device) made with NOR gates:

U1 NOR(2) 1 0 5 10 9 DMOD2
U2 NOR(2) 1 0 4 9 10 DMOD2

R1 9 0 100K

*.model DMOD DIG ( CLO=CAPOUT  CHI=CAPOUT
*+ S0RLO=R0LO  S0RHI=R0HI  S0TSW=SW
*+ S0VLO=-1  S0VHI=1.8
*+ S1RLO=R1LO  S1RHI=R1HI  S1TSW=SW
*+ S1VLO=1  S1VHI=3
*+ RLOAD=RIN   CLOAD=CAPIN
*+ DELAY=20ns )
.model DMOD2 DIG ( )

.end
-------------------------------------------------------------------------------------

Errors:
-------------------------------------------------------------------------------------
Circuit: *

Unknown model type "dig" -- ignored
Error on line 3 : u1 nor(2) 1 0 5 10 9 dmod2
Unable to find definition of model "0"
*  Unknown parameter "10"
Error on line 4 : u2 nor(2) 1 0 4 9 10 dmod2
Unable to find definition of model "0"
*  Unknown parameter "9"
Fatal Error: No analysis request found.
---------------------------------------------------------------------

xyce-users

unread,
Jan 30, 2019, 1:22:55 PM1/30/19
to xyce-users

We are unable to reproduce your errors in Xyce using the snippets you are providing.  In fact, these do not look like Xyce errors at all.  Xyce has no error message that includes the text "Unable to find definition".  Nor does Xyce report the text "No analysis request found."  when a netlist is lacking an analysis statement --- our error message for this condition is "Netlist error:  No analysis specified."   Are the errors you are seeing coming from the LT Spice editor?  Xyce is not compatible with LT Spice, and I would not be surprised if using LT Spice's editor is throwing errors when reading Xyce netlists.

Soler Portilla, Pablo

unread,
Jan 30, 2019, 1:30:27 PM1/30/19
to xyce-users
Okay, I figured that might be an issue. At first I was using a regular text editor but since i always ended up converting them to cir I just left them as cir files. And my default cir editor is LTspice, so these errors kept popping up when i opened the file. Though I thought they might have been generic netlist errors, I guess they are just compatibility issues. I will use        -syntax and -norun moving forward. 



--
You received this message because you are subscribed to the Google Groups "xyce-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xyce-users+...@googlegroups.com.
To post to this group, send email to xyce-...@googlegroups.com.
Visit this group at https://groups.google.com/group/xyce-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages