реклама на сайте
подробности

 
 
> CIC фильтры
feex
сообщение Mar 25 2008, 22:49
Сообщение #1


Участник
*

Группа: Новичок
Сообщений: 16
Регистрация: 22-04-07
Пользователь №: 27 237



всем привет.
нужно какое-нибудь vhdl-описание данных фильтров. кто-нибудь знает, где его можно откопать?
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
alex_os
сообщение Mar 26 2008, 08:14
Сообщение #2


Знающий
****

Группа: Свой
Сообщений: 521
Регистрация: 12-05-06
Пользователь №: 17 030



Цитата(feex @ Mar 26 2008, 01:49) *
всем привет.
нужно какое-нибудь vhdl-описание данных фильтров. кто-нибудь знает, где его можно откопать?

a чего там делать? Один аккумулятор один регистр и один вычитатель?
Типа такого (это интерполятор 3го порядка):
Код
library ieee;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
use work.tx_dvbt.all;  

entity CIC_filtr is
port
(
        reset:   in std_logic;
        clk:     in std_logic;     
        
        in_re:  in std_logic_vector(11 downto 0);
        in_im:  in std_logic_vector(11 downto 0);
        in_ena: in std_logic;
                
        out_re: out std_logic_vector(15 downto 0);
        out_im: out std_logic_vector(15 downto 0)
                
);
end CIC_filtr;

architecture cic_a of CIC_filtr is
     constant P: integer:=3; -- CIC order

     type tWordArray is array (integer range<>) of std_logic_vector(15 downto 0);
    
     signal dstages_re: tWordArray(0 to P-1);
     signal dstages_im: tWordArray(0 to P-1);
    
     signal astages_re: tWordArray(0 to P);
     signal astages_im: tWordArray(0 to P);
         
     signal outd_re:  tWordArray(0 to P);
     signal outd_im:  tWordArray(0 to P);
    
    
    
begin
    G1:
    for k in 0 to P-1 generate
            sub16re_insts:
            sub16 port map
            (
                    aclr => reset,
                    clock => clk,
                    dataa => outd_re(k),
                    datab    => dstages_re(k),
                    result=> outd_re(k+1)
            );
            
            sub16im_insts:
            sub16 port map
            (
                aclr => reset,
                    clock => clk,
                    dataa => outd_im(k),
                    datab    => dstages_im(k),
                    result=> outd_im(k+1)
            );
            
            acc16re_insts:
            acc16 port map
            (
                aclr => reset,             
                    clock => clk,
                    data=> astages_re(k),  
                    result=> astages_re(k+1)
            );

            acc16im_insts:
            acc16 port map
            (
            aclr => reset,             
                clock => clk,
                data=> astages_im(k),  
                result=> astages_im(k+1)
            );
            
    end generate G1;


        diff_stages:
        process(clk, reset)
        begin
            if reset='1' then
                
                for i in 0 to P-1 loop
                    dstages_re(i)<=(others=>'0');                 
                    dstages_im(i)<=(others=>'0');                                     
        --            astages_re(i)<=(others=>'0');                 
        --            astages_im(i)<=(others=>'0');                                         
                end loop;
                                
                outd_re(0) <= (others=>'0');
                outd_im(0) <= (others=>'0');
                
            else
            
                if in_ena='0' then
                    null;
                elsif rising_edge(clk) then
                
                    outd_re(0) <= in_re(11)&in_re(11)&in_re(11)&in_re(11)&in_re;
                    outd_im(0) <= in_im(11)&in_im(11)&in_im(11)&in_im(11)&in_im;
                    
                    for i in 0 to P-1 loop
                         dstages_re(i) <= outd_re(i);
                         dstages_im(i) <= outd_im(i);                          
                    end loop;    
                    
                    
                end if;
                
            end if;    
        end process;
        
        astages_re(0) <= outd_re(P) when in_ena='1' else
                                         (others=>'0');     
        
        astages_im(0) <=  outd_im(P) when in_ena='1' else
                                         (others=>'0');     
        
        out_re <= astages_re(P);
        out_im <= astages_im(P);
        
end architecture cic_a;


--------------------
ну не художники мы...
Go to the top of the page
 
+Quote Post



Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 17th June 2025 - 20:02
Рейтинг@Mail.ru


Страница сгенерированна за 0.01317 секунд с 7
ELECTRONIX ©2004-2016