Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: verilog-auto-inst-param-value -> why not working? #1120

Closed
veripoolbot opened this issue Jan 18, 2017 · 1 comment
Closed

Question: verilog-auto-inst-param-value -> why not working? #1120

veripoolbot opened this issue Jan 18, 2017 · 1 comment
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: John John John
Original Redmine Message: 2123 from https://www.veripool.org


Hello,

In the shown below code, why the parameter values are not calculated in the signal widths, which are connected to the 'bfr' instance under /AUTOINST/? I mean ports din[W-1:0] and dout[W-1:0]. As you can see, a value of the verilog-auto-inst-param-value variable is 't' and the 'W' parameter has a value '8'.

module att //*
 #(parameter W = 8)
  (//** System
    input               clk,
    input               rstn,
    //** Interfaces
    input       [W-1:0] din,
    input       [W-1:0] din_vld,
    output      [W-1:0] dout

    /*AUTOINPUT*/ //**
    /*AUTOOUTPUT*/ //**

);

//////////////////////////////////////////////////////////////////////
//* DECLARATIONS
//////////////////////////////////////////////////////////////////////

/*AUTOREG*/  //**
/*AUTOWIRE*/ //**

//////////////////////////////////////////////////////////////////////
//* BUFFER
//////////////////////////////////////////////////////////////////////

/* bfr AUTO_TEMPLATE i_bfr (//**
// Parameters
.W    (W),
// Outputs
.out  (dout[]),
// Inputs
.en   (din_vld),
.in   (din[]),
); */

  bfr #(/*AUTOINSTPARAM*/
	// Parameters
	.W		(W))			 // Templated
i_bfr (//***
       /*AUTOINST*/
        // Outputs
        .out		(dout[W-1:0]),		 // Templated
        // Inputs
        .rstn		(rstn),
        .clk		(clk),
        .en		(din_vld),		 // Templated
        .in		(din[W-1:0]));		 // Templated

//-------------------------------------------------------------------

endmodule

//////////////////////////////////////////////////////////////////////
//* [EMACS]
//////////////////////////////////////////////////////////////////////
// Local Variables:
// verilog-auto-inst-param-value:t
// End:

Here is the 'bfr' module:

module bfr //*
#(parameter W  = 32)
 (//** Inputs
  input              rstn,
  input              clk,
  input              en,
  input      [W-1:0] in,
  //** Outputs
  output reg [W-1:0] out

  /*AUTOINPUT*/   //**
  /*AUTOOUTPUT*/  //**

 );

//////////////////////////////////////////////////////////////////////
//* DECLARATIONS
//////////////////////////////////////////////////////////////////////

/*AUTOREG*/
/*AUTOWIRE*/

//////////////////////////////////////////////////////////////////////
//* BUFFER
//////////////////////////////////////////////////////////////////////

//
always@(posedge clk or negedge rstn)
if (~rstn)
     out <= DV;
else if (en)
     out <= in;

endmodule


@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2017-01-18T13:50:06Z


As the help for verilog-auto-inst-param-value describes, the parameter must be set to a number in the instantiation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant