Verilog 的兩種主要模式
1. 結構模式 (Structural Modeling) : 描述網路連線 (netlist) 的方式,元件和元件之間如何連接起來。
- 模組 (Model):透過輸出入 (I/O) 與其他模組連接起來,模組內可以包含元件 (instance)、子模組、訊號 (signal) 等。
- 模組是靜態 (static) 且平行執行 (concurrent) 的單位。
2. 行為模式 (Behavioral Modeling) : 有順序關係 (sequencing),更加彈性,同時可用來寫電路與測試程式 (testbench)。
- 平行:Initial , Always — 事件驅動模式 (Concurrent, event-triggered processes)
- 控制:Assignment, if else, case — 進行順序控制,可加上延遲一段時間 #time 的概念。
參考網址:http://ccckmit.wikidot.com/ve:basic