天堂国产午夜亚洲专区-少妇人妻综合久久蜜臀-国产成人户外露出视频在线-国产91传媒一区二区三区

VHDL數(shù)字電路設(shè)計教程第5章習題參考答案

發(fā)布時間:2017-02-28 13:00

  本文關(guān)鍵詞:VHDL數(shù)字電路設(shè)計教程,由筆耕文化傳播整理發(fā)布。



15075561223

123123

第 5 章習題參考答案
Problem 5.1 library ieee; use ieee.std_logic_1164.all; package my_data_type is constant m: integer :=8; type vector_array is array (n

atural range<>) of std_logic_vector(m-1 downto 0); end my_data_type; library ieee; use ieee.std_logic_1164.all; use work.my_data_type.all; entity n_mux is generic (n: integer :=8); port( datain: in vector_array(0 to n-1) ; sel: in integer range 0 to n-1; dataout: out std_logic_vector( m-1 downto 0)); end; architecture bhv of n_mux is begin dataout<=datain(sel);

end; Problem 5.2 方法一: 方法一:利用簡單賦值語句設(shè)計 library ieee; use ieee.std_logic_1164.all; entity priority_encoder is port(x:in std_logic_vector(7 downto 1); y:out std_logic_vector(2 downto 0)); end; architecture bhv of priority_encoder is begin y(2)<=x(7) or x(6) or x(5) or x(4); y(1)<=x(7) or x(6) or (( not x(5) and not x(4)) and (x(3) or x(2))); y(0)<=x(7) or (not x(6) and (x(5) or (not x(4) and (x(3) or (not x(2) and x(1)))))); end; 方法二:利用 WHEN 語句設(shè)計 方法二: library ieee; use ieee.std_logic_1164.all; entity priority_encoder is port(x:in std_logic_vector(7 downto 1); y:out std_logic_vector(2 downto 0));

end; architecture bhv of priority_encoder is begin y<="111" when x(7)='1' else "110" when x(6)='1' else "101" when x(5)='1' else "100" when x(4)='1' else "011" when x(3)='1' else "010" when x(2)='1' else "001" when x(1)='1' else "000"; end; Problem 5.4 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity adder8 is port(a,b:in std_logic_vector(7 downto 0); cin:in std_logic; sum:out std_logic_vector(7 downto 0); cout:out std_logic); end;

architecture bhv of adder8 is signal a0,b0,cin0, s:std_logic_vector(8 downto 0); begin a0<='0'&a; b0<='0'&b; cin0<="00000000"&cin; s<=a0+b0+cin0; sum<=s(7 downto 0); cout<=s(8); end; Problem5.5 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; use ieee.std_logic_signed.all; entity add_sub is port(a,b:in unsigned(7 downto 0); sel:in bit_vector(1 downto 0); sum:out std_logic_vector(8 downto 0)); end; architecture bhv of add_sub is signal temp1,temp2:unsigned (8 downto 0); signal temp3,temp4:signed(8 downto 0);

--signal an,as,sn,ss:std_logic_vector(8 downto 0); signal a0,b0:signed (7 downto 0); signal cin0:std_logic_vector(7 downto 0); begin a0<=conv_signed(a,8); b0<=conv_signed(b,8); temp1<=conv_unsigned((a+b),9); temp2<=conv_unsigned((a-b),9); temp3<=conv_signed((a0+b0),9); temp4<=conv_signed((a0-b0),9); sum<=conv_std_logic_vector(temp1,9)when sel="00" else conv_std_logic_vector(temp3,9)when sel="01" else conv_std_logic_vector(temp2,9)when sel="10" else conv_std_logic_vector(temp4,9); end; Problem 5.6 library ieee; use ieee.std_logic_1164.all; entity gray_encoder is generic(n: integer:=4) ; port(input:in std_logic_vector(n-1 downto 0); output:out std_logic_vector(n-1 downto 0));

end; architecture bhv of gray_encoder is begin output(n-1)<=input(n-1); output(n-2 downto 0)<=input(n-2 downto 0) xor input(n-1 downto 1); end;

Problem 5.7 將原題修改后的作業(yè)題, ( 要求能夠?qū)崿F(xiàn)連續(xù)移位, shift 當 信號為 0 時,保持不變,否則每次左移移位,最低位補 0,直到全 0 為止。 ) library ieee; use ieee.std_logic_1164.all; entity barrel_shifter is port(inp:in std_logic_vector(7 downto 0); shift: in bit; sel:in integer range 0 to 7; outp:out std_logic_vector(7 downto 0)); end; architecture bhv of barrel_shifter is type matrix is array(7 downto 0) of std_logic_vector (7 downto 0); signal row: matrix;

begin row(0)<=inp; l1:for i in 1 to 7 generate row(i)<=row(0) when shift='0' else row(i-1)(6 downto 0)&'0' ; end generate; outp<=row(sel); end; Problem 5.8 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; entity comp is port(a,b:in integer range 0 to 255; sel:in std_logic; x1,x2,x3:out std_logic); end; architecture bhv of comp is signal a_signed, b_signed: signed(7 downto 0); signal temp: std_logic_vector (1 to 4); begin a_signed<=conv_signed(a,8);

b_signed<=conv_signed(b,8); temp(1)<='1' when a>b else '0'; temp(2)<='1' when a=b else '0'; temp(3)<='1' when a_signed>b_signed else '0'; temp(4)<='1' when a_signed=b_signed else '0'; x1<=temp(1) when sel='0' else temp(3); x2<=temp(2) when sel='0' else temp(4); x3<=not(temp(1) or temp(2)) when sel='0' else not(temp(3) or temp(4)); end;


更多相關(guān)文檔:

EDA技術(shù)實用教程第五版第13章習題答案

EDA技術(shù)實用教程第五版第13章習題答案_理學_高等...答:VHDL 支持 BIT 類型和 STRING 類型,其他屬于 ...中的包集 合 13-7 函數(shù)與過程的設(shè)計與功能有什么...

verilog數(shù)字系統(tǒng)設(shè)計教程習題答案

verilog 數(shù)字系統(tǒng)設(shè)計教程習題答案 第二章 1.Verilog...4.Verilog HDL 和 VHDL 作為描述硬件電路設(shè)計的語言...5.不是 6.將用行為和功能層次表達的電子系統(tǒng)轉(zhuǎn)換...

EDA課后答案

5頁 7下載券 EDA技術(shù)實用教程課后答案... 19頁 ...EDA技術(shù)使用教程vhdl(第... 38頁 免費 EDA技術(shù)與...并在數(shù)字電路設(shè)計技術(shù)、化簡優(yōu) 化算法以及計算機軟件...

VHDL程序練習題(含答案)

VHDL習題 9頁 1下載券 VHDL第1~3章練習題 8頁 ...VHDL數(shù)字電路設(shè)計教程第... 8頁 免費V​H​D...參考答案 1、 ENTITY 3、 BEGIN 5、 “0000000”...

VHDL程序設(shè)計教程習題解答

VHDL程序設(shè)計教程習題解答_理學_高等教育_教育專區(qū)!禫HDL 程序設(shè)計教程》習題參考答案 VHDL 程序設(shè)計教程習題參考解答第 1 章思考題解答` ```《VHDL 程序設(shè)計教程...

題庫

第3章 習題 暫無評價 2頁 5財富值 1_填空題庫及參考答案 暫無評價 4頁 免費...都不對。 5. VHDL 語言是一種結(jié)構(gòu)化設(shè)計語言;一個設(shè)計實體(電路模塊)包括...

protel 99 se 印刷電路板設(shè)計教程習題答案

protel 99 se 印刷電路板設(shè)計教程習題答案_工程科技...是一個能提供連續(xù)的模擬信號和離散的數(shù)字信號仿真。...3、交叉參考表:可為多張圖紙中的每個元件列出其...

answer5

數(shù)字邏輯設(shè)計 課后作業(yè)答案數(shù)字邏輯設(shè)計 課后作業(yè)答案隱藏>> 第5章【習題答案】...觸發(fā)器的行為描述(.vhd 文件),此 VHDL 代碼應(yīng)反映圖 5.17(a)所示 電路的...

VHDL復(fù)習題

數(shù)字電路試題及答案 5頁 1下載券V​H​D​L​復(fù)​習​題 ...(參考 161 頁) 【或題目:用 VHDL 設(shè)計一個四位二進制加法計數(shù)器(161 頁) ...

EDA技術(shù)習題

EDA技術(shù)實用教程習題答案—... 19頁 5財富值 EDA...3)設(shè)計文檔的管理。 4)強大的系統(tǒng)建模、電路仿真...分)1 (3 5. 在 VHDL 設(shè)計中,給觸發(fā)器復(fù)位有哪...

更多相關(guān)標簽:


  本文關(guān)鍵詞:VHDL數(shù)字電路設(shè)計教程,,由筆耕文化傳播整理發(fā)布。



本文編號:246336

資料下載
論文發(fā)表

本文鏈接:http://sikaile.net/wenshubaike/mishujinen/246336.html


Copyright(c)文論論文網(wǎng)All Rights Reserved | 網(wǎng)站地圖 |

版權(quán)申明:資料由用戶00af0***提供,本站僅收錄摘要或目錄,作者需要刪除請E-mail郵箱bigeng88@qq.com
精品精品国产欧美在线| 欧美美女视频在线免费看| 插进她的身体里在线观看骚| 91播色在线免费播放| 国产一级片内射视频免费播放| 香港国产三级久久精品三级| 国产传媒欧美日韩成人精品| 亚洲av首页免费在线观看| 国产福利一区二区三区四区| 国内自拍偷拍福利视频| 午夜福利黄片免费观看| 国产又粗又猛又大爽又黄同志| 少妇熟女精品一区二区三区| 99久久精品午夜一区| 欧美一区二区三区十区| 中国美女偷拍福利视频| 人妻中文一区二区三区| 欧美成人欧美一级乱黄| 少妇成人精品一区二区| 午夜视频在线观看日韩| 在线观看国产成人av天堂野外| 亚洲黄香蕉视频免费看| 成人精品一区二区三区在线| 在线视频三区日本精品| 亚洲av在线视频一区| 手机在线观看亚洲中文字幕| 日本午夜福利视频免费观看| 女生更色还是男生更色| 男女午夜视频在线观看免费| 日韩女优精品一区二区三区| 成人精品一区二区三区在线| 国产精品视频久久一区| 国产精品久久精品国产| 国产精品偷拍视频一区| 亚洲中文字幕在线视频频道| 国产又色又爽又黄又大| 欧美一级内射一色桃子| 不卡视频在线一区二区三区| 欧洲自拍偷拍一区二区| 美国女大兵激情豪放视频播放| 久久国产亚洲精品赲碰热|