网站导航网学 原创论文 原创专题 网站设计 最新系统 原创论文 论文降重 发表论文 论文发表 UI设计定制 论文答辩PPT格式排版 期刊发表 论文专题
返回网学首页
网学原创论文
最新论文 推荐专题 热门论文 论文专题
当前位置: 网学 > 设计资源 > FPGA > 正文

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

论文降重修改服务、格式排版等 获取论文 论文降重及排版 论文发表 相关服务
                            --正弦波、三角波、锯齿波
    if count0=4999999 then counter:=conv_integer(amp)*1961;
    count0:=0; bcd01<=0; bcd11<=0; bcd21<=0; bcd31<=0;
    elsif count0=4999000 then bcd00<=bcd01; bcd10<=bcd11; bcd20<=bcd21;
    bcd30<=bcd31; count0:=count0+1;
    else count0:=count0+1;
    if counter>99999 then counter:=counter-100000; bcd01<=bcd01+1;
    elsif counter>9999 then counter:=counter-10000; bcd11<=bcd11+1;
    elsif counter>999 then counter:=counter-1000; bcd21<=bcd21+1;
    elsif counter>99 then counter:=counter-100; bcd31<=bcd31+1;
    else null;
    end if;
    end if;
    end if;
    end if;
    end process;
    process(clk)                             --输出波形幅度(峰-峰值)数据译码动态显示
    variable count : integer range 0 to 499999;
    begin
    if rising_edge(clk) then
    if count<=124999 then y<=bcd00; count:=count+1; shift<="0111"; lcd(0)<='0';
    elsif count<=249999 then y<=bcd10; count:=count+1; shift<="1011";lcd(0)<='1';
    elsif count<=374999 then y<=bcd20; count:=count+1; shift<="1101";lcd(0)<='1';
    elsif count<499999 then y<=bcd30; count:=count+1; shift<="1110";lcd(0)<='1';
    elsif count=499999 then y<=bcd30; count:=0; shift<="1110";lcd(0)<='1';
    end if;
    end if;
    case y is                               --7段码译码
    when 0 => lcd(7 downto 1)<="0000001";
    when 1 => lcd(7 downto 1)<="1001111";
    when 2 => lcd(7 downto 1)<="0010010";
    when 3 => lcd(7 downto 1)<="0000110";
    when 4 => lcd(7 downto 1)<="1001100";
    when 5 => lcd(7 downto 1)<="0100100";
    when 6 => lcd(7 downto 1)<="0100000";
    when 7 => lcd(7 downto 1)<="0001111";
    when 8 => lcd(7 downto 1)<="0000000";
    when 9 => lcd(7 downto 1)<="0000100";
    when others => lcd(7 downto 1)<="0000001";
    end case;
    end process;
    ym:process(clk)                  --正弦波在一个周期内时域上的64个采样点的波形数据
    begin
    if rising_edge(clk) then
    case f is
    when "00000000"=> d<="11111111"  ; when "00000001"=> d<="11111110"  ;
    when "00000010"=> d<="11111100"  ;when "00000011"=> d<="11111001"  ;
    when "00000100"=> d<="11110101"  ; when "00000101"=> d<="11101111"  ;
    when "00000110"=> d<=&quo
  • 下一篇资讯: 电子时钟VHDL程序与仿真
  • 设为首页 | 加入收藏 | 网学首页 | 原创论文 | 计算机原创
    版权所有 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2020 myeducs.Cn www.myeducs.Cn All Rights Reserved 湘ICP备09003080号 常年法律顾问:王律师