Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Locally static?!

 
Thread Tools Search this Thread
Old 05-02-2005, 01:13 PM   #1
Default Locally static?!


Ok, can anyone tell me why:

constant B4 : unsigned := "010";
constant CONST : unsigned := B4 + "001"; --is NOT locally static

constant B4 : integer := 2;
constant CONST : integer := B4 + 1; -- is locally static

Taras



Taras_96
  Reply With Quote
Old 05-02-2005, 07:48 PM   #2
Alan Peter Fitch
 
Posts: n/a
Default Re: Locally static?!
Taras_96 wrote:
> Ok, can anyone tell me why:
>
> constant B4 : unsigned := "010";
> constant CONST : unsigned := B4 + "001"; --is NOT locally static
>
> constant B4 : integer := 2;
> constant CONST : integer := B4 + 1; -- is locally static
>
> Taras
>


I seem to remember that the process of slicing a vector is considered
non-static, so perhaps the creation of the anonymous subtype of the
unsigned vector makes it non-static. I shall look it up in the standard
when at work.

In the case of the integer, there is no anonymous subtype created as no
subtype of integer if implied.

In the case of unsigned, the vector will deduce its width from the size
of B4.

regards
Alan

--
Alan Fitch (at home)
reverse: org dot ieee dot apfitch


Alan Peter Fitch
  Reply With Quote
Old 05-02-2005, 09:23 PM   #3
Duane Clark
 
Posts: n/a
Default Re: Locally static?!
Taras_96 wrote:
> Ok, can anyone tell me why:
>
> constant B4 : unsigned := "010";
> constant CONST : unsigned := B4 + "001"; --is NOT locally static


I think because CONST is an unconstrained array. Try
constant CONST : unsigned(2 downto 0) := B4 + "001";
or some such.

>
> constant B4 : integer := 2;
> constant CONST : integer := B4 + 1; -- is locally static
>
> Taras
>



Duane Clark
  Reply With Quote
Old 05-16-2005, 05:01 PM   #4
Jim Lewis
 
Posts: n/a
Default Re: Locally static?!
Taras,
> constant B4 : unsigned := "010";
> constant CONST : unsigned := B4 + "001"; --is NOT locally static
>
> constant B4 : integer := 2;
> constant CONST : integer := B4 + 1; -- is locally static



From the LRM:
7.4.1 Locally static primaries
An expression is said to be locally static if and only if every
operator in the expression denotes an implicitly dened operator
whose operands and result are scalar and if every primary in the
expression is a locally static primary, where a locally static
primary is dened to be one of the following: ...

Integers are scalar, arrays are not.


The VHDL-200X effort has proposals that modify this.
Two important changes:
1) Strike the requirement for the operand and result to be scalar. (FT22)
2) Include operators defined in std_logic_1164 and numeric_std along
with implicitly defined operators in consideration for being
locally static. (FT23)


The VHDL-200X working group is looking for corporate support
to fund the LRM editing effort. Funding will determine the
question as to when the features will be available.
If your company can help sponsor this effort, please contact
myself (VASG vice-chair) or Stephen Bailey (VASG chair).


Best Regards,
Jim Lewis




>
> Taras
>



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
Jim Lewis
Director of Training private.php?do=newpm&u=
SynthWorks Design Inc. http://www.SynthWorks.com
1-503-590-4787

Expert VHDL Training for Hardware Design and Verification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~


Jim Lewis
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cisco 2620 static natting help biomed32uk Hardware 1 10-22-2009 03:25 PM
please help: simple java coding error 'cannot be referenced from a static context' clm90 General Help Related Topics 0 10-17-2009 06:49 AM
Shag Floor danger? Dave Hardenbrook A+ Certification 3 02-28-2008 05:13 AM
USB Key not recognised on laptop in a domain, but is when logged in locally lawrend A+ Certification 4 04-24-2005 03:02 AM
Re: Anti Static Mats David Hough A+ Certification 3 05-08-2004 03:46 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46