Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > others and aggregates...

Thread Tools

others and aggregates...

neilmac neilmac is offline
Junior Member
Join Date: Jan 2008
Posts: 5
If I have a signal called jim, which is a vector of, say, 7 downto 0 and in a clk'd process I make these assignments to this signal for a given a case condition :

when condition_true

-- set all bits to zero
jim <= (others => '0');
-- set bit 4 active to '1'
jim(4) <= '1';

...will jim have all bits set to '0' apart from bit 4. Jim is a signal.

I think it will and this works but in terms of synthese do you have to assign to others first and then assign the bits you want to change or does it not matter?
Reply With Quote
gzidude gzidude is offline
Junior Member
Join Date: Feb 2008
Posts: 19
Your code is making two assignments to jim at the same time. Your compiler should puke all over you. It assigns jim(4) to '0' and jim(4) to '1' concurrently since they're being clocked together.

This should work:

when condition_true

-- set all bits at same time
jim <= (4 => '1', others => '0')

Last edited by gzidude; 02-17-2008 at 06:27 AM..
Reply With Quote

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
Win 7 - access to Documents and Settings (and some others) folders is denied Ilya Zeldes Windows 64bit 9 12-02-2009 02:46 PM
How do I install dlls and exes for libtidy and others? Kevin Ar18 Python 0 11-04-2009 06:06 PM
Word, Word Perfect, Excel, Calc, And Some Others Load Fonts, Printer Properties, and Setup Slow. Jerry G. Computer Support 2 03-05-2005 10:13 PM
Support Yourself and Others Work with each other Honestly and get Rewarded Rajpatel Computer Support 0 01-11-2005 03:41 AM
Canon should be totally ashamed of this (and some others too) HP got this basic and absolutely essential thing right in their little digicam that's cheap even for a P&S, so why can't Canon?!! Yes, I know, there's more to the Canon 20D, b Mike Henley Digital Photography 43 12-15-2004 05:21 PM