producing simulation results

来源:互联网 发布:测绘工程就业前景知乎 编辑:程序博客网 时间:2024/04/27 12:44

1. several ways to sample output signal

always @(negedge clk)begin   $strobe(...)endparameter INTERVAL = 10;alwaysbegin   #(INTERVAL);   $strobe(...);endalways @(q, qb)begin   $strobe("...", rst, d0, d1, sel, q, qb);endinitialbegin   $monitor("...", rst, d0, d1, sel, q, qb);end


 

2. Minimizing Sampling

An active  $monitor task can be turned on and off by using the $monitoron and $monitoroff tasks, respectively. If you are using an explicit sampling always block, you should include sampling minimization techniques in your model, as illustrated in Sample 5-34. A very efficient way of minimizing sampling is to have the stimulus
turn on the sampling when an interesting section of the testcase is entered, as shown in Sample 5-35.

alwaysbeginwait (<interesting_condition>);while (<interesting_condition>) begin      @ (q, qb;)      $strobe(“...”, rst, d0, d1, sel, q, qb);   endendinitialbegin   $monitor("...", rst, d0, d1, sel, q, qb);$monitoroff;   sync_reset;   load_d0(1);   sync_reset;$monitoron;   load_d1(1);   load_d0(0);   load_d1(1);   sync_reset;$monitoroff;   ...end 


 

原创粉丝点击