verilogネットリスト

by K.I
2000/11/28

Index


概要

ネットリストとして利用される、verilogフォーマットに関するメモ。 tsmcのライブラリの記述を調べたもの。 情報が少ないので不明な部分が多く、あまり意味がないが参考に残す。
[top]

verilogソースファイル


[top]

フォーマット

通常のverilog機能記述に、'`'(バッククォート)で始まる記述と、specifyによる遅延記述?が付加されていると思われる。

tsmcの記述方法

specifyの記述について

信号の記述では、アクティブエッジを以下のように指定する。 以下のように条件を付けることも可能と思われる。
[top]

verilogネットリストの例

tsmcのライブラリの例を示す。
// TSMC Standard Cell Function Library Ver 
// Model Type: DFCSNx , Mon Nov 24 11:09:02 CST 1997
`timescale 1ns / 10ps
`celldefine
module DFCSN1 (D, CP, CDN, SDN, Q, QN);
 
    input D, CP, CDN, SDN;
    output Q, QN;
    reg notifier;
 
    buf          (CDN_i, CDN);
    buf          (SDN_i, SDN);
    and          (CP_check, CDN_i, SDN_i);
    tsmc_dff     (Q_buf, D, CP, CDN_i, SDN_i, notifier);
    buf          (Q, Q_buf);
    not          (QN_buf, Q_buf);
    and          (QN, QN_buf, SDN_i);
 
    reg flag;
    always @(CDN_i or SDN_i) begin
      if (!$test$plusargs("cdn_sdn_check_off")) begin
      if (flag == 1) begin 
         if (CDN_i!==1'b0) begin
         $display("%m > CDN is released at time %.2fns.", $realtime);
         end
         if (SDN_i!==1'b0) begin
         $display("%m > SDN is released at time %.2fns.", $realtime);
         end
      end
      flag = ((CDN_i===1'b0)&&(SDN_i ===1'b0));
      if (flag == 1) begin
         $display("%m > Both CDN and SDN are enabled at time %.2fns.", $realtime);
      end
    end 
    end

    specify
       (CDN => Q)=(0, 0);
       (CDN => QN)=(0, 0);
       (CP => Q)=(0, 0);
       (CP => QN)=(0, 0);
       (SDN => Q)=(0, 0);
       (SDN => QN)=(0, 0);
       $recovery(posedge CDN,  posedge CP, 0, notifier);
       $hold(posedge CP , posedge CDN, 0, notifier);
       $recovery(posedge SDN,  posedge CP, 0, notifier);
       $hold(posedge CP , posedge SDN, 0, notifier);
       $setup(posedge D , posedge CP &&& CP_check , 0, notifier);
       $setup(negedge D , posedge CP &&& CP_check , 0, notifier);
       $hold(posedge CP,posedge  D &&& CP_check , 0, notifier);
       $hold(posedge CP,negedge  D &&& CP_check , 0, notifier);
       $width(posedge CP &&& CP_check, 0, 0, notifier);
       $width(negedge CP &&& CP_check, 0, 0, notifier);
       $width(posedge CDN, 0, 0, notifier);
       $width(negedge CDN, 0, 0, notifier);
       $width(posedge SDN, 0, 0, notifier);
       $width(negedge SDN, 0, 0, notifier);
    endspecify
endmodule
`endcelldefine

[top] [Homeに戻る]

comments powered by Disqus