I am implementing a Linear Feedback Shift Register (LFSR) in Pspice A/D with a new logic family. Anyways, to initiate the random number generation I am required to feed in some value to the circuit, to be specific, the output of all the D-latches can not be zero initially so I am trying to make the output of any D-latch '1' initially. It should be done such that after the initialization the circuit works by itself. I tried using a fixed voltage source but that does not work, quite obviously. Please suggest anything you may find applicable to this.

Below is the circuit I am trying to make:

enter image description here

And just in case it may help, I am trying to get results like these:

enter image description here


I would use the ".ic" (initial condition) directive.

Name any node (or find a node name) and then add the directive .ic V(nodename)=required voltageV

In this case, SPICE may struggle without an initial condition for both XOR inputs. I would probably set initial conditions for every flip-flop in this situation.

Update: where to add ic directive.

I would put the directive at the top level node to start with.

| improve this answer | |
  • \$\begingroup\$ If i am making use of subcircuits here, where exactly should i point the .ic command \$\endgroup\$ – abhishek tyagi Dec 26 '15 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.