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

Structs as output ports don't work with stub generation recipe #1461

Closed
veripoolbot opened this issue Jun 11, 2019 · 2 comments
Closed

Structs as output ports don't work with stub generation recipe #1461

veripoolbot opened this issue Jun 11, 2019 · 2 comments
Assignees
Labels

Comments

@veripoolbot
Copy link
Collaborator

@veripoolbot veripoolbot commented Jun 11, 2019


Author Name: Paul Donahue
Original Redmine Issue: 1461 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


I have this port list on a module:

module Foo (input logic Clk,
             output DutPkg::FullOutput_s FullOutput);

I followed the recipe for generating stubs from https://www.veripool.org/projects/verilog-mode/wiki/Faq#How-do-I-make-a-Stub-module

However, verilog-mode doesn't seem to recognize FullOutput as an output:

module FooStub (/*AUTOARG*/
    // Inputs
    Clk
    );
  /*AUTOINOUTPARAM("Foo")*/
  /*AUTOINOUTMODULE("Foo")*/
  // Beginning of automatic in/out/inouts (from specific module)
  input logic		Clk;
  DutPkg::FullOutput_s	FullOutput;
  // End of automatics
endmodule : FooStub

I would expect FullOutput to be in the port list and the "output" keyword to appear in the AUTOINOUTMODULE section. In playing around, I found that it seems to work if FullOutput is declared as one of the built-in types but not when it is something else I typedef'ed.

I have attached a tarball with the Foo module, the FooStub module, a Makefile, and the verilog-mode.el I used (which is the latest from last week).

Thanks,

-Paul

@veripoolbot
Copy link
Collaborator Author

@veripoolbot veripoolbot commented Jun 11, 2019


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-06-11T21:15:23Z


Thanks for the very clear example, this makes it a lot easier.

Unfortunately Verilog-mode needs to know what is a type (as in cases without the :: it might otherwise be an interface). If you add this to Foo.sv and FooStub.sv it works, or equivalently to some startup file.

// Local Variables:
// verilog-typedef-regexp: "_s$"
// End:

@veripoolbot
Copy link
Collaborator Author

@veripoolbot veripoolbot commented Jun 12, 2019


Original Redmine Comment
Author Name: Paul Donahue
Original Date: 2019-06-12T00:49:48Z


Thanks for another fast response. I'm sorry to bother you since I see now that this is already documented.

Your suggestion, of course, works great.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.