2012年12月3日 星期一

glitch

源自於
http://www.cnblogs.com/oomusou/archive/2008/10/04/verilog_synchronous_design.html


2數相加的電路? (SOC) (Verilog)

Abstract
y = a + b;一個很簡單的運算,該如何使用數位電路實現呢?
Introduction
使用環境:Quartus II 8.0
y = a + b;這個在C是再簡單不過的運算,不過若要使用Verilog在數位電路實現,初學者可能會遇到一些困難。
y = a + b兩數相加
不使用clock
Add2_assign.v / Verilog

复制代码



1 module Add2_assign (
2   input  [7:0] iA,
3   input  [7:0] iB,
4   output [8:0] oSUM
5 );
6 
7 assign oSUM = iA + iB;

8 
9 endmodule

复制代码

合成結果
add_3_02 
Simulation結果
add_3_01
結果雖然有很多glitch,畢竟組合電路一定會產生glitch,最少目前看到的結果仍正確,結果差強人意,所以想在最後輸出加上一個reg將glitch去除

沒有留言:

張貼留言

2024年4月24日 星期三 Node-Red Dashboard UI Template + AngularJS 參考 AngularJS教學 --2

 2024年4月24日 星期三 Node-Red Dashboard UI Template + AngularJS 參考 AngularJS教學 --2 AngularJS 實例 <!DOCTYPE html> <html> <head> &...