Languages

CommunityCategory: MODELZENSpecifying a range of digital mode input in UDM mapping with mode specification expressions

MODELZEN

Specifying a range of digital mode input in UDM mapping with mode specification expressions

SA Support Team Staff 2024-01-31

I find mode specification expressions ('modespec' in short) very useful when mapping UDMs. As explained in this Q&A posting, I use modespec's mostly when I want to fix some mode bit values in my UDM mapping, so that MODELZEN can generate the model quickly without having to enumerate the mode bit combinations that I am not interested in. The following example illustrates an example of fixing the sel_c<3:0> values to 0111 using mode specification expressions like '==1' and '==0'.

But what if I want to characterize the circuit over a range of mode bit values? For example, I may want sel_c<3:0> to take values ranging 7~9, i.e. 0111, 1000, or 1001. Can modespec express a constraint like this?

1 Answers
SA Support Team Staff 2024-01-31

Mode specification expressions are more powerful than you think. For full information, please refer to this application note titled "MODELZEN UDM Mode Specification Expressions".

For specifying a range, you can use this conditional expression starting with a '?' character:

?sel_c<3:0> >=7 && sel_c<3:0> <=9

which constrains the mode bit values to those that make the value of sel_c<3:0> between 7 and 9.

To use this in your example, you can replace the modespec expressions used for sel_c<0>, sel_c<1>, sel_c<2>, and sel_c<3> with this one as shown below. In fact, it is sufficient to use this expression for just one of the mode bits (e.g. sel_c<0>). For your information, the following '1.0' specifies the logic-1 level of the mode bit.

For your information, the simple modespec expressions like '==1' are called self-comparison expressions. For example, '==1' used for sel_c<0> is equivalent to a more general conditional expression '?sel_c<0>==1'. There are more self-comparison expressions possible such as those starting with !=, &==, and |==. For any constraints that cannot be easily described with self-comparison expressions, you can always use conditional expression starting with '?'.

MODELZEN

UDM 매핑시에 mode specification 표현식을 사용해 디지털 모드값의 범위를 설정하는 법

SA Support Team Staff 2024-01-31

저는 UDM 매핑을 할때 mode specification 표현식(줄여서 'modespec')을 자주 씁니다. 이 Q&A 포스팅에 설명되어 있듯이, 저는 modespec을 주로 UDM 매핑의 몇몇 mode 입력의 값을 고정시키고 싶을때 사용합니다. 그러면 당장은 필요없는 mode 입력값에 대한 특성 시뮬레이션을 수행하지 않아 MODELZEN이 모델을 더 빨리 생성하거든요. 아래의 예제는 4개의 mode 입력 sel_c<3:0>의 값을 mode specification 표현식인 '==1' 또는 '==0'을 사용해 0111로 고정시키는 예를 보여줍니다.

하지만, 만약 mode bit 값을 하나의 값으로 고정시키는 대신 어떤 범위의 값으로 제한하려면 어떻게 하나요? 예를 들어, sel_c<3:0>의 값이 7에서 9까지의 범위를 갖게 하려면, 그 가능한 값이 0111, 1000, 또는 1001이기 때문에, 앞에서의 간단한 modespec 표현식으로는 표현이 어려울 것 같습니다.

1 Answers
SA Support Team Staff 2024-01-31

Mode specification expressions are more powerful than you think. For full information, please refer to this application note titled "MODELZEN UDM Mode Specification Expressions".

For specifying a range, you can use this conditional expression starting with a '?' character:

?sel_c<3:0> >=7 && sel_c<3:0> <=9

which constrains the mode bit values to those that make the value of sel_c<3:0> between 7 and 9.

To use this in your example, you can replace the modespec expressions used for sel_c<0>, sel_c<1>, sel_c<2>, and sel_c<3> with this one as shown below. In fact, it is sufficient to use this expression for just one of the mode bits (e.g. sel_c<0>). For your information, the following '1.0' specifies the logic-1 level of the mode bit.

For your information, the simple modespec expressions like '==1' are called self-comparison expressions. For example, '==1' used for sel_c<0> is equivalent to a more general conditional expression '?sel_c<0>==1'. There are more self-comparison expressions possible such as those starting with !=, &==, and |==. For any constraints that cannot be easily described with self-comparison expressions, you can always use conditional expression starting with '?'.