標籤:style color io 使用 ar strong for sp cti
1.verilog平時三個層級:
1.gate level: and or not xor
2.RTL level: reg comb seq
3.behavior:+ – * /
2.system tasks
1.system tasks必須procedures(always/ initial/ tasks /function)中。
always written inside procedures
2.$monitor and $display 與time region有關。
3.suspends sim ==> $stop
finishes sim ==> $finish
4.$fopen的參數好像不可以是變數(不確定)
fd=$fopen(“path to file”);
3.$random(seed);
4.$display & $monitor string format
%m or %M ==> display hierarchical name
%s or %S ==> string
%h or %H ==> variable value
%t or %t ==> time
5.compiler directives
1.`include “filename”
2.`define <text1><text2>
3.`timescale <time unit>/<precision>
6.parameters <== 參數化設計 位寬 同2005verilog風格配合使用
注意:parameters & define 的用法與區別
7.Flip-Flops 用行為級邏輯實現的
8.FSM
1.mealy state machine & moore state mache
Mealy: output may depend on current state and current input
Moore:output depend on current state only
2.結構:一段 、 二段、 三段
3.先化狀態機器後code
9.Blocking and Non-Blocking assignments <<<====time region 有關
verilog RTL編程實踐之四