Verilog-A has a 'transition' operator that can limit the transition slope of a signal. Is there a way to implement similar functionality in XMODEL? In other words, I would like to write a module that takes an input that may contain abrupt step changes and produces an output that varies with a prescribed transition slope.
There is a simple way to convert a signal with step changes into a signal with a fixed transition slope. The attached package contains the cellview named sandbox.slope_limit.schematic, which illustrates how this can be achieved using only two primitives: 'ilimit' and 'capacitor'.

The 'ilimit' primitive basically acts as a series resistor with current limits. When the current flowing through the primitive is within the bounds set by the 'Imax' and 'Imin' parameters, the primitive presents a low resistance (0.01 ohms by default). When the current exceeds the bounds, its resistance switches to a high value, thereby limiting the current at the specified bounds.
In the 'slope_limit' model shown above, when the output 'out' has the same value with the input 'in', the 'ilimit' primitive conducts no current, and 'out' simply holds its value. However, when 'in' switches to a new value, the 'ilimit' primitive begins to conduct, with its maximum current limited by the parameter 'slope'. As a result, the transition slope of 'out' becomes constrained to 'slope/C' where 'C' is the capacitance value (e.g. 1nF).
Shown below are the waveforms simulated using a testbench cellview sandbox.slope_limit.tb_run. With the 'slope' parameter set to 0.5 and the capacitance value set to 1nF, the output transition slope is limited to 0.5V/ns. As a result, the input signal, which consists of a series of step changes, is transformed into an output signal with this finite transition slope.

It is also possible to make the transition slope variable through an external input. The cellview sandbox.slope_ilimit_var.schematic shown below demonstrates how to do this using an 'ilimit_sw' primitive. The 'ilimit_sw' primitive functions the same way as 'ilimit', except its maximum and minimum currents are specified by two real-type inputs, 'Imax' and 'Imin'. The 'inline' primitive contains simple Verilog code that takes the slope value ('slope') and produces 'Imax' and 'Imin' as 'slope' and '-slope', respectively.

The simulated waveforms shown below demonstrates the operation of this 'slope_limit_var' model. The value of the 'slope' input is gradually decreased, starting from 1.6, and the transition slope of the output signal decreases accordingly.

Attachment: slope_limit_20250930.tar.gz
Please login or Register to submit your answer