?? ph_meter.v
字號:
///////////////////////////////////////////////////////////////////////////////// Copyright (c) 2003 Xilinx, Inc.// All Rights Reserved///////////////////////////////////////////////////////////////////////////////// ____ ____// / /\/ /// /___/ \ / Vendor: Xilinx// \ \ \/ Version: 1.0// \ \ Application : XAPP868// / / Filename: ph_meter.v// /___/ /\ Timestamp: Thu Jan 17 2008// \ \ / \// \___\/\___\/////////////////////////////////////////////////////////////////////////////////`timescale 1ns / 1psmodule ph_meter(in_sig_1, in_sig_2); input in_sig_1; input in_sig_2; //output time out_ph1; real phase; reg alt=0; real out_ph1; real strt; real stp; always @( in_sig_1) begin: xhdl0 //time strt; //time stp; //time diff; if (in_sig_1 == 1'b1 & ~(alt)) begin strt = $realtime; alt = 1; end end always @( in_sig_2) begin: xhdl1 if (in_sig_2 == 1'b1 & (alt)& $realtime>strt) //if (in_sig_2 == 1'b1 & $realtime>strt) begin stp = $realtime; phase = (stp-strt)/0.5e3; alt = 0; end assign out_ph1 = phase; end endmodule
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -