[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  Schedule::Load
  SVN::S4
  Synopsys-modes
  SystemPerl
  Verilog-Pli
  Voneline
  Vregs
General Info
  Papers

Using vl-dir direction control

Added 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.