⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stage_i.vhd

📁 an implementation of fft 1024 with cos and sin generated by matlab.
💻 VHD
字号:
 -- onent for Stages using BF2I (if BF2I is Comp the last stage) --Input is a standard logic vector of data_width-add_g --data_width - width of the internal busses -- 1, if 0 then  - if 1, data_width grows by--add_g - Add growth variable--0 --Component for Stages using BF2I (first and every odd stage) --Doesn't handle last stage  --Input is a standard logic vector ofdata_width-add_g --data_width - width of the internal busses  --add_g - Add growth variable - if 1, data1, if 0 then _width grows by 0--ster stages -shif  regi- t_stages - number of shiftlibrary IEEE; use IEEE.std_logic_1164.all; use ieee.std_logic_arith.all; entity stage_I is generic  (  data_width : INTEGER :=13;      add_g : INTEGER := 1;		shift_stages : INTEGER :=32 );   port  (  prvs_r :in std_logic_vector(data_width-1-add_g downto 0);          prvs_i :in std_logic_vector(data_width-1-add_g downto 0);           s :in std_logic;           clock : in std_logic;          resetn : in std_logic;           tonext_r :out std_logic_vector(data_width-1 downto 0);              tonext_i :out std_logic_vector(data_width-1 downto 0)               );  end stage_I; architecture structure of stage_I is signal toreg_r : std_logic_vector(data_width-1 downto 0);signal toreg_i : std_logic_vector(data_width-1 downto 0); signal fromreg_r :std_logic_vector(data_width-1 downto 0);  signal fromreg_i :   std_logic_vector(data_width-1 downto 0); component shiftregN    generic (data_width : integer; n:integer);   port (clock : IN std_logic;          read_data  : OUT    std_logic_vector (data_width-1 DOWNTO 0);          write_data : IN     std_logic_vector (data_width-1 DOWNTO 0);          resetn     : IN     std_logic          ); end component;  component BF2I    generic (data_width : INTEGER;            add_g: INTEGER);     port    (fromreg_r :in std_logic_vector(data_width-1 downto 0);             fromreg_i :in std_logic_vector(data_width-1 downto 0);             prvs_r :in std_logic_vector(data_width-add_g-1 downto 0);            prvs_i :in std_logic_vector(data_width-add_g-1 downto 0);            s : in std_logic;            toreg_r :out std_logic_vector(data_width-1 downto 0);               toreg_i :out std_logic_vector(data_width-1 downto 0);                 tonext_r :out std_logic_vector(data_width-1 downto 0);              tonext_i :out std_logic_vector(data_width-1 downto 0)); end component;  begin regr : shiftregN     generic map (data_width=>data_width, n=>shift_stages)  port map (clock=>clock, read_data=>fromreg_r,             write_data=>toreg_r, resetn=>resetn);regi : shiftregN   generic map (data_width=>data_width, n=>shift_stages)   port map (clock=>clock, read_data=>fromreg_i,      write_data=>toreg_i, resetn=>resetn);btrfly : BF2I generic map (data_width=>data_width, add_g=>add_g)     port map (  fromreg_r=>fromreg_r, fromreg_i=>fromreg_i, prvs_r=>prvs_r, prvs_i=>prvs_i,   s=>s,          toreg_r=>toreg_r, toreg_i=>toreg_i,     tonext_r=>tonext_r, tonext_i=>tonext_i); end; 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -