首页|嵌入式系统|显示技术|模拟IC/电源|元件与制造|其他IC/制程|消费类电子|无线/通信|汽车电子|工业控制|医疗电子|测试测量
首页 > 分享下载 > 常用文档 > 国外经典VERILOG代码

国外经典VERILOG代码

资料介绍
国外经典VERILOG代码

/* *
* Examples from "The Verilog Hardware Description Language", *
* by D.E. Thomas and P.R. Moorby *
* */



//Example 1.2. NAND Latch To Be Simulated.
module ffNand;
wire q, qBar;
reg preset, clear;

nand #1
g1 (q, qBar, preset),
g2 (qBar, q, clear);

initial
begin
// two slashes introduce a single line comment
$monitor ($time,,
"Preset = %b clear = %b q = %b qBar = %b",
preset, clear, q, qBar);
//waveform for simulating the nand flip flop
#10 preset = 0; clear = 1;
#10 preset = 1;
#10 clear = 0;
标签:verilogFPGA
国外经典VERILOG代码
本地下载
该用户资料分享

评论