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

Reply

VHDL - Help with Vector Array's in VHDL; Cannot shift from one to another

 
Thread Tools Search this Thread
Old 12-05-2007, 03:26 AM   #1
Default Help with Vector Array's in VHDL; Cannot shift from one to another


I only copy and pasted the relevant code for now. Heres what I'm trying to do. I have to shift from one register to another, i.e.: reg1<= reg2; reg2<=reg3;reg3<=reg4;

It doesn't matter what I do with reg4, i can leave it as it is

Here is the declaration for the vector array:
Code:
type REG_ARRAY is array (0 to 4) of STD_LOGIC_VECTOR (31 downto 0); signal reg1 : REG_ARRAY; signal reg2 : REG_ARRAY; signal reg3 : REG_ARRAY; signal reg4 : REG_ARRAY;

I know there are values stored to the register because I output them to a ram and I can read them. However, when i try this it gives me all zeros, instead of just shifting the values from one register to another.

Code:
FOR i IN 0 to 4 LOOP reg1(i) <= reg2(i); reg2(i) <= reg3(i); reg3(i) <= reg4(i); END LOOP;

The FOR Loop is within a process, and the reg array's are not in the sensitivity list because if I put them in, every time I change one it goes back into the process and in the end assigns reg4 to all the registers.

Any idea why this doesn't work? Thanks


kenyandude
kenyandude is offline   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
VHDL sll shift question ohaqqi Hardware 4 09-29-2009 11:27 AM
Here's one, anyone have an answer? MF A+ Certification 9 01-04-2007 12:15 AM
"The biggest scandal to ever hit American politics" Jas DVD Video 149 12-05-2004 02:47 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