我正在使用YOSYS将Verilog转换为BLIF。输入是一个电路(L_0_0),它只包含不是,或者基元和一些行为锁存代码。Yosys中的原始码
我使用的命令是:
> read_verilog <file>
> proc; opt; memory; opt; techmap; opt;
> write_blif <file>
输出文件包含$ _DFF_PN0_作为一个没有。模型一个.SUBCKT,所以当我输入这个文件MVSIS,它忽略所有的subckts。
我该如何映射这个子电路,让其他工具有所了解?
.model L_0_0
.inputs clk rst ce ins
.outputs outs
.names $false
.names $true
1
.names $undef
.names outs r_out_1_0 ce $0\outs[0:0]
1-0 1
-11 1
.names r_out_2_0 w_out_2_0 ce $0\r_out_2_0[0:0]
1-0 1
-11 1
.names r_out_1_0 w_out_1_0 ce $0\r_out_1_0[0:0]
1-0 1
-11 1
.names r_out_0_0 w_out_0_0 ce $0\r_out_0_0[0:0]
1-0 1
-11 1
.subckt $_DFF_PN0_ C=clk D=$0\outs[0:0] Q=outs R=rst
.subckt $_DFF_PN0_ C=clk D=$0\r_out_0_0[0:0] Q=r_out_0_0 R=rst
.subckt $_DFF_PN0_ C=clk D=$0\r_out_1_0[0:0] Q=r_out_1_0 R=rst
.subckt $_DFF_PN0_ C=clk D=$0\r_out_2_0[0:0] Q=r_out_2_0 R=rst
.names r_out_0_0 r_out_1_0 w_out_0_0
1- 1
-1 1
.names r_out_2_0 r_out_2_0 w_out_1_0
1- 1
-1 1
.names r_out_0_0 ins w_out_2_0
1- 1
-1 1
.names r_out_0_0 w_in_0_0
1 1
.names r_out_1_0 w_in_0_1
1 1
.names r_out_2_0 w_in_1_0
1 1
.names r_out_2_0 w_in_1_1
1 1
.names r_out_0_0 w_in_2_0
1 1
.names ins w_in_2_1
1 1
.end
带同步复位的新输出如下。 Verilog输出端口都连接好了,似乎它们也连接在BLIF中。
# Generated by Yosys 0.7 (git sha1 61f6811, i686-w64-mingw32.static-gcc 4.9.3 -Os)
.model L_0_0
.inputs clk rst ins
.outputs outs
.names $false
.names $true
1
.names $undef
.names r_out_0_0 $false rst $0\outs[0:0]
1-0 1
-11 1
.names w_out_1_0 $false rst $0\r_out_1_0[0:0]
1-0 1
-11 1
.names w_out_0_0 $false rst $0\r_out_0_0[0:0]
1-0 1
-11 1
.latch $0\outs[0:0] outs re clk 2
.latch $0\r_out_0_0[0:0] r_out_0_0 re clk 2
.latch $0\r_out_1_0[0:0] r_out_1_0 re clk 2
.names r_out_0_0 r_out_1_0 w_out_0_0
11 1
.names ins r_out_1_0 w_out_1_0
1- 1
-1 1
.names r_out_0_0 w_in_0_0
1 1
.names r_out_1_0 w_in_0_1
1 1
.names ins w_in_1_0
1 1
.names r_out_1_0 w_in_1_1
1 1
.end
谢谢。你是对的。我的重置是异步的。当我将其更改为同步或使用techmap命令时,问题就解决了。我的新问题是,当我将此输入到T-VPACK时,它表示存在未连接的端口并生成错误。即使选择也无法解决它。你能帮助我吗?在此先感谢 – Laleh
@Laleh我不知道任何关于T-VPACK。您的设计中是否有未连接的引脚?如果是这样,Yosys不会丢弃它们,因为这会改变模块接口。未连接的输入不应该受到伤害。如果问题是未连接的输入,我会认为这是T-VPACK中的一个错误。如果问题是未连接的输出,我会建议用HDL代码中的常量值来驱动它们。 – CliffordVienna
感谢您的回复。报告的未连接端口是输出,但实际上并未连接。我更新了问题以包含我的Verilog文件以及Yosys的新输出。 – Laleh