范围规范 Verilog

Range Specification Verilog

我正在阅读两个来源,它们似乎给我关于范围规范规则的矛盾信息。 This says that, "Identical instance names cannot appear twice with other range specifications (even if ranges do not overlap each other)" while Intel's Verilog 基础教程有一个时间戳 34:28 处的 4 位移位器示例,代码如下:

integer i;

always@(inp,cnt)begin
  result[7:4] = 0;
  result[3:0] = inp;

  if(cnt==1)begin

    for(i=4; i<=7; i=i+1)begin
      result[i]=result[i-4];
    end

    result[3:0] = 0;

  end

end

"result[7:4]" 和 "result[3:0]" 不会是一个实例名称,与 "other range specifications" 出现两次,一次是 [7:4] 一次是 [3:0] 吗?还是我误解了 "other range specifications" 的意思?

'Range Specification'指一次创建多个模块实例。例如。这是无效的:

my_module m [3:0] (...);
my_module m [7:4] (...);

您的示例中的内容称为“Part-select”。