- 为模块定义原型:
extern module counter
#(
parameter N = 15
)(
output logic [N:0] cnt ,
input wire [N;0] d ,
input wire clock ,
load ,
resetN
);
module counter(.*);
always @(posedge clock, negedge resetN)
begin
if(!resetN) cnt <= 0;
else if(load) cnt <= d;
else cnt <= cnt + 1

这篇博客介绍了SystemVerilog中模块端口的连接方式,包括按端口次序、按端口名称以及使用`.`和`.*`的连接方式。此外,文章还讲解了SystemVerilog的别名语句、隐式线网、参数化类型以及端口默认方向等特性,展示了SystemVerilog如何增强模块设计的灵活性和可读性。
最低0.47元/天 解锁文章
5968

被折叠的 条评论
为什么被折叠?



