[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  Schedule::Load
  SVN::S4
  Synopsys-modes
  SystemPerl
  Verilog-Pli
  Voneline
  Vregs
General Info
  Papers

Issue #332

Calculated parameters in port widths

Added by Julian Gorfajn about 1 year ago.

Status:New Start date:03/09/2011
Priority:Normal Due date:
Assignee:Wilson Snyder % Done:

0%

Category:Autos
Target version:-

Description

If you use parameters calculated from other parameters in port widths, they appear at the instantiation even if you have verilog-auto-inst-param-value set.

Below is an example where b is just a+5, however, more commonly it will be b=func(a) where func might be log or something like that.


module foo();

  bar #(.a(6)) ibar(/*autoinst*/
            // Inputs
            .in_wire0        (in_wire0[5:0]),
            .in_wire1        (in_wire1[b-1:0]));

endmodule

module bar
  #(parameter 
    a=3,
    b=a+5
    )
  (
   input [a-1:0] in_wire0;
   input [b-1:0] in_wire1;
   );

endmodule

Also available in: Atom