yosys - Vivado 无法识别 Yosys 生成的 EDIF 文件中的单元

标签 yosys

我尝试使用 Yosys 生成 edif 文件,然后将其与 Vivado tcl 脚本结合使用,为 Artix 7 (xc7a15t) FPGA 生成比特流。然而,Vivado 似乎在处理 edif 文件中的一些单元时遇到了问题。

当我在 Vivado 中完全使用相同的 verilog 和约束文件时,比特流创建得很好,并且当我将其加载到 FPGA 上时,它按预期工作。

我已经根据示例 here 建模了我的工作流程.

具体来说,我使用以下 shell 脚本作为 yosys 和 Vivado 命令的前端:

#!/bin/bash
yosys run_yosys.ys
vivado -nolog -nojournal -mode batch -source run_vivado.tcl

run_yosys.ys:

read_verilog top.v
synth_xilinx -edif top.edif -top top

run_vivado.tcl

read_xdc top.xdc
read_edif top.edif
link_design -part xc7a15tftg256-1 -top top
opt_design
place_design
route_design
report_utilization
report_timing
write_bitstream -force top.bit

top.v(简单的闪烁示例):

`default_nettype none

module top (
            input wire clk,
            output reg led);

        reg [24:0]     cnt = 25'b0;

        always @(posedge clk) begin
                cnt <= cnt + 1'b1;
                if (cnt == 25'b0) begin
                        led <= !led;
                end
                else begin
                        led <= led;
                end
        end

endmodule // top

top.xdc:

create_clock -period 25.000 -name clk -waveform {0.000 12.500} [get_ports clk]

set_property -dict {IOSTANDARD LVCMOS33 PACKAGE_PIN N11} [get_ports clk]
set_property -dict {IOSTANDARD LVCMOS33 PACKAGE_PIN D1} [get_ports led]

set_property CONFIG_VOLTAGE 3.3 [current_design]
set_property CFGBVS VCCO [current_design]

Vivado tcl 命令opt_design 生成以下错误:

ERROR: [DRC INBB-3] Black Box Instances: Cell 'GND' of type 'GND/GND' has undefined contents and is considered a black box.  The contents of this cell must be defined for opt_design to complete successfully.

我在单元格'VCC'中遇到了同样的错误。

在调用 link_design 时,我也收到与此相关的警告:

CRITICAL WARNING: [Netlist 29-181] Cell 'GND' defined in file 'top.edif' has pin 'Y' which is not valid on primitive 'GND'.  Instance 'GND' will be treated as a black box, not an architecture primitive

我在这里使用 Yosys 是否不正确?正确的流程是什么?我是 Yosys 的新手,所以如果我错过了一些明显的东西,请原谅我。

我使用的是 Yosys 0.8+147 和 Vivado 2017.2

最佳答案

解决方案在 Yosys user manual 。 Vivado 提示“VCC”和“GND”单元,因此我们必须将 -nogndvcc 选项传递给 write_edif。正如 -nogndvcc 选项的说明中所述,为此,我们必须使用 hilomap 将 VCC 和 GND 与自定义驱动程序关联。完整的 xilinx 综合是通过以下方式实现的:

synth_xilinx -top top
hilomap -hicell VCC P -locell GND G
write_edif -nogndvcc top.edif

关于yosys - Vivado 无法识别 Yosys 生成的 EDIF 文件中的单元,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54602701/

相关文章:

yosys - 脚本参数

yosys - iCE40 IceStorm FPGA 流程 : Bi-directional IO pins

linux - iceprog .. 找不到 iCE FTDI USB 设备(Linux 权限问题??)

yosys - yosys 是否保留端口顺序?

yosys - 带有verific的yosys正式功能是什么?

yosys - 如何在 Yosys 中使用多个包含同名模块的 IP 核

yosys - 为什么 yosys 重新编号向量端口?

yosys - 如何使用 IceStorm iCE40 FPGA 流程运行综合后仿真