0

私のデザインでは、Spartan 3E XC35100E デバイスを使用しています。合計 4 つの MUX を使用できます。ただし、3 つの * 記号と FFT ブロック (これも 3 つの MUX を使用) を使用しているにもかかわらず、設計の概要では 1 つの MUX しか使用しないと指定されています。FFT ブロックの MUX の代わりに CLB ロジックを使用した場合でも、デザインの概要は同じです。

実装とシミュレーションは問題なく実行できます。では、なぜ私が使用する MUX の数がこれほど少ないのでしょうか? どんな助けでも大歓迎です。

関連するライブラリ、ポート マップ、および信号宣言は、簡潔にするために除外されています。

process (clk) 
 variable fsm : integer range 0 to 3:= 0;
 variable i : integer range 0 to 127:= 0; 
begin

if rising_edge(clk) then
    if fsm = 0 then
        tasiyici <= STD_LOGIC_VECTOR(to_signed(sample_1(i)* sample_2(i) , 16));
 --sample1 and sample 2 are arrays with constant values
        fsm := fsm +1;


    elsif fsm = 1 then
        wea_select <= '0';
        wea_ram<= "1";
        ram_write <= '0';
        dina <= STD_LOGIC_VECTOR(tasiyici(15 downto 8));
        mult_out<= STD_LOGIC_VECTOR(tasiyici(15 downto 8));
        fsm := fsm +1;

    elsif fsm = 2 then
        address_write <= std_logic_vector(unsigned(addra) + 1);
        wea_ram<= "0";
        i := i+1 ;
        if i=128 then
            fsm:=3;
            ram_write <= '1';
            wea_select <= '1';
        else
            fsm := 0;
        end if;

    end if;

end if;

end process;


----FFT process---
process(clk) 
variable fsm : integer range 0 to 7:= 0;
variable i : integer range 0 to 128; 
variable counter : integer range 0 to 2:= 0;
variable j : integer range 0 to 512; 

begin
if rising_edge(clk)  then

    if fsm = 0 then  -- ram_write is control 
        if ram_write = '1' then 
            wea_fft <= "0";
            fsm:= 1;
        end if;

    elsif fsm = 1 then --process start (pulse)
        start <= '1';
        fwd_inv_we <= '1';
        fsm := fsm +1;

    elsif fsm = 2 then
            start <= '0';
            fwd_inv_we <= '0';
            fsm := fsm +1;

    elsif fsm =3 then --128 cycle send data from douta to xn_re
        if i= 128 then
            fsm := fsm +1;
        else
            xn_re <= douta;
            address_read <= std_logic_vector(unsigned(addra) + 1);
            i:=i+1;
            fsm := 3;
        end if;

     elsif fsm =4 then --all data sent. process complete
        if done = '1'  then --wait for done finish 3 clk cycle, then unload
            if counter= 2 then
                fsm := fsm +1;
            else
                counter := counter +1;
                fsm :=4;
            end if;
        end if;

    elsif fsm =5 then
        counter := 0;
        unload <= '1';
        fsm := fsm +1;
        fft_data_ready <= "1";      
        wea_fft<= "1";


    elsif fsm =6 then --wait 512 clk cycle to read all outputs
        unload <= '0';
        wea_fft<= "0";

        if dv = '1' then

  fft_output <=  std_logic_vector(signed(xk_re(15 downto 4))*signed(xk_re(15 downto 4))
                               +signed(xk_im(15 downto 4))*signed(xk_im(15 downto 4)));             
            if j=512 then 
                fsm:=fsm+1;
            else
            j:=j+1;
            fsm:=6;
            end if;
        else
            fsm:=6;
        end if;
    end if;
end if;
end process;
4

1 に答える 1

0

あなたのデザインは単に最適化されているようです。

合成された RTL をチェックして、デザインが意図したとおりに合成されていることを確認する必要があります。

于 2014-10-23T10:20:52.607 に答える