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

Reply

VHDL - newb: generic vector

 
Thread Tools Search this Thread
Old 01-22-2005, 06:31 PM   #1
Default newb: generic vector


If I have a logic vector like this (4 bits):
signal s: std_logic_vector(3 downto 0);
I can assign a zero value this way:
s <= "0000";

How can I assign zero if vector size is generic? Do I need a FOR loop?
signal s: std_logic_vector(N-1 downto 0);
s <= ???

TIA

--
Pela


Pela
  Reply With Quote
Old 01-22-2005, 07:07 PM   #2
Jean-Christophe Le Lann
 
Posts: n/a
Default Re: newb: generic vector
Le Sat, 22 Jan 2005 18:31:44 +0000, Pela a écrit*:

> If I have a logic vector like this (4 bits):
> signal s: std_logic_vector(3 downto 0);
> I can assign a zero value this way:
> s <= "0000";
>
> How can I assign zero if vector size is generic? Do I need a FOR loop?
> signal s: std_logic_vector(N-1 downto 0);
> s <= ???
>
> TIA


s <= (others=>'0');

JC


Jean-Christophe Le Lann
  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
unable to pass vector by reference vkaul1 Software 0 06-26-2009 06:03 AM
DVD Verdict reviews: ELFEN LIED: VECTOR THREE (VOLUME 3) and more! DVD Verdict DVD Video 0 09-15-2005 09:11 AM
DVD Verdict reviews: LIGHTNING BUG, ELFEN LIED: VECTOR TWO (VOLUME 2), and more! DVD Verdict DVD Video 0 09-01-2005 09:12 AM
DVD Verdict reviews: ELFEN LIED: VECTOR ONE (VOLUME 1) and more! DVD Verdict DVD Video 0 06-09-2005 09:15 AM
newb questions... Do What? A+ Certification 4 09-02-2003 05:49 AM




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