Issue #525
An Urgent question How to use AUTO_TEMPLATE to handle names of instanced module differently based on port direction
| Status: | Closed | Start date: | 06/16/2012 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - |
Description
I am using AUTO_TEMPLATE to use naming rules to fill in top-level connections of an module instance. But I now need the top-level naming rules to be a function of the port-direction of the instance module.
Here is a simple example to elaborate my need.
INPUT FILES:module inst_module (input aaa, output wire bbb); endmodule
module top_module (); /* inst_module AUTO_TEMPLATE .\(.*\) (\1_in), .\(.*\) (\1_out), */ inst_module i_inst_module (.*); endmodule
EXPECTED RESULTS AFTER AUTO EXPANSION:
module top_module (); inst_module i_inst_module ( .aaa (aaa_in), .bbb (bbb_out) ); endmodule
THe Question is "How do I get this result using AUTO_TEMPLATE and .*
History
Updated by VNS BLORE 11 months ago
In the example I have intentionally given generic port names for the inst_module. This is to show that that the port names of the inst_module do not give the direction. Rather we have to rely on the port definition.
It almost looks like we need something similar to "vl-name", maybe "vl-direction".
Updated by Wilson Snyder 11 months ago
- Status changed from New to Closed
See "vl-dir" in the AUTOINST help (Either under the Verilog menu, then Auto, then AUTOINST, or with M-x describe-function verilog-auto-inst.)
It will be "in", "out" or "inout" then use lisp to do what you want with it.
Also available in: Atom
![[logo]](/img/veripool_small.png)