我想在 verilog 端口列表之后附加一些代码,其形式如下:
module module_name (
input wire in1,
input wire in2,
output wire out1
);
我正在寻找有关如何使用 sed(或其他命令)查找以“module”开头并以“);”结尾的端口列表的帮助。然后在“);”之后的行附加一些代码
命令:
sed '/^module/,/);/a code to append' test.v
将“要附加的代码”放在匹配序列中的每一行上,而不仅仅是在它之后
module module_name (
code to append
input wire in1,
code to append
input wire in2,
code to append
output wire out1
code to append
);
code to append