veripool / verilog-mode

Verilog-Mode for Emacs with Indentation, Hightlighting and AUTOs. Master repository for pushing to GNU, verilog.com and veripool.org.
http://veripool.org/verilog-mode
GNU General Public License v3.0
262 stars 91 forks source link

how to get the rest part of instance name? #1878

Closed zhanjf closed 6 months ago

zhanjf commented 6 months ago

using @ only can get the first part of instance name , if I want to implement the following example , how can I do?

/*m0 AUTO_TEMPLATE "u_m0_\([a-z 0-9]+\)"(
    .clk_en         (clk_@),
)*/
m0 u_m0_hclk_pd1(/*AUTOINST*/);

m0 u_m0_hclk_pd1(
clk_en  (clk_en_hclk_pd1)
);

Thanks.

wsnyder commented 6 months ago

I think you're looking for something like this: https://www.veripool.org/verilog-mode-faq/#how-do-i-use-auto-template-to-include-the-instantiation-name-for-pin