【FPGA】Verilog基本回路設計ガイド

書き込み時間:2020-10-31

内容:
設計の基礎と最も1.代表的な回路
-1.1フルアダー
-1.2データパス
-1.3対
-1.4算術演算
-1.5論理演算
-1.6シフト動作
-1.7動作タイミング
-1.8 ALU
-1.9 FSM
- 1.10トライステートバス
2.共通回路設計(完全に理解する必要がある)
-2.1CRCチェックコードジェネレーター
-2.2ランダム番号生成
-2.3デュアルポートRAM-
2.4同期FIFO -
2.5非同期FIFO

アイデアの学習:
最初に基本モジュールを学習し、次にそれらを理解して消化します。これが基盤です。次に、いくつかの一般的な回路を学び、プロジェクトをゆっくりと設計できます。

メインテキスト:
1。典型的な回路の設計と最も基本的な知識-1.1
全加算器

module FULLADDR(Cout, Sum, Ain, Bin, Cin);
input Ain, Bin, Cin;
output Sum, Cout;
wire Sum;
wire Cout;
assign Sum = Ain ^ Bin ^ Cin;
assign Cout = (Ain & Bin) | (Bin & Cin) | (Ain & Cin);
endmodule

-1.2データパス-1.2.14
つのうちの1つを選択するマルチプレクサ

//Example of a mux4-1.
module MUX( C,D,E,F,S,Mux_out);
input C,D,E,F ; //input
input [1:0] S ; //select control
output Mux_out ; //result
reg Mux_out ;
//mux
always@(C or D or E or F or S)
begin
 case (S)
2'b00 : Mux_out = C ;
2'b01 : Mux_out = D ;
2'b10 : Mux_out = E ;
default : Mux_out = F ;
 endcase
end

ここに写真の説明を挿入

-1.2.2デコーダー

//Example of a 3-8 decoder
module DECODE(Ain,En,Yout);
input En ; //enable
input [2:0] Ain ; //input code
output [7:0] Yout ;
reg [7:0] Yout ;
always@(En or Ain)
begin
if(!En)
Yout = 8'b0 ;
else
case (Ain)
3'b000 : Yout = 8'b0000_0001 ;
3'b001 : Yout = 8'b0000_0010 ;
3'b010 : Yout = 8'b0000_0100 ;
3'b011 : Yout = 8'b0000_1000 ;
3'b100 : Yout = 8'b0001_0000 ;
3'b101 : Yout = 8'b0010_0000 ;
3'b110 : Yout = 8'b0100_0000 ;
3'b111 : Yout = 8'b1000_0000 ;
default : Yout = 8'b0000_0000 ;
endcase
end
endmodule

-1.3カウンター

在这里插入代码片

-1.4算術演算
-1.5論理演算
-1.6シフト演算
-1.7順次演算
-1.8ALU -
1.9有限状態マシン
-1.10スリーステートバス

1.2データパス


終わり〜

おすすめ

転載: blog.csdn.net/hahahahhahha/article/details/109407816