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

Use of verilog-auto-inst-param-value for multidimensional signal #981

Closed
veripoolbot opened this issue Oct 21, 2015 · 4 comments
Closed
Assignees
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Amol Nagapurkar
Original Redmine Issue: 981 from https://www.veripool.org
Original Date: 2015-10-21
Original Assignee: Wilson Snyder (@wsnyder)


Following is my code.
Module 'a' is base module, which has "my_data" as a two dimensional signal.

Module top, which has 2 instance of module 'a'. I like to instantiate the module a with Different parameter values for NUM & TUM.

At the top level expected declaration should be as below.
input [TEST0_NUM-1:0] TEST0_my_data [TEST0_TUM];
input [TEST1_NUM-1:0] TEST1_my_data [TEST1_TUM];

but after completing auto, the "NUM" parameter is translated correctly as TEST0_NUM & TEST1_NUM, but not TUM.
The verilog-auto-inst-param-value is set as "true"

Thanks in advance.


module a(
parameter NUM=1;
parameter TUM=80;
input [NUM-1:0] my_data[TUM];
);

endmodule

module top (/AUTOARG/
// Inputs
TEST1_my_data, TEST0_my_data
)
/AUTOINPUT/
// Beginning of automatic inputs (from unused autoinst inputs)
input [TEST0_NUM-1:0] TEST0_my_data [TUM]; // To a_0 of a.v
input [TEST1_NUM-1:0] TEST1_my_data [TUM]; // To a_1 of a.v
// End of automatics
/AUTOOUTPUT/
/AUTOWIRE/

/*
a AUTO_TEMPLATE
(
.(.) (TEST@_\1[][]),
);
/
a #(/AUTOINSTPARAM/
// Parameters
.NUM (TEST0_NUM), // Templated
.TUM (TEST0_TUM)) // Templated
a_0 (/AUTOINST/
// Inputs
.my_data (TEST0_my_data/
[TEST0_NUM-1:0]
/)); // Templated

a #(/AUTOINSTPARAM/
// Parameters
.NUM (TEST1_NUM), // Templated
.TUM (TEST1_TUM)) // Templated
a_1 (/AUTOINST/
// Inputs
.my_data (TEST1_my_data/[TEST1_NUM-1:0]/)); //Templated

endmodule
// Local Variables:
// verilog-auto-inst-param-value:true
// End:

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-10-21T11:45:35Z


In lisp, "t" is true, not "true". Then it should work.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Amol Nagapurkar
Original Date: 2015-10-21T11:50:07Z


Thanks for replay
I have tried changing "true" to "t" as suggested, but results are same.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-10-21T14:01:30Z


Sorry, was looking at the first part of the declaration. At present unpacked arrays don't propagate; I'll see if that can be supported.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-10-27T14:05:57Z


Fixed in git and verilog-mode-2015-10-27-6587336-vpo.

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

2 participants