[sv-bc] Using interface-type port in parameter override

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Sat Aug 25 2007 - 19:28:51 PDT
Following up to

  http://www.eda-stds.org/svdb/view.php?id=1224
  http://www.eda-stds.org/svdb/view.php?id=1058

the following example is allowed by the BNF, and seems reasonable to me,
but is the "bot#(ifc.P)" semantically legal?


interface IFC#(parameter P = 1);
endinterface

module top(output [7:0] o, output test_bit);
  IFC#(2) ifc();
  mid mid(o, ifc);
  assign test_bit = (o == 2);
endmodule

module mid(output [7:0] o, IFC ifc);
  bot#(ifc.P) bot(o);   // <--- legal A.4.1.1 param_expression ?
endmodule

module bot#(parameter P = 3)(output [7:0] o);
  assign o = P;
endmodule


-- Brad


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Sat Aug 25 19:29:29 2007

This archive was generated by hypermail 2.1.8 : Sat Aug 25 2007 - 19:29:39 PDT