using emacs auto's to instansiate a stub module (inputs=0, outputs=[]

你离开我真会死。 提交于 2019-12-13 07:42:21

问题


I am trying to write a top verilog with instansiations of a few identical modules. the first instansiation should be connected outside, while the other instansiations should be floating. Can anyone help me use the AUTO's with AUTO_TEMPLATE to have emacs connect all inputs to zero, and leave all outputs empty []. I don't have any identification in the module IO name indicating if its input or output (so I can't use wildcards) Is there a way that the tool can identify all inputs (and connect to zero) and all outputs (and leave floating) by itself? Thanks


回答1:


I'v managed to have such modules instantiated by using the auto_template with lisp:

/* module_name AUTO_TEMPLATE ( .(.*) (@"(if (equal vl-dir \"output\") \"\" (concat vl-width \"'b0\"))"), );

*/ that way - all inputs are 0, and outputs are left unconnected!!



来源:https://stackoverflow.com/questions/31184100/using-emacs-autos-to-instansiate-a-stub-module-inputs-0-outputs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!