Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > signal <= (others => '0')

Reply
Thread Tools

signal <= (others => '0')

 
 
Pasacco
Guest
Posts: n/a
 
      04-18-2005
dear

It is for me unclear to understand differences between the following

signal <= '00000000'; # assuming 8 bit signal
signal <= (others => '0';
signal <= (others => (others => '0'));

GIMY, but so far unsuccesful to find --:

Could anyone comment for this?
Thankyou in advance

 
Reply With Quote
 
 
 
 
Engineering Guy
Guest
Posts: n/a
 
      04-18-2005
Pasacco wrote:

> dear
>
> It is for me unclear to understand differences between the following
>
> signal <= '00000000'; # assuming 8 bit signal
> signal <= (others => '0';
> signal <= (others => (others => '0'));
>
> GIMY, but so far unsuccesful to find --:
>
> Could anyone comment for this?
> Thankyou in advance
>

Well they have something in common - all of them are incorrect.
First of all, signal is a keyword and cannot be used as identifier so
in the following I will use s instead of signal.

s <= '00000000'; -- is erroneous because of use ' instead of "
s <= (others => '0'; -- is missing a closing )
s <= (others => (others => '0')); -- is illegal for a vector
-- (2 dimensional array required)

Use of others in aggregate makes your code generic. Thus you won't have
to replace all "00000000" with "00" when you change your mind and
vectors should be only 2 bits wide.
The last variant is even more powerful. If you take for example 128x8
variable and you want to initialize it to all 0s you will spend a while
typing the initializer.

EG
 
Reply With Quote
 
 
 
 
Pasacco
Guest
Posts: n/a
 
      04-18-2005
clear

thankyou

 
Reply With Quote
 
aaaaaa
Guest
Posts: n/a
 
      04-19-2005
case 1 : "00000000" is an assignment to a 8 bit signal . In this type of
assignment you have to assign all the bits.
Case 2 : In this type of assignment all the bits of signal will be
assigned '0' .
case 3 : this type of assignment is used in two dimentional array
assignments .

I think it is helpful.


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Target of signal assignment is not a signal" Nicolas Moreau VHDL 9 07-25-2007 04:21 PM
Re: How to make an internal signal embedded deep in hierarchy to a gloal output signal Weng Tianxiang VHDL 2 01-30-2007 12:58 PM
Aside from delta cycles and/or resolution functions, how can the effective value of a signal differ from a driving signal of its? Colin Paul Gloster VHDL 0 01-11-2007 01:31 PM
threading.Thread vs. signal.signal Jack Orenstein Python 0 09-17-2005 11:24 PM
Async-signal safe functions in signal handlers (unix) Michael Pronath Python 1 01-03-2005 01:10 PM



Advertisments