【发布时间】:2017-02-04 19:41:14
【问题描述】:
我不知道如何在 Yosys 中单独合成模块。考虑这个简单的两模块示例:
bottom.v
module bottom(x, out);
input [0:7] x;
output [0:7] out;
assign out = x+1;
endmodule
top.v
module top(x, out);
input [0:7] x;
output [0:7] out;
bottom b(.x(x), .out(out));
endmodule
现在,将这些合成在一起可以按预期工作:
$ yosys -q -o top.blif -S top.v bottom.v
$
但是如果我首先从 bottom.v 合成 bottom.blif,我会收到一条错误消息,指出没有端口 out in模块底部:
$ yosys -q -o bottom.blif -S bottom.v
$ yosys -q -o top.blif -S top.v bottom.blif
ERROR: Module `bottom' referenced in module `top' in cell `b' does not have a port named 'out'.
$
为什么会这样?谷歌搜索问题,我发现在我不完全理解的上下文中对 hierarchy 命令的引用。我曾尝试在 synth 之前运行该命令,但它不影响结果。
【问题讨论】: