欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    (PLD可编程逻辑器件]d应用程序举例.pdf

    • 资源ID:73492129       资源大小:733.43KB        全文页数:54页
    • 资源格式: PDF        下载积分:11.9金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要11.9金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    (PLD可编程逻辑器件]d应用程序举例.pdf

    (PLDPLD 可编程逻辑器件)可编程逻辑器件)d d应用程序举例应用程序举例PLD 段码显示library ieee;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_1164.all;entity duanma isentity duanma isport(fff:out bit_vector(1 to 5);port(fff:out bit_vector(1 to 5);aaa:out bit_vector(1 to 5);aaa:out bit_vector(1 to 5);end;end;architecture kk of duanma isarchitecture kk of duanma isbeginbeginfff(1 to 5)=11111;fff(1 to 5)=11111;aaa(1 to 5)=11111;aaa(1 to 5)=11111;end;end;PLDPLD 三个数加法编程三个数加法编程library ieee;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_1164.all;entity jw isentity jw isport(in1,in2:in integer range 0 to 15;port(in1,in2:in integer range 0 to 15;a,b:out std_logic_vector(1 to 7);a,b:out std_logic_vector(1 to 7);end;end;architecture gg of jw isarchitecture gg of jw issignal he:integer range 0 to 45;signal he:integer range 0 to 45;beginbeginhe=in1+in2;he=in1+in2;with he selectwith he selecta=1111110 when 0|10|20|30|40,a=1111110 when 0|10|20|30|40,0110000 when 1|11|21|31|41,0110000 when 1|11|21|31|41,1101101 when 2|12|22|32|42,1101101 when 2|12|22|32|42,1111001 when 3|13|23|33|43,1111001 when 3|13|23|33|43,0110011 when 4|14|24|34|44,0110011 when 4|14|24|34|44,1011011 when 5|15|25|35|45,1011011 when 5|15|25|35|45,1011111 when 6|16|26|36,1011111 when 6|16|26|36,1110000 when 7|17|27|37,1110000 when 7|17|27|37,1111111 when 8|18|28|38,1111111 when 8|18|28|38,1111011 when 9|19|29|39,1111011 when 9|19|29|39,0000000 when others;0000000 when others;with he selectwith he selectb=0000000 when 0=he andb=0000000 when 0=he andhe=9,elsehe=9,else0110000 when 10=he and0110000 when 10=he andhe=19,elsehe=19,else1101101 when 20=he and1101101 when 20=he andhe=29,elsehe=29,else1111001 when 30=he and1111001 when 30=he andhe=39,elsehe=39,else0110011 when 40=he and0110011 when 40=he andhe=39,elsehe=39,else0000000 when others;0000000 when others;end;end;PLDPLD 八个按键两个灯八个按键两个灯library ieee;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_1164.all;entity guozi3 isentity guozi3 isport(in1,in2:in std_logic_vector(1 toport(in1,in2:in std_logic_vector(1 to4);4);a,b:out std_logic_vector(1 to 8);a,b:out std_logic_vector(1 to 8);end;end;architecture gg of guozi3 isarchitecture gg of guozi3 isbeginbeginwith in1 selectwith in1 select0110000 when 0001,0110000 when 0001,1101101 when 0010,1101101 when 0010,1111001 when 0011,1111001 when 0011,0110011 when 0100,0110011 when 0100,1011011 when 0101,1011011 when 0101,1011111 when 0110,1011111 when 0110,1110000 when 0111,1110000 when 0111,1111111 when 1000,1111111 when 1000,1111011 when 1001,1111011 when 1001,0000000 when others;0000000 when others;with in2 selectwith in2 selectb=0110000when 0001,b=0110000when 0001,1101101 when 0010,1101101 when 0010,1111001 when 0011,1111001 when 0011,0110011 when 0100,0110011 when 0100,1011011 when 0101,1011011 when 0101,1011111 when 0110,1011111 when 0110,1110000 when 0111,1110000 when 0111,1111111 when 1000,1111111 when 1000,1111011 when 1001,1111011 when 1001,0000000 when others;0000000 when others;end;end;PLDPLD 顺序语句编程顺序语句编程(0(0 加到加到 9)9)library ieee;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_1164.all;entity jinchen isentity jinchen isport(in1:in std_logic;port(in1:in std_logic;a:out std_logic_vector(1 to 7);a:out std_logic_vector(1 to 7);end;end;architecture gg of jinchen isarchitecture gg of jinchen issignal ss:integer range 0 to 9;signal ss:integer range 0 to 9;beginbeginprocessprocessbeginbeginwait until in1=1;wait until in1=1;ss=ss+1;ss=ss+1;if ss=10 thenif ss=10 thenss=0;ss=0;end if;end if;end process;end process;with ss selectwith ss selecta=1111110 when 0,a=1111110 when 0,0110000 when 1,0110000 when 1,1101101 when 2,1101101 when 2,1111001 when 3,1111001 when 3,0110011 when 4,0110011 when 4,1011011 when 5,1011011 when 5,1011111 when 6,1011111 when 6,1110000 when 7,1110000 when 7,1111111 when 8,1111111 when 8,1111011 when 9,1111011 when 9,0000000 when others;0000000 when others;end;end;PLDPLD 矢量矢量 1010 个控制个控制 2 2 个数码管个数码管library ieee;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_1164.all;entity kongzhi2 isentity kongzhi2 isport(a:out bit_vector(1 to 7);port(a:out bit_vector(1 to 7);b:in b:inbit_vector(1 to 10);bit_vector(1 to 10);end;end;architecture ff of kongzhi2 isarchitecture ff of kongzhi2 isbeginbegin a=1111110 a=1111110when b=1000000000elsewhen b=1000000000else01100000110000whenwhenb=0100000000elseb=0100000000else11011011101101when b=0010000000elsewhen b=0010000000else11110011111001when b=1001000000elsewhen b=1001000000else01100110110011when b=1000100000elsewhen b=1000100000else10110111011011when b=1000010000elsewhen b=1000010000else10111111011111when b=1000001000elsewhen b=1000001000else11100001110000when b=1000000100elsewhen b=1000000100else11111111111111when b=1000000010elsewhen b=1000000010else11100111110011when b=1000000001elsewhen b=1000000001else0000000;0000000;end;end;PLDPLD 晶振晶振 50M50M 控制数码管控制数码管library ieee;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_1164.all;entity jinzheng isentity jinzheng isport(in50m:in std_logic;port(in50m:in std_logic;a:out std_logic_vector(1 to 7);a:out std_logic_vector(1 to 7);end;end;architecture gg of jinzheng isarchitecture gg of jinzheng issignal in1:std_logic;signal in1:std_logic;signal ss:integer range 0 to 9;signal ss:integer range 0 to 9;signal count:integer range 0 tosignal count:integer range 0 to25000000;25000000;beginbeginprocessprocessbeginbeginwait until in50m=1;wait until in50m=1;count=count+1;count=count+1;if count=25000000 thenif count=25000000 thencount=0;count=0;in1=not in1;in1=not in1;end if;end if;end process;end process;processprocessbeginbeginwait until in1=1;wait until in1=1;ss=ss+1;ss=ss+1;if ss=10 thenif ss=10 thenss=0;ss=0;end if;end if;end process;end process;with ss selectwith ss selecta=1111110 when 0,a=1111110 when 0,0110000 when 1,0110000 when 1,1101101 when 2,1101101 when 2,1111001 when 3,1111001 when 3,0110011 when 4,0110011 when 4,1011011 when 5,1011011 when 5,1011111 when 6,1011111 when 6,1110000 when 7,1110000 when 7,1111111 when 8,1111111 when 8,1111011 when 9,1111011 when 9,0000000 when others;0000000 when others;end;end;PLDPLD 晶振晶振 50M50M 自动跳变程序(自动跳变程序(0 0 到到 5959)library ieee;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_1164.all;entity jiadxx isentity jiadxx isport(in50m:in std_logic;port(in50m:in std_logic;a,b:out std_logic_vector(1 to 7);a,b:out std_logic_vector(1 to 7);end;end;architecture gg of jiadxx isarchitecture gg of jiadxx issignal in1:std_logic;signal in1:std_logic;signal t,g:integer range 0 to 9;signal t,g:integer range 0 to 9;signal count:integer range 0 to 59signal count:integer range 0 to 5925000000;25000000;beginbeginprocessprocessbeginbeginwait until in50m=1;wait until in50m=1;count=count+1;count=count+1;if count=25000000 thenif count=25000000 thencount=0;count=0;in1=not in1;in1=not in1;end if;end if;end process;end process;processprocessbeginbeginwait until in1=1;wait until in1=1;g=g+1;g=g+1;if g=9 thenif g=9 thenif g=5 thenif g=5 theng=0;g=0;t=t+1;t=t+1;if t=5 thenif t=5 thent=0;t=0;end if;end if;end if;end if;end process;end process;with g selectwith g selecta=1111110 when 0,a=1111110 when 0,0110000 when 1,0110000 when 1,改变变量改变变量1101101 when 2,1101101 when 2,1111001 when 3,1111001 when 3,0110011 when 4,0110011 when 4,1011011 when 5,1011011 when 5,1011111 when 6,1011111 when 6,1110000 when 7,1110000 when 7,1111111 when 8,1111111 when 8,1111011 when 9,1111011 when 9,0000000 when others;0000000 when others;with t selectwith t selectb=1111110 when 0,b=1111110 when 0,0110000 when 1,0110000 when 1,1101101 when 2,1101101 when 2,1111001 when 3,1111001 when 3,0110011 when 4,0110011 when 4,1011011 when 5,1011011 when 5,1011111 when 6,1011111 when 6,1110000 when 7,1110000 when 7,1111111 when 8,1111111 when 8,1111011 when 9,1111011 when 9,0000000 when others;0000000 when others;end;end;PLDPLD(1-81-8 数码管显示)第六个显示数码管显示)第六个显示 0 0library ieee;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_1164.all;entity jiadxx isentity jiadxx isport(a:out std_logic_vector(1 to 7);port(a:out std_logic_vector(1 to 7);b:out std_logic_vector(1 to 3);b:out std_logic_vector(1 to 3);end;end;architecture kk of jiadxx isarchitecture kk of jiadxx isbeginbegina=1111110;a=1111110;-显示的数“显示的数“0 0”b=010;b=010;-显示的位“第显示的位“第 6 6 位”位”end;end;PLDPLD 动态间隔动态间隔 1 1 秒闪烁秒闪烁library ieee;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_1164.all;entity jiadxx isentity jiadxx isport(in50m:in std_logic;port(in50m:in std_logic;b:out std_logic_vector(1 to 3);b:out std_logic_vector(1 to 3);a:out std_logic_vector(1 to 7);a:out std_logic_vector(1 to 7);end;end;architecture gg of jiadxx isarchitecture gg of jiadxx issignalsignalcount:integer range 0 tocount:integer range 0 to25000000;25000000;signal count_one:integer range 0 to 1;signal count_one:integer range 0 to 1;signal one_hz:std_logic;signal one_hz:std_logic;beginbeginprocessprocessbeginbeginwait until in50m=1;wait until in50m=1;count=count+1;count=count+1;if count=25000000 thenif count=25000000 thencount=0;count=0;one_hz=not one_hz;one_hz=not one_hz;end if;end if;end process;end process;processprocessbeginbeginwait until one_hz=1;wait until one_hz=1;count_one=count_one+1;count_one=count_one+1;if count_one=0 thenif count_one=0 thenb=000;b=000;elseelseb=001;b=001;end if;end if;end process;end process;a=1111110;a=1111110;end;end;PLDPLD 动态显示动态显示 0 01 1library ieee;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_1164.all;entity dz1121 isentity dz1121 isport(in50m:in std_logic;port(in50m:in std_logic;a:out std_logic_vector(1 to 7);a:out std_logic_vector(1 to 7);b:out std_logic_vector(1 to 3);b:out std_logic_vector(1 to 3);end;end;architecture gg of ningyi isarchitecture gg of ningyi issignal in1:std_logic;signal in1:std_logic;signal count_c:integer range 0 to 3;signal count_c:integer range 0 to 3;signal count:integer range 0 to 2500;signal count:integer range 0 to 2500;beginbeginprocessprocessbeginbeginwait until in50m=1;wait until in50m=1;count=count+1;count=count+1;if count=2500 thenif count=2500 thencount=0;count=0;in1=not in1;in1=not in1;end if;end if;end process;end process;processprocessbeginbeginwait until in1=1;wait until in1=1;count_c=count_c+1;count_c=count_c+1;if count_c=1 thenif count_c=1 thencount_c=0;count_c=0;end if;end if;end process;end process;withwithcount_c selectcount_c selecta=1111110when 0,a=1111110when 0,0110000when 10110000when 1,0000000when others;0000000when others;with count_c selectwith count_c selectb=000 when 0,b=000 when 0,001 when 1,001 when 1,111 when others;111 when others;end;end;PLDPLD 数码管显示数码管显示 0 07 7library ieee;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_1164.all;entity xian0-7 isentity xian0-7 isport(in50m:in std_logic;port(in50m:in std_logic;a:out std_logic_vector(1 to 7);a:out std_logic_vector(1 to 7);b:out std_logic_vector(1 to 3);b:out std_logic_vector(1 to 3);end;end;architecture gg of xian0-7 isarchitecture gg of xian0-7 issignal in1:std_logic;signal in1:std_logic;signal count_c:integer range 0 to 7;signal count_c:integer range 0 to 7;signal count:integer range 0 to 2500;signal count:integer range 0 to 2500;beginbeginprocessprocessbeginbeginwait until in50m=1;wait until in50m=1;count=count+1;count=count+1;if count=2500 thenif count=2500 thencount=0;count=0;in1=not in1;in1=not in1;end if;end if;end process;end process;processprocessbeginbeginwait until in1=1;wait until in1=1;count_c=count_c+1;count_cbb=000;a=1111110;abb=001;a=0110000;abb=010;a=1101101;abb=011;a=1111001;abb=100;a=0110011;abb=101;a=1011011;abb=110;a=1011111;abb=111;a=1110000;a=1110000;if count_c=7 thenif count_c=7 thencount_c=0;count_c=0;end if;end if;end case;end case;end process;end process;end;end;PLDPLD 时钟显示时钟显示library ieee;library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_1164.all;entity shizon isentity shizon isport(in50m:std_logic;port(in50m:std_logic;a:out std_logic_vector(1 to 7);-a:out std_logic_vector(1 to 7);-段码段码b:out std_logic_vector(1 to 3);-b:out std_logic_vector(1 to 3);-位码位码end;end;architecture ff of shizon isarchitecture ff of shizon issignal count:integer range 0 to 250;-signal count:integer range 0 to 250;-整数定义整数定义signal count_s:integer range 0 tosignal count_s:integer range 0 to25000;-25000;-半秒定义半秒定义signalsignalg1,g2,s1,s2,b1,b2:std_logic_vector(1g1,g2,s1,s2,b1,b2:std_logic_vector(1to 7);-to 7);-变量范围变量范围signal one_hz:std_logic;-signal one_hz:std_logic;-定义定义 1 1 赫兹信赫兹信号号signal one_s:std_logic;signal one_s:std_logic;signal x:integer range 0 to 7;-signal x:integer range 0 to 7;-signalsignalgg1,gg2,ss1,ss2,bb1,bb2:integergg1,gg2,ss1,ss2,bb1,bb2:integerrange 0 to 9;range 0 to 9;beginbeginprocessprocessbeginbeginwait until in50m=1;wait until in50m=1;count=count+1;count=count+1;if count=250 thenif count=250 thencount=0;count=0;one_hz=not one_hz;one_hz=not one_hz;end if;end if;end process;end process;processprocessbeginbeginwait until in50m=1;wait until in50m=1;count_s=count_s+1;count_s=count_s+1;if count_s=25000 thenif count_s=25000 thencount_s=0;count_s=0;one_s=not one_s;one_s=not one_s;end if;end if;end process;end process;processprocessbeginbeginwait until one_hz=1;wait until one_hz=1;x=x+1;xbb=000;a=g1;abb=001;a=g2;abb=010;a=0000001;abb=011;a=s1;abb=100;a=s2;abb=101;a=0000001;abb=110;a=b1;abb=111;a=b2;a=b2;x=0;x=0;end case;end case;end process;end process;processprocessbeginbeginwait until one_s=1;wait until one_s=1;gg1=gg1+1;gg1=gg1+1;if gg1=9 thenif gg1=9 thengg1=0;gg1=0;gg2=gg2+1;gg2=gg2+1;if gg2=5 thenif gg2=5 thengg2=0;gg2=0;ss1=ss1+1;ss1=ss1+1;if ss1=9 thenif ss1=9 thenss1=0;ss1=0;ss2=ss2+1;ss2=ss2+1;if ss2=5 thenif ss2=5 thenss2=0;ss2=0;bb1=bb1+1;bb1=bb1+1;if bb1=9 thenif bb1=9 thenbb1=0;bb1=0;bb2=bb2+1;bb2=bb2+1;end if;end if;if bb1=3 and bb2=2 thenif bb1=3 and bb2=2 thenbb1=0;bb1=0;bb2=0;bb2=0;end if;end if;end if;end if;end if;end if;end if;end if;end if;end if;end process;end process;with gg1 selectwith gg1 selectg1=1111110 when 0,g1=1111110 when 0,0110000 when 1,0110000 when 1,1101101 when 2,1101101 when 2,1111001 when 3,1111001 when 3,0110011 when 4,0110011 when 4,1011011 when 5,1011011 when 5,1011111 when 6,1011111 when 6,1110000 when 7,1110000 when 7,1111111 when 8,1111111 when 8,1111011 when 9,1111011 when 9,0000000 when others;0000000 when others;with gg2 selectwith gg2 selectg2=1111110 when 0,g2=1111110 when 0,0110000 when 1,0110000 when 1,1101101 when 2,1101101 when 2,1111001 when 3,1111001 when 3,0110011 when 4,0110011 when 4,1011011 when 5,1011011 when 5,0000000 when others;0000000 when others;with ss1 selectwith ss1 selects1=1111110 when 0,s1=1111110 when 0,0110000 when 1,0110000 when 1,1101101 when 2,1101101 when 2,1111001 when 3,1111001 when 3,0110011 when 4,0110011 when 4,1011011 when 5,1011011 when 5,1011111 when 6,1011111 when 6,1110000 when 7,1110000 when 7,1111111 when 8,1111111 when 8,1111011 when 9,1111011 when 9,0000000 when others;0000000 when others;with ss2 selectwith ss2 selects2=1111110 when 0,s2=1111110 when 0,0110000 when 1,0110000 when 1,1101101 when 2,1101101 when 2,1111001 when 3,1111001 when 3,

    注意事项

    本文((PLD可编程逻辑器件]d应用程序举例.pdf)为本站会员(w***)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开