




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、電子科技大學(xué)二零零四至二零零五學(xué)年第一學(xué)期(A)一、 填空題:(20分,每小題2分)1) 用VHDL語言進(jìn)行設(shè)計(jì)過程中一般要進(jìn)行仿真以判斷設(shè)計(jì)是否正確,在綜合前進(jìn)行的仿真稱為 功能仿真 ,綜合后進(jìn)行的仿真稱為 時(shí)序仿真 。2) CPLD和FPGA內(nèi)部結(jié)構(gòu)差別很大,一般CPLD是一種以 乘積項(xiàng) 方式構(gòu)成邏輯行為的器件,而一般FPGA則是以 查找表 方式構(gòu)成邏輯行為的器件。3) Altera公司的FLEX 10K系列器件的內(nèi)部結(jié)構(gòu)主要包括: 邏輯陣列塊(LAB) 、 嵌入式陣列塊() 、 I/O單元 和 快速通道互連 。4) VHDL語言中端口buffer和inout的主要區(qū)別是 buffer不能
2、接收外部的輸入信號,inout可實(shí)現(xiàn)雙向數(shù)據(jù)傳送 。5) 數(shù)字頻率計(jì)功能是測量被測信號的頻率,測量頻率的基本原理是: 1秒時(shí)間內(nèi) 代測信號的脈沖個(gè)數(shù) 。6) 在VHDL語法規(guī)則中變量只能在 進(jìn)程 和 子程序 中使用。7) EDA軟件中的綜合器的基本功能是: 將描述針對給定的硬件結(jié)構(gòu)進(jìn)行編譯、優(yōu)化、轉(zhuǎn)換和綜合最終獲得門級電路或更底層的電路描述文件 。8) 一般常用的VHDL描述風(fēng)格有三種,它們分別是: 行為描述 、 寄存器級描述(或數(shù)據(jù)流描述) 和 結(jié)構(gòu)描述 。9) 元件例化語句中的端口映射方式有_位置關(guān)聯(lián)_、_名字關(guān)聯(lián)_。10) CPLD的全稱是 Complex Programmable Lo
3、gic Devices(或復(fù)雜可編程邏輯器件) 、FPGA的全稱是 Field Programmable Gate Array(或現(xiàn)場可編程門陣列) 。二、 單項(xiàng)選擇題(14分,每小題2分)1) Altera公司的FLEX 10K系列器件采用的編程元件是 D 。A、 熔絲型開關(guān) B、 EPROM的編程元件 C、 EEPROM的編程元件 D、基于SRAM的編程元件2) 若a=1,b=2,下面程序執(zhí)行后,a和b的值分別為 B 。architecture rtl of entityName issignal a, b: integer;beginprocess (a, b) variable c:
4、integer;begina <=b ;c := a ;b <= c ;end process;end rtl ;A、1,2 B、 2,1 C、 1,1 D、 2, 2 3) 若S1為”1010”, S2為”0101”,下面程序執(zhí)行后,outValue輸出結(jié)果為: A 。library ieee;use ieee.std_logic_1164.all;entity ex2_3 is port(S1: in std_logic_vector(3 downto 0); S2: in std_logic_vector(0 to 3); outValue: out std_logic_ve
5、ctor(3 downto 0);End ex2_3;architecture rtl of ex2_3 isbegin outValue(3 downto 0) <= (S1(2 downto 0) and not S2(1 to 3) & (S1(3) xor S2(0) ;end rtl;A、 “0101” B、 “0100” C、“0001” D、“0000” 4) 下面哪個(gè)說法是錯誤的: B 。A、 進(jìn)程語句與進(jìn)程語句之間是并行執(zhí)行的,進(jìn)程語句內(nèi)部是順序執(zhí)行的B、進(jìn)程語句是可以嵌套使用的C、塊語句與塊語句之間是并行執(zhí)行的,塊語句內(nèi)部也是并行執(zhí)行的D、塊語句是可以嵌套使用
6、的5) 在使用MAX+PLUSII開發(fā)環(huán)境對電路進(jìn)行系統(tǒng)設(shè)計(jì)時(shí),若將程序下載到器件EP10K10LC84-4,則需要下載的文件后綴名為 C 。A、*.gdf B、*.pof C、*.sof D、*.scf6) 若A為“1010”,則下面的程序執(zhí)行后Y和Z的輸出值分別為 B 。 Library ieee; Use ieee.std_logic.1164.all; Entity p_check is Port(a: in std_logic_vector(3 downto 0); Y, Z: out std_logic); End p_check; Architecture arch of p_c
7、heck is Signal tmp1: std_logic ; begin P1: Process(a) Variable tmp2: std_logic ; begin tmp2 := 0; For N in 0 to 3 loop tmp2 := tmp2 xor a(N) ; End loop; Y<=tmp2 ; End P1; P2: process(a) begin tmp1 <= 0; For N in 0 to 3 loop tmp1 <= tmp1 xor a(N) ; End loop; Z<=tmp1 ; End P2; End arch ; A
8、、 0、0 B、 0、1 C、 1 、0 D、 1、1 7) 根據(jù)VHDL語法規(guī)則,下面哪個(gè)標(biāo)識符是非法的標(biāo)識符: B 。 A、 not_Ack B、 constant C、 FFT_1024_1 D、state0三、 改正下列程序中的錯誤,并簡要說明每個(gè)錯誤的原因(20分,每小題4分) library ieee; (修改正確2分,錯誤原因2分) use ieee.std_logic_1164.all ; entity ex1 isport (inp: in std_logic_vector (2 downto 0); outp: out std_logic_vector (3 downto
9、0); end ex1 ; architecture rtl of ex1 is begin process(inp) begin case (inp) is when “00” =>outp<=“0001” ;when “01” =>outp<= “0010” ; case語句是順序語句,需要放在進(jìn)程或子程序中when “10” =>outp<=“0100” ;when others =>outp<=“1000” ; end case; end process;end rtl ;1) library ieee; use ieee.std_log
10、ic_1164.all ; entity ex2 isport (clk: in std_logic;Cnt: buffer std_logic_vector(3 downto 0); End ex2; Architecture arch of ex2 is Begin Process(clk) BeginWait until clkevent and clk = 1 ; 去掉process后的clk,wait語句中進(jìn)程后不 Cnt <= Cnt + 1 ; 能有敏感信號 End process; End arch ;2) library ieee; use ieee.std_logic
11、_1164.all; entity ex3 isport ( A,B,C: in std_logic; sel: in std_logic_vector(1 downto 0); Z: out std_logic); End ex3; Architecture arch of ex3 is Begin Process(A,B,C) BeginZ <= A when sel = “00” else 并行條件賦值語句不能放在進(jìn)程中,去掉 B when sel = “01” else 進(jìn)程 C; End process; End arch;3) library ieee; use ieee.s
12、td_logic_1164.all; use ieee.std_logic_unsigned.all; entity test is port(clk: in std_logic;count: out std_logic_vector(3 downto 0);end test;architecture rtl of test is count端口類型應(yīng)為buffer 或inoutbegin process(clk) begin if clkevent and clk=1 then count<=count+1; end if;end process;end rtl; 4) library
13、 ieee; use ieee.std_logic_1164.all; entity ex5 isport(Din: in std_logic_vector(7 downto 0); en: in std_logic; Dout: out std_logic_vector(7 downto 0); End ex5; Architecture arch of ex5 is Begin Process Begin If (En = 1) then 需加敏感信號列表 Dout <= Din ; process(en, Din) Else Dout <= “ZZZZZZZZ” ; End
14、if ; End process; End arch ; 四、補(bǔ)充語句,完成下面所要求的描述。(20分,每小題5分)1) 四選一選擇器:輸入輸出信號如右圖所示,A和B為選擇信號,inp3.0為4個(gè)信號輸入端,輸出信號為Y。library ieee;use ieee.std_logic_1164.all ;entity MUX41 isport( A, B : in std_logic ; inp: in std_logic_vector(3 downto 0); 1分Y: out std_logic);End MUX41 ;Architecture art of MUX41 isSignal
15、sel : std_logic_vector(1 downto 0);Begin Sel <= A & B ; 1分 process (inp , sel ) begin if (sel = “00” ) then Y<= inp(0) ; 1分 elsif (sel =”01”) then Y <= inp(1); 1分 elsif (sel = “10”) then Y<= inp(2); 1分 Else Y <= inp(3) ; End if ;End process ;End art ;2) 帶異步清零的8位計(jì)數(shù)器,輸入輸出如右圖所示,aclr為
16、異步清零信號, Clk為時(shí)鐘,Counter7.0為計(jì)數(shù)器輸出信號。 Library ieee; Use ieee.std_logic_1164.all; Use ieee.std_logic_unsigned.all; 1分 entity Count8 isport(aclr, reset: in std_logic; Clk: in std_logic; Counter: out std_logic_vector(7 downto 0); End Count8 ; Architecture arch of Count8 is Signal cntTmp: std_logic_vector(
17、7 downto 0); 1分 begin process(aclr, Clk) begin if (aclr = 0) cmtTmp <= “00000000”; 1分 elsif (clkevent and clk = 1) then CntTmp <= cntTmp + 1 ; 1分 End if ;End if ; End process ; Counter <= cntTmp; 1分 End arch; 3) 移位寄存器,如右圖所示,Clk為移位寄存器時(shí)鐘,Data為輸入數(shù)據(jù),Dir為移位方向,為0左移一位,為1右移一位,Qout7.0為8位移位寄存器的數(shù)據(jù)輸出。L
18、ibrary ieee;Use ieee.std_logic_1164.all;Entity shift is Port (Clk: in std_logic; Data: in std_logic ; Dir: in std_logic ; Qout: buffer std_logic_vector(7 downto 0);End shift ;Architecture arch of shift isBeginProcessBegin Wait until Clkevent and Clk = 1 ; 1分 Case (Dir) is 1分 When 0 => Qout <=
19、Qout(6 downto 0) & Data ; 1分 When 1=> Qout <= Data & Qout(6 downto 0); 1分 When others => Qout <= “00000000” ;-只要有others即對 1分 End case ;End process;End arch ;4) 七段LED譯碼顯示電路,只須顯示09,Din3.0為輸入,Dout6.0為輸出。數(shù)碼管為共陰極,數(shù)碼管對應(yīng)關(guān)系如下圖所示,a對應(yīng)譯碼顯示輸出的低位,g對應(yīng)高位,其它按順序?qū)?yīng)。Library ieee;Use ieee.std_logic_
20、1164.all;Entity decoder is Port(Din: in std_logic_vector(3 downto 0); Dout: out std_logic_vector(6 downto 0);End decoder ;Architecture arch of decoder isBeginDout <= “0111111” when Din = “0000” else “0000110” when Din = “0001” else 1分 “1011011” when Din = “0010” else “1001111” when Din = “0011” e
21、lse 1分 “1100110” when Din = “0100” else “1101101” when Din = “0101” else 1分 “11111101” when Din = “0110” else “0000111” when Din = “0111” else 1分 “1111111” when Din = “1000” else “1101111” when Din = “1001” else 1分 “0000000” ; End arch ;五、用VHDL設(shè)計(jì)電路:(26分) 1. 用VHDL(必須使用元件例化方式)描述如下的方框圖,十進(jìn)制計(jì)數(shù)器也要編寫。(14分)
22、 -十進(jìn)制計(jì)數(shù)器library ieee;use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; 2分entity CNT10 isport(Clk: in std_logic; En: in std_logic; Carry: out std_logic ; CntOut: out std_logic_vector(3 downto 0);End CNT10; 1分Architecture arch of CNT10 isSignal CntOutTmp: std_logic_vector(3 downto 0);Begin
23、Process(clk)Begin If (Clkevent and Clk = 1 ) then If (En = 1) then If (CntOutTmp = “1001”) then CntOutTmp <= “0000” ; Carry <= 1 ; else CntOutTmp <= CntOutTmp+ 1 ; Carry <= 0 ; End if ;End if ; End if ;End process ;CntOut <= CntOutTmp ;End arch ; 3分-主程序library ieee;use ieee.std_logic_
24、1164.all; 1分entity top is port (Clk, en: in std_logic; carry : out std_logic; Dout: out std_logic_vector(7 downto 0);End top; 1分Architecture arch of top isComponent CNT10 Port(clk: in std_logic; En : in std_logic; Carry : out std_logic; CntOut : out sdd_logic_vector(3 downto 0);End Component ; 2分Signal carryTmp: std_logic;BeginU1: CNT10 port map(Clk, En, carryTmp, Dout(3 downto 0); 2分U2:CNT10 port map(carryTmp, En, carry, Dout(7 downto 4); 2分End arch ; 2. 用VHDL設(shè)計(jì)一個(gè)模為90,具有異步復(fù)位、同步置數(shù)功能的8421BCD碼計(jì)數(shù)器。輸入輸 出接口如圖所示,nReset為異步復(fù)位信號,Load為用于同步置數(shù)的控制信號,Clk為時(shí)鐘信號,LoadData7.0為計(jì)數(shù)器初始計(jì)數(shù)數(shù)據(jù),Carr
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 保存劑與穩(wěn)定劑在藝術(shù)品中的應(yīng)用考核試卷
- 印刷設(shè)備維護(hù)工具維護(hù)計(jì)劃制定考核試卷
- 公共設(shè)施安全設(shè)施維護(hù)考核試卷
- 印刷技術(shù)在圖書裝幀中的特殊印刷工藝應(yīng)用考核試卷
- 兔飼養(yǎng)與森林資源合理利用考核試卷
- 智能環(huán)保監(jiān)測技術(shù)考核試卷
- 品牌價(jià)值評估在出版業(yè)的運(yùn)用考核試卷
- 古籍收藏與歷史研究考核試卷
- 部編六年級語文上冊全冊試卷(含答案)
- 2025年中國IP電話計(jì)費(fèi)軟件數(shù)據(jù)監(jiān)測研究報(bào)告
- 呼和浩特市國企招聘考試試題及答案2025
- 金融計(jì)量學(xué)知到智慧樹章節(jié)測試課后答案2024年秋山東管理學(xué)院
- 機(jī)械制圖-形成性任務(wù)2-國開(ZJ)-參考資料
- 糖葫蘆課件教學(xué)課件
- 華南理工大學(xué)《機(jī)器學(xué)習(xí)》2023-2024學(xué)年期末試卷
- 氣胸完整版本
- 十七個(gè)崗位安全操作規(guī)程手冊
- 大學(xué)世界現(xiàn)代史世界當(dāng)代史名詞解釋主觀題復(fù)習(xí)資料
- 貴州省貴陽市云巖區(qū)2023-2024學(xué)年四年級下學(xué)期期末語文試題
- QCT1177-2022汽車空調(diào)用冷凝器
- 2024年單獨(dú)考試招生嬰幼兒托育與管理專業(yè)考試題庫(含答案)
評論
0/150
提交評論