【发布时间】:2015-08-23 00:56:52
【问题描述】:
我有多个文件,如下所示
module (
input a;
output b;
);
xx inst_xx (
.in (xxin),
.ou (xxou)
);
assign a = b;
endmodule
我想在第一次出现); 模式之后添加一行
`include "defines.vh"
所以最后它应该看起来像
module (
input a;
output b;
);
`include "defines.vh"
xx inst_xx (
.in (xxin),
.ou (xxou)
);
assign a = b;
endmodule
任何使用sed 或awk 的东西都会很有用。
【问题讨论】:
-
以
xx inst_xx开头的块呢?那也应该在输出中吗? -
不,需要忽略提到的块
xx inst_xx。刚刚更正了所需的输出。