**
一個全加器的行為級描述
**
全加器代碼如:
module fuladd(Cin,x,y,s,Cout);
input Cin,x,y;
output reg s,Cout;
always @(x,y,Cin)
{Cout,s} = x + y + Cin ;
endmodule
二:Quartus II測試
1.建立Verilog HDL file
2.填寫上述代碼
3.進行編譯
三:結果如圖:
四、
過程連結
**
**
全加器代碼如:
module fuladd(Cin,x,y,s,Cout);
input Cin,x,y;
output reg s,Cout;
always @(x,y,Cin)
{Cout,s} = x + y + Cin ;
endmodule
二:Quartus II測試
1.建立Verilog HDL file
2.填寫上述代碼
3.進行編譯
三:結果如圖:
四、
過程連結