Kirchhoff's laws
生活随笔
收集整理的這篇文章主要介紹了
Kirchhoff's laws
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
春春找我,要我?guī)兔匆粋€verilog代碼,是實現倍頻的功能,不要求綜合,只要求行為級的描述。我覺得有點暈,verilog如此NX的我,看這個還是覺得累,關鍵是,我一看見代碼,腦子里面全是硬件實現的電路,想不到軟件的方法。。。。。
突然想到了Verilog-A,google后,Download PDF,居然看到Kirchhoff's laws (基爾霍夫定律) 突然想到模電書,魔王,還有TongJi
。。。。
Verilog-A 學習中。。。。
=========================================================
Add in Aug 4
=========================================================
昨天下午,通過偉大的即時聊天工具QQ和Chunchun溝通了一下,終于改正了幾個小bug,把代碼寫好了。其實代碼很簡單,我是覺得不太有用處的,我以前也不會這么寫,因為都是些不能綜合的語句。也正因為如此,我會犯錯誤。。。
現在好了,bug糾正了一下。
另外Verilog-A真好,描述的很神奇,Cadence的ICFB下有ahdl的例子,可以很好的描述PLL之類的電路,用Specre仿了一下,還可以。不過感覺Verilog-A也就在建模的時候用一下。具體的功能可能我還沒發(fā)掘出來
先把昨天的代碼貼出來吧
`timescale 1ns / 1ps
module pll(clk_in/*,reset*/,divN,clk_out);
input clk_in;
//input reset;
input [4:0]divN;
output clk_out;
reg clk_out;
time t1;
time t2;
real period;
initial begin
??? clk_out = 1'b0;
??? forever #(period/(divN+3)) clk_out = !clk_out;
end
always @ (posedge clk_in) begin
??? t2=t1;
??? t1=$time;
??? period = t1-t2;
end
initial begin
??? period = 10;
??? t1 = 50;
??? t2 = 0;
end
endmodule
突然想到了Verilog-A,google后,Download PDF,居然看到Kirchhoff's laws (基爾霍夫定律) 突然想到模電書,魔王,還有TongJi
。。。。
Verilog-A 學習中。。。。
=========================================================
Add in Aug 4
=========================================================
昨天下午,通過偉大的即時聊天工具QQ和Chunchun溝通了一下,終于改正了幾個小bug,把代碼寫好了。其實代碼很簡單,我是覺得不太有用處的,我以前也不會這么寫,因為都是些不能綜合的語句。也正因為如此,我會犯錯誤。。。
現在好了,bug糾正了一下。
另外Verilog-A真好,描述的很神奇,Cadence的ICFB下有ahdl的例子,可以很好的描述PLL之類的電路,用Specre仿了一下,還可以。不過感覺Verilog-A也就在建模的時候用一下。具體的功能可能我還沒發(fā)掘出來
先把昨天的代碼貼出來吧
`timescale 1ns / 1ps
module pll(clk_in/*,reset*/,divN,clk_out);
input clk_in;
//input reset;
input [4:0]divN;
output clk_out;
reg clk_out;
time t1;
time t2;
real period;
initial begin
??? clk_out = 1'b0;
??? forever #(period/(divN+3)) clk_out = !clk_out;
end
always @ (posedge clk_in) begin
??? t2=t1;
??? t1=$time;
??? period = t1-t2;
end
initial begin
??? period = 10;
??? t1 = 50;
??? t2 = 0;
end
endmodule
總結
以上是生活随笔為你收集整理的Kirchhoff's laws的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux-11-打包压缩
- 下一篇: 3dmax2014植树插件_免费软件下载