|
Forums » Using AUTOs » Using vl-dir direction controlAdded by Yervant Dermenjian 7 months ago I was interested in creating a template that adds a suffix to all the input wires in an instance. I was having trouble figuring it out based on the examples. Wilson helped me out, so I am posting the result here: /* digital_block AUTO_TEMPLATE ( .\(.*\) (\1@"(if (equal vl-dir \"output\") nil \"_sh\")"[]), );*/ dig_block(/*autoinst*/); turns into: dig_block(/*autoinst*/ // Outputs .out1 (out1), .out1 (out2[3:0]), ... // Inputs .in1 (in1_sh), .in2 (in2_sh[3:0]), ...); Thanks. Loading...
|