cadence_calculator_cross函数

Cross函数

原文:(最后有翻译)

Returns the X value where a signal crosses the threshold Y value.

This function includes the following arguments:

Signal—Name of the signal.

Threshold Value—Threshold to be crossed.

Edge Number—Occurrence of the crossing. The first crossing is Edge Number=1, the second crossing is Edge Number=2, and so on. The value of Edge Number can be negative numbers: Edge Number=-1 for the previous occurrence, Edge Number= for the occurrence before the previous occurrence, and so on.

Edge Type—Direction of the crossing event. rising directs the function to look for crossings where the Y value is increasing, falling for crossings where the Y value is decreasing, and either for crossings in either direction.

When the threshold is maximum or minimum, both the rising and falling edge types can be used to calulate cross.

When you are using a parametric sweep, ensure that the sweep values are specified in increasing order to calculate the cross for falling edge type. Otherwise, the function evaluates to nil and following warning message appears:

WARNING: The cross function cannot be applied on this expression due to one of the following reasons:

- Threshold value is invalid

- Edge Type field is set to 'falling', but the X-axis values of input waveform are specified in decreasing order

Specify the edge type as 'rising' or 'either', and ensure that the threshold value is valid.

Number of occurrences—Select single to calculate one point or select multiple to calculate until the end of X range.

Plot/print vs.—Specifies whether X-axis of the output waveform is time (or another X-axis parameter for non-transient data) or cycle.

Tolerance—Sets the tolerance value to be used to detect the threshold crossings. You can specify a tolerance value in cases where the noise is large. In such cases, the waveform can cross a given threshold multiple times within one transition. These double crossings are counted as two crossings and generate huge spikes in the time domain jitter waveform.

Example 1

The following diagram illustrates how the result is determined for the values signal=V(out1), Threshold Value=1, Edge Number=1, and Edge Type=falling

Example 2

This example shows the output waveform generated when you apply the cross function on the following input waveform:

The following arguments are specified in this example:

Signal—v(“1” ?result “tran”)

Threshold—2.5

Edge Number—1

Edge Type—either

No of occurrences—multiple

Plot/print vs.—time

Tolerance—nil

The following expression is created in the Buffer:

cross(v("1" ?result "tran") 2.5 1 "either"  t "time" )

Now, when you evaluate this expression, the following output waveform is displayed in the graph window:

Related OCEAN Function

The equivalent OCEAN command for cross is:

cross( o_waveform n_crossVal x_n s_crossType [g_multiple [s_Xname]] )

=> o_waveform/g_value/nil

For more information about the OCEAN function, see cross in OCEAN Reference.

翻译:cross函数

返回信号超过阈值Y的X值。

此函数包括以下参数:

信号信号的名称。

阈值要跨越的阈值。

边数交叉出现的次数。第一个交叉点为“边数=1”,第二个交叉点是“边数=2”,依此类推。“边数”的值可以是负数:“边数=-1”表示上一次出现,“边数=-1”表示前一次出现之前的出现,依此类推。

边类型交叉事件的方向。上升指示函数查找Y值增加的交叉点,下降指示Y值减少的交叉点以及任一方向的交叉点。

当阈值为最大或最小时,上升沿和下降沿类型都可以用于计算交叉。

使用参数化扫掠时,请确保按递增顺序指定扫掠值,以计算下降边缘类型的十字。否则,函数计算结果为nil,并显示以下警告消息:

警告:由于以下原因之一,交叉函数无法应用于此表达式:

-阈值无效

-边缘类型字段设置为“下降”,但输入波形的X轴值是按递减顺序指定的

将边缘类型指定为“rising”或“either”,并确保阈值有效。

出现次数选择单个以计算一个点,或选择多个以计算直到X范围结束。

Plot/print vs.-指定输出波形的X轴是时间(或非瞬态数据的另一个X轴参数)还是周期。

公差设置用于检测阈值交叉的公差值。在噪波较大的情况下,可以指定容差值。在这种情况下,波形可以在一个转变内多次越过给定阈值。这些双交叉被计数为两个交叉,并在时域抖动波形中产生巨大的尖峰。

示例1

下图说明了如何确定值signal=V(out1)、Threshold Value=1、Edge Number=1和Edge Type=falling的结果

示例2

本例显示了对以下输入波形应用交叉函数时生成的输出波形:

本例中指定了以下参数:

信号-v(“1”?结果“tran”)

阈值-2.5

边缘数字-1

边缘类型

出现次数多次

绘图/打印相对于时间

公差为零

将在“缓冲区”中创建以下表达式:

cross(v(“1”?结果“tran”)2.5 1“任一“t”时间”)

现在,当您评估此表达式时,以下输出波形将显示在图形窗口中:

相关OCEAN功能

交叉的等效OCEAN命令是:

cross(o_waveform n_crossVal x_n s_crossType[g_multiple[s_Xname]])

=>o波形/g值/零

有关OCEAN函数的更多信息,请参阅OCEAN参考中的交叉。

  • 2
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

老王模拟IC

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值