- 1、本文档共200页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
我們曾舉過一個二輸入的與門電路的例子: Library ieee; Use ieee.std_logic_1164.all; Entity and2 is Port(d1,d2 : in std_logic; op : out std_logic); End and2; Architecture m1 of and2 is Begin op= ‘1’ when(d1=’1’ and d2=’1’)else ‘0’; End m1; Library ieee; Use ieee.std_logic_1164.all; Entity mux is Port(a,b,c : in bit; p1,p2 : in bit z : out bit); End and2; Architecture m1 of mux is Begin z= a when p1=‘1’ else b when p2=‘1’ else c; End m1; 允許有重疊 三、選擇式信號設置語句:With-Select-When With expression Select 賦值目標=運算式 When constant_value1 運算式 When constant_value2 … 運算式 When Others; 選擇式信號設置語句本身不能在進程中應用其功能與進程中 的CASE語句相同。 例:不允許有重疊現象;必須含蓋所有條件 Architecture m2 of and2 is Signal tmp : std_logic_vector(1 down to 0); Begin tmp=d1 d2; With tmp select f=’1’ when “11”; ‘0’ when others; End m2; When-else語句和With-select-When語句的差別 兩個語句的關鍵不同是:對於條件的要求程度不同,前者 要求較松,後者要求嚴格。 a With-select-When語句中When後的constant_value必須 是互不相同的; b 而When-else語句中When後的logic_expression則不需要這樣 的嚴格條件,因為其When後的logic_expression的優先權次序 為由先到後排列。 4.3 進程語句(process) Process 語句的格式為: [進程標號:] Process [(敏感信號列表)] [變數聲明] Begin 順序語句; End Process [進程標號]; 敏感表(Sensitivity list)包括進程的一些信號,當敏感表中的某個信號變化時進程才 被啟動,進程內的順序語句被執行。當進程結束時,進程內的輸出信號值被更新, 進程進入等待(睡眠)狀態,直到敏感表中的某一信號發生變化,進程被再次啟動。? 下麵舉一個應用示例,如下面電路: 用用不同VHDL語句對電路的描述如下: library ieee; use ieee.std_logic_1164.all; Entity exam1 is Port (a,b : in std_logic; c,d : out std_logic); End exam1; Architecture m1 of exam1 is Begin c=a and b; d=a or b ; End m1; architecture m2 of exam1 is begin process begin c=a and b; d= a or b ; end process; end m2; architecture m2 of exam1 is begin process begin c=a and b; d= a or b ; end process; end
您可能关注的文档
- C语言程序设计课件.pptx
- FORTRAN语言程序设计课件.pptx
- IllustratorCS实用教程课件.pptx
- MATLAB程序设计课件.pptx
- MATLAB基础及应用课件.pptx
- MATLAB语言与仿真设计课件.pptx
- SDH基本原理课件.ppt
- Solidworks产品造型基础课件.ppt
- UG数控技术课件.pptx
- VB程序设计课件.ppt
- DELIXI德力西电气CDM3E-1600S和CDM6Ei-1600S电子式塑壳上市文件包(1).pdf
- Shimano禧玛诺自行车RAWH002 WH-RS170-CL WH-RS171 WH-RS370 WH-RS770 车轮 经销商手册.pdf
- Razer雷蛇雷蛇安纳西梵蛛 RZ03-0055x 用户指南 (繁体中文)说明书用户手册.pdf
- Razer雷蛇塔洛斯魔蝎专业版 RZ07-03110 用户指南 (Russian)说明书用户手册.pdf
- 爱普生Epson SC-F2180 Garment Creator 操作手册大幅面打印机.pdf
- Shimano禧玛诺自行车FC0003 SM-BBR60 TL-FC34 曲柄 中轴 工具 经销商手册.pdf
- 爱普生EF-15E 设定手册多媒体液晶投影机.pdf
- DELIXI德力西电气CDM3E-1600S和CDM6Ei-1600S电子式塑壳上市文件包(2).pdf
- 米家领普温控器S1T使用说明书.pdf
- Razer雷蛇雷蛇魔音海妖迷你版 RZ19-03450 用户指南 (Russian)说明书用户手册.pdf
文档评论(0)