电子文章 | 电子资料下载 | 家电维修 | 维修资料下载 | 加入收藏 | 全站地图
您现在所在位置:电子爱好者电子文章FPGA多功能波形发生器VHDL程序与仿真

多功能波形发生器VHDL程序与仿真

11-20 16:14:56 | http://www.5idzw.com | FPGA | 人气:518
标签:fpga是什么,fpga教程,fpga培训,http://www.5idzw.com 多功能波形发生器VHDL程序与仿真,http://www.5idzw.com

                  if addr<63 then dd<=ram(addr); addr<=addr+1;

                  elsif addr=63 then dd<=ram(63); addr<=0;

                  end if;

                else                                  --完成5种波形的线形叠加

                           if sss(1)='1' then

                    if con<=z then con<=con+1;

dd0:=conv_integer(amp0);      --方波波形数据dd0

                             else con<=con+1; dd0:=0;

                    end if;

                              end if;

                  if sss(4)='1' then dd1:=conv_integer(d);        --正弦波波形数据dd1

                  end if;

                  if sss(2)='1' then dd2:=conv_integer(f(5 downto 0)&"00");

                                                          --锯齿波波形数据dd2

                  end if;           

                              if sss(3)='1' then

                    if f>31 then dd3:=conv_integer(("111111"-f(5 downto 0))&"00");

                    else dd3:=conv_integer(f(5 downto 0)&"00"); --三角波波形数据dd3

                    end if;

                  end if;

                  if sss(0)='1' then

                    if addr<63 then dd4:=conv_integer(ram(addr)); addr<=addr+1;

                    elsif addr=63 then dd4:=conv_integer(ram(63)); addr<=0;

                    end if;                                --任意波波形数据dd4

                  end if;

                         ddd:=conv_std_logic_vector((dd0+dd1+dd2+dd3+dd4),10);

--波形线形叠加输出

                            dd<=ddd(9 downto 2);

                end if;

              else count:=count+1;

              end if;

            end if;

          else

            if coun0<qqq then coun0<=coun0+tmp; c<=c+1;

            else

              if count3<=c/2 then count3:=count3+1; dd<=amp0;

              elsif count3=c then count3:=1;dd<="00000000";

              else count3:=count3+1; dd<="00000000";

              end if;

上一页  [1] [2] [3] [4] [5] [6]  下一页

,多功能波形发生器VHDL程序与仿真
关于《多功能波形发生器VHDL程序与仿真》的更多文章