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

Array ports are not handled properly by AUTOINST #637

Closed
veripoolbot opened this issue Apr 11, 2013 · 2 comments
Closed

Array ports are not handled properly by AUTOINST #637

veripoolbot opened this issue Apr 11, 2013 · 2 comments
Assignees
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Rawdon Taylor
Original Redmine Issue: 637 from https://www.veripool.org
Original Date: 2013-04-11
Original Assignee: Wilson Snyder (@wsnyder)


When a sub-module has a port which is an array, AUTOINST does not handle connections to the array port properly. The other AUTO functions correctly handle the array attribute, but AUTOINST inserts syntax errors by trying to refer to the port by its width.

Sample code:

module submod_a (
                  //Inputs
                  input wire signed [15:0]  serial_in,
                  //Outputs
                  output wire signed [15:0] parallel_out [0:7]
                  );
endmodule

module submod_b (
                  //Inputs
                  input wire signed [15:0]  parallel_out [0:7],
                  //Outputs
                  output wire signed [15:0] final_out [0:7]
                  );
endmodule

module top (
             /*AUTOINPUT*/
	    // Beginning of automatic inputs (from unused autoinst inputs)
	    input logic signed [15:0] serial_in,    // To a_inst of submod_a.v
	    // End of automatics
             /*AUTOOUTPUT*/
	    // Beginning of automatic outputs (from unused autoinst outputs)
	    output logic signed [15:0] final_out [0:7]// From b_inst of submod_b.v
	    // End of automatics
             );

     /*AUTOLOGIC*/
     // Beginning of automatic wires (for undeclared instantiated-module outputs)
     logic signed [15:0]	parallel_out [0:7];	// From a_inst of submod_a.v
     // End of automatics

     submod_a a_inst (/*AUTOINST*/
		     // Outputs
		     .parallel_out	(parallel_out[15:0]),
		     // Inputs
		     .serial_in		(serial_in[15:0]));
     submod_b b_inst (/*AUTOINST*/
		     // Outputs
		     .final_out		(final_out[15:0]),
		     // Inputs
		     .parallel_out	(parallel_out[15:0]));

     
endmodule

I expected the instances in top to look like this:

     submod_a a_inst (/*AUTOINST*/
                      // Outputs
                      .parallel_out      (parallel_out),
                      // Inputs
                      .serial_in         (serial_in[15:0]));
     submod_b b_inst (/*AUTOINST*/
                      // Outputs
                      .final_out         (final_out),
                      // Inputs
                      .parallel_out      (parallel_out));

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-04-29T00:20:00Z


Hmm, yes. I have a simple fix that does OK, but there are other issues. Ideally some of the code should be refactored to understand multidimensional packed and unpacked arrays too which would fix this in a much better way. Let me see how hard that will be.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2013-04-30T12:57:00Z


This should be fixed in the latest release.

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