ISSUE 588

Add Proposal  Add Analysis  Edit Class, Environment, or Release
Number 588
Category enhancement
Synopsis Add ranges to case_item expressions
State open
Class enhancement
Arrival-DateJun 14 2004
Originator Shalom Bresticker <Shalom.Bresticker@freescale.com>
Release 2001b
Description
In a case statement,

case (A)
item1:
item2:
...
default:
endcase

If I want to ask whether A is between 4 and 10, for example, I have to write

4,5,6,7,8,9,10:

This request is for a way to write something like [4:10]:,
which would mean the range between 4 and 10, inclusive.

Steven Sharp said this should be fairly easy, and it is very useful, so it
should be HIGH priority.

Shalom

Fix

Unknown
Audit-Trail
From: Krishna Garlapati <krishna@synplicity.com>
To: Shalom Bresticker <Shalom.Bresticker@freescale.com>
Cc: etf-bugs@boyd.com
Subject: Re: enhancement/588: Add ranges to case_item expressions
Date: Mon, 14 Jun 2004 18:58:04 +0530

This is a multi-part message in MIME format.
--------------000707080807060608070008
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit


I am guessing this means the range should contain simple constant
expressions.
It's possible to write something like:

case(foo)
[3'b001-3'b010]:
endcase

I guess a range of dis-similar number types like:

case foo
[2-4'b1111]:
endcase

can be legal, but not some thing like:

case(foo)
[2.12-4'b1000]:
endcase


-Krishna.



Shalom Bresticker wrote:

>>Number: 588
>>Category: enhancement
>>Originator: Shalom Bresticker <Shalom.Bresticker@freescale.com>
>>Description:
>>
>>
>
>In a case statement,
>
>case (A)
>item1:
>item2:
>..
>default:
>endcase
>
>If I want to ask whether A is between 4 and 10, for example, I have to write
>
>4,5,6,7,8,9,10:
>
>This request is for a way to write something like [4:10]:,
>which would mean the range between 4 and 10, inclusive.
>
>Steven Sharp said this should be fairly easy, and it is very useful, so it
>should be HIGH priority.
>
>Shalom
>
>
>
>
>


--------------000707080807060608070008
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">





I am guessing this means the range should contain simple constant
expressions.

It's possible to write something like:



case(foo)

[3'b001-3'b010]:

endcase



I guess a range of dis-similar number types like:



case foo

[2-4'b1111]:

endcase



can be legal, but not some thing like:



case(foo)

[2.12-4'b1000]:

endcase





-Krishna.







Shalom Bresticker wrote:

<blockquote cite="mid200406141300.i5ED00sF021992@wa.boyd.com"
type="cite">
<blockquote type="cite">
<pre wrap="">Number: 588
Category: enhancement
Originator: Shalom Bresticker <a class="moz-txt-link-rfc2396E" href="mailto:Shalom.Bresticker@freescale.com"><Shalom.Bresticker@freescale.com>
Description:


<pre wrap=""><!---->
In a case statement,

case (A)
item1:
item2:
..
default:
endcase

If I want to ask whether A is between 4 and 10, for example, I have to write

4,5,6,7,8,9,10:

This request is for a way to write something like [4:10]:,
which would mean the range between 4 and 10, inclusive.

Steven Sharp said this should be fairly easy, and it is very useful, so it
should be HIGH priority.

Shalom










--------------000707080807060608070008--

From: Shalom.Bresticker@freescale.com
To: Krishna Garlapati <krishna@synplicity.com>
Cc: etf-bugs@boyd.com
Subject: Re: enhancement/588: Add ranges to case_item expressions
Date: Mon, 14 Jun 2004 16:33:37 +0300 (IDT)

Yes, that's the idea.

Shalom


On Mon, 14 Jun 2004, Krishna Garlapati wrote:

> I am guessing this means the range should contain simple constant
> expressions.
> It's possible to write something like:
>
> case(foo)
> [3'b001-3'b010]:
> endcase
>
> I guess a range of dis-similar number types like:
>
> case foo
> [2-4'b1111]:
> endcase
>
> can be legal, but not some thing like:
>
> case(foo)
> [2.12-4'b1000]:
> endcase

Unformatted



Hosted by Boyd Technology