⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 元件例化与层次设计.txt

📁 计数器 锁存器 12位寄存器 带load
💻 TXT
字号:
Verilog HDL: Creating a Hierarchical Design

This example describes how to create a hierarchical design using Verilog HDL. 
The file top_ver.v is the top level, which calls the two lower level files bottom1.v and bottom2.v.
download from: http://www.fpga.com.cn 


vprim.v 



top_ver.v 

module top_ver (q, p, r, out);

input     q, p, r;
output     out;
reg     out, intsig;

bottom1 u1(.a(q), .b(p), .c(intsig));
bottom2 u2(.l(intsig), .m(r), .n(out));

endmodule


--------------------------------------------------------------------------------

bottom1.v 

module bottom1(a, b, c);

input     a, b;
output     c;
reg      c;

always
begin
     c<=a & b;
end

endmodule


--------------------------------------------------------------------------------

bottom2.v 

module bottom2(l, m, n);

input     l, m;
output    n;
reg       n;

always
begin
     n<=l | m;
end
endmodule

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -