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

Reply

VHDL - Help! FIR Filter - MATLAB fdatool - VHDL

 
Thread Tools Search this Thread
Old 01-08-2006, 03:14 PM   #1
Default Help! FIR Filter - MATLAB fdatool - VHDL


Hi,

I designed a 7th order FIR filter using MATLAB fdatool and obtained the
VHDL code using the HDL Coder. I think that in the following part of
the code there is a problem (Delay pipe line is an 8 element array,
whose elements are 16 bit vectors. filter_in is a 16 bit vector):

IF reset = '1' THEN
delay_pipeline(0 TO 7) <= (OTHERS => (OTHERS => '0'));
ELSIF clk'event AND clk = '1' THEN
IF clk_enable = '1' THEN
delay_pipeline(0) <= signed(filter_in);
delay_pipeline(1 TO 7) <= delay_pipeline(0 TO 6);
END IF;
END IF;

This part simply shifts previous inputs and should be saving the new
input (filter_in) into delay_pipeline(0) (which it does). However,
after delay_pipeline(0) <= signed(filter_in);, it says delay_pipeline(1
TO 7) <= delay_pipeline(0 TO 6);. As far as I know, the statements in a
process are sequential. So, if you change delay_pipeline(0) right at
the beginning, isn't the old value of delay_pipeline(0) totally gone?
Because, afterwards delay_pipeline(0) (its new value) is assigned to
delay_pipeline(1).

I think that the order of the statements needs to be changed like:

delay_pipeline(1 TO 7) <= delay_pipeline(0 TO 6);
delay_pipeline(0) <= signed(filter_in); so that the seven previous
inputs are stored in the array elements with indices from 1 to 7 and
the new(current) input is stored in the element with index 0.

I couldn't be sure. Can anyone help me? It is very crucial to me that I
understand it correctly.

Thanks in advance...

Emel



Emel
  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
How to execute an external software from VHDL? And how to interface VHDL with JAVA? becool_nikks Software 0 03-06-2009 07:08 PM
Vending machine using VHDL arie General Help Related Topics 0 03-05-2009 05:45 AM
reading mp3 file in binary format in vhdl latheesh General Help Related Topics 0 02-05-2008 05:40 AM
Help on auto conversion from Matlab to vhdl on filter design hardheart Hardware 0 12-07-2007 09:19 AM
ARRAY(n DOWNTO 0) OF STD_LOGIC_VECTOR(m DOWNTO 0) - VHDL freitass Hardware 0 11-01-2007 03:44 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