简体   繁体   English

如何使用 emacs verilog-mode 获得声明订单 AUTOINST?

[英]How to get declaration order AUTOINST with emacs verilog-mode?

When using vim autoinstantiation, I get an AUTOINST in declaration order as shown.当使用 vim 自动实例化时,我在声明顺序中得到一个 AUTOINST,如图所示。 But, I need to use emacs AUTO_TEMPLATE for multiple instantiations, so I am trying to use "emacs --batch file.v -f verilog-batch-auto".但是,我需要使用 emacs AUTO_TEMPLATE 进行多个实例化,所以我尝试使用“emacs --batch file.v -f verilog-batch-auto”。 Unfortunately, this is giving a sorted order.不幸的是,这是一个排序的顺序。 How can I get this declaration order AUTOINST using emacs verilog-mode?如何使用 emacs verilog 模式获得此声明订单 AUTOINST?

DWC_mipi_dsi_host i_DWC_mipi_dsi_host_left
    (/*AUTOINST*/
      //APB Interface
    .presetn                        (presetn                                              ), // input 
    .pclk                           (pclk                                                 ), // input 
    .paddr                          (paddr[9:0]                                           ), // input 
    .penable                        (penable                                              ), // input 
    .psel                           (psel                                                 ), // input 
    .pwrite                         (pwrite                                               ), // input 
    .pwdata                         (pwdata[31:0]                                         ), // input 
    .prdata                         (prdata[31:0]                                         ), // output
    .interrupt                      (interrupt                                            ), // output
      //DPI INTERFACE
    .dpipclk                        (dpipclk                                              ), // input 
    .dpivsync                       (dpivsync                                             ), // input 
    .dpihsync                       (dpihsync                                             ), // input 
    .dpipixdata                     (dpipixdata[`DSI_HOST_PIXELDATAWIDTH-1:0]             ), // input 
    .dpidataen                      (dpidataen                                            ), // input 
    .dpishutdn                      (dpishutdn                                            ), // input 
    .dpicolorm                      (dpicolorm                                            ), // input 
    .dpiupdatecfg                   (dpiupdatecfg                                         ), // input 
    .edpihalt                       (edpihalt                                             ), // output

According to the documentation at http://doc.endlessparentheses.com/Fun/verilog-auto-inst.html it seems I need to use verilog-auto-arg-sort:nil and verilog-auto-inst-sort:nil根据http://doc.endlessparentheses.com/Fun/verilog-auto-inst.html的文档,看来我需要使用 verilog-auto-arg-sort:nil 和 verilog-auto-inst-sort:nil

I have tried to set them in ~/.emacs and in the bottom of the file, but there is no difference.我尝试将它们设置在 ~/.emacs 和文件底部,但没有区别。 Any ideas?有任何想法吗?

// Local Variables:
// verilog-library-flags:("-f ../src/files.vc")
// verilog-auto-arg-sort:nil
// verilog-auto-inst-sort:nil
// End:

As it turns out, this is due to an older version of verilog-mode which came preinstalled with emacs.事实证明,这是由于预装了 emacs 的旧版本的 verilog-mode。

emacs Verilog --> Version and FAQ
You are using verilog-mode 2017-08-07-c085e50-vpo-GNU

This can be fixed by updating verilog-mode according to instructions at https://www.veripool.org/wiki/verilog-mode这可以通过根据https://www.veripool.org/wiki/verilog-mode的说明更新 verilog-mode 来解决

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM