2选1数据选择器的VHDL描述

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

2选1数据选择器的VHDL描述ENTITYmux21aISPORT(a,b:INBIT;s:INBIT;y:OUTBIT);ENDENTITYmux21a;ARCHITECTUREoneOFmux21aISBEGINy=aWHENs='0'ELSEb;ENDARCHITECTUREone;译码器的设计architecturedec_behaveofe1issignalsel:std_logic_vector(0to3);beginsel(0)=en;sel(1)=a(0);sel(2)=a(1);sel(3)=a(2);withselselecty=00000001when1000,00000010when1001,00000100when1010,00001000when1011,00010000when1100,00100000when1101,01000000when1110,10000000when1111,00000000whenothers;enddec_behave;8-3优先编码器libraryIEEE;……;entityencoder83isport(ind:instd_logic_vector(7downto0);outd:outstd_logic_vector(2downto0));end;architecturebehaveofencoder83isbeginprocess(ind)beginifind(7)=‘1'thenoutd=111;elsifind(6)=‘1'thenoutd=110;elsifind(5)=‘1'thenoutd=101;elsifind(4)=‘1'thenoutd=100;elsifind(3)=‘1'thenoutd=011;elsifind(2)=‘1'thenoutd=010;elsifind(1)=‘1'thenoutd=001;elsifind(0)=‘1'thenoutd=000;elseoutd=000;endif;endprocess;endbehave;

1 / 8
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功