1 / 67

第四章

第四章. 組合邏輯. 4-1 組合電路. 4-3 設計步驟. 組合電路的設計 1. 由電路的敘述,決定所需的輸入與輸出的個數並且對每一個輸入與輸出安排一個變數符號。 2. 導出真值表並定義輸入與輸出間的關係。 3. 對每一個輸出求出以輸入變數為函數之簡化的布林函數。 4. 畫出邏輯圖並且證明設計的正確性。. BCD 碼到超 3 碼轉換器. BCD 到超 3 碼卡諾圖. BCD 到超 3 碼電路圖. 4-4 二進位加法器 --- 減法器. 半加法器 (half adder). 半加法器. 電路. 全加法器. 真值表. 全加法器. 卡諾圖.

stesha
Download Presentation

第四章

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 第四章 組合邏輯

  2. 4-1 組合電路

  3. 4-3 設計步驟 • 組合電路的設計 1.由電路的敘述,決定所需的輸入與輸出的個數並且對每一個輸入與輸出安排一個變數符號。 2.導出真值表並定義輸入與輸出間的關係。 3.對每一個輸出求出以輸入變數為函數之簡化的布林函數。 4.畫出邏輯圖並且證明設計的正確性。

  4. BCD碼到超3碼轉換器

  5. BCD到超3碼卡諾圖

  6. BCD到超3碼電路圖

  7. 4-4 二進位加法器---減法器 • 半加法器(half adder)

  8. 半加法器 • 電路

  9. 全加法器 • 真值表

  10. 全加法器 • 卡諾圖

  11. 全加法器 • 電路

  12. 二進位加法器

  13. 進位傳播 進位產生 進位傳播

  14. 進位遞迴產生器

  15. 具有進位遞迴的4位元加法器

  16. 二進位減法器 • 4位元加法器---減法器

  17. 4-5 十進位加法/器 • BCD加法器的推導

  18. BCD加法器電路

  19. 4-6 二進位乘法器 • 2位元乘2位元

  20. 4位元乘3位元之二進位乘法器

  21. 4-7 大小比較器

  22. 4位元大小比較器

  23. 4-8 解碼器

  24. 具有致能輸入之2對4線解碼器

  25. 利用3x8解碼器建立4x16解碼器

  26. 利用解碼器實現組合邏輯電路

  27. 4-9 編碼器

  28. 優先權編碼器之真值表

  29. 優先權編碼器卡諾圖

  30. 4輸入優先權編碼器

  31. 4-10 多工器(Multiplexers)

  32. 4對1線 多工器

  33. 四重2對1線 多工器

  34. 利用多工器實現布林函數

  35. 利用多工器實現一個4輸入函數

  36. 三態閘

  37. 利用三態閘構成多工器

  38. 4-11 組合電路的硬體描述語言 • 閘階層模型 關鍵字 and、nand、or、nor、xor、xnor、not、buf

  39. HDL 範例 4-1(2對4線解碼器的閘階層描述) //Gate-level description of a 2-to-4-line decoder //Figure 4-19 module decoder_gl (A,B,E,D); input A,B,E; output [0:3]D; wire Anot,Bnot,Enot; not n1 (Anot,A), n2 (Bnot,B),

  40. HDL 範例 4-1(2對4線解碼器的閘階層描述) n3 (Enot,E); nand n4 (D[0],Anot,Bnot,Enot), n5 (D[1],Anot,B,Enot), n6 (D[2],A,Bnot,Enot), n7 (D[3],A,B,Enot); endmodule

  41. HDL 範例 4-2(4位元加法器之底部向上層次化描述) //Gate-level hierarchical description of 4-bit adder // Description of half adder (see Fig 4-5b) module halfadder (S,C,x,y); input x,y; output S,C; //Instantiate primitive gates xor (S,x,y); and (C,x,y);

  42. HDL 範例 4-2(4位元加法器之底部向上層次化描述) endmodule //Description of full adder (see Fig 4-8) module fulladder (S,C,x,y,z); input x,y,z; output S,C; wire S1,D1,D2; //Outputs of first XOR and two AND gates //Instantiate the halfadder halfadder HA1 (S1,D1,x,y),

  43. HDL 範例 4-2(4位元加法器之底部向上層次化描述) HA2 (S,D2,S1,z); or g1(C,D2,D1); endmodule //Description of 4-bit adder (see Fig 4-9) module _4bit_adder (S,C4,A,B,C0); input [3:0] A,B; input C0;

  44. HDL 範例 4-2(4位元加法器之底部向上層次化描述) output [3:0] S; output C4; wire C1,C2,C3; //Intermediate carries //Instantiate the fulladder fulladder FA0 (S[0],C1,A[0],B[0],C0), FA1 (S[1],C2,A[1],B[1],C1), FA2 (S[2],C3,A[2],B[2],C2), FA3 (S[3],C4,A[3],B[3],C3); endmodule

  45. 三態閘 bufif1 (OUT, A, control); notif0 (Y, B, enable);

  46. 具有三態緩衝器之2對1線多工器 module muxtri (A, B, select, OUT); input A, B, select; output OUT; tri OUT; bufif1 (OUT, A, select); bufif0 (OUT, B, select); endmodule

  47. 資料流程模型 • Verilog HDL運算子

  48. HDL 範例 4-3(2對4線解碼器的資料流程描述) //Dataflow description of a 2-to-4-line decoder //See Fig.4-19 module decoder_df (A,B,E,D); input A,B,E; output [0:3] D; assign D[0] = ~(~A & ~B & ~E), D[1] = ~(~A & B & ~E), D[2] = ~(A & ~B & ~E), D[3] = ~(A & B & ~E); endmodule

  49. HDL 範例 4-4(4位元加法器之資料流程描述) //Dataflow description of 4-bit adder module binary_adder (A,B,Cin,SUM,Cout); input [3:0] A,B; input Cin; output [3:0] SUM; output Cout; assign {Cout,SUM} = A + B + Cin; endmodule

  50. HDL 範例 4-5(大小比較器之資料流程描述) //Dataflow description of a 4-bit comparator. module magcomp (A,B,ALTB,AGTB,AEQB); input [3:0] A,B; output ALTB,AGTB,AEQB; assign ALTB = (A < B), AGTB = (A > B), AEQB = (A = = B); endmodule

More Related