Languages

CommunityCategory: XMODELSetting the initial value of an internal node of a feedback loop consisting of function primitives

XMODEL

Setting the initial value of an internal node of a feedback loop consisting of function primitives

SA Support Team Staff 2018-12-04

In case of models composed of circuit primitives, I know we can use the vinit primitive to define the initial condition of a chosen node voltage. However, the vinit primitive is not effective on the signals driven by other types of primitives, such as function or gate primitives. For instance, when a set of gate primitives forms a feedback loop, its internal nodes are initialized to X’s, which may never change to 0 or 1 because of the feedback loop (the X propagates back to the input). Is there a way to define the initial values of these signals without having to define an explicit reset mechanism?

1 Answers
Best Answer
SA Support Team Staff 2018-12-04

Yes. You can use either buffer or buf_xbit primitive to set the initial value of a signal depending on whether it is xbit or xreal type, respectively. While these primitives are basically buffers that propagate the signals received at the inputs to the outputs as-is, they have an init_value parameter that can define the output initial value, i.e., the output value at time=0.

Therefore, by placing a buffer or buf_xbit primitive within the feedback loop, its output’s initial value would propagate via the feedback loop and initialize the other signals on the feedback loop. The snapshots below illustrate the case of setting the init_value parameter values for buffer and buf_xbit primitive in GLISTER.

[Case of using a buffer primitive to define the initial value of an xreal-type signal]

[Case of using a buf_xbit primitive to define the initial value of an xbit-type signal]