encounter 发表于 2010-6-28 01:09:20

问????????

本帖最后由 fpgaw 于 2010-7-7 05:36 编辑

v4 的DSP48s消耗什么资源?仅仅乘法消耗DSP48s 吗?

综合的时候参数设置选中DSP48s,模块1显示DSP48s为2

模块1需要例化10次得到模块2,此时消耗DSP48s为20

模块2和其他模块一起再次例化12次,此时消耗DSP48s为20*12=240消耗太多!!!

想改进模块1,使其消耗DSP48s 为0?怎么做?

模块1:
process(clk62m,reset)
begin
   if reset='0' then
    d_q <= (others => '0');
elsif(rising_edge(clk62m))then
    if d_p='1' then
    d_q <= -d_in;
   else
    d_q <= d_in;
   end if;
end if;
end process;

process(clk62m,reset)
begin
       if reset='0' then
      flag<='0';
                sum<=(others => '0');
      elsif(falling_edge(clk62m))then
            if(flag='1')then   
                sum<=sum+d_q;      
            else
               sum<=(others => '0');
            end if;
      
            if(clk5k='1')then
                flag<='1';
             sum<=sxt(d_q,30);
            end if;
      end if;
end process;

process(clk62m,reset)
begin
       if reset='0' then
                d_out1 <= (others => '0');
      elsif(rising_edge(clk62m))then
          d_out1<=d_q;
      end if;
end process;

process(clk5k,reset)
begin
       if reset='0' then
                d_out2 <= (others => '0');
      elsif(rising_edge(clk5k))then
          d_out2<=sum(29 downto 12);      
      end if;                  
end process;
页: [1]
查看完整版本: 问????????