vivado生成Bitstream报错[Vivado 12-1345] Error(s) found during DRC. Bitgen not run(Vivado 2017.4)。

发布时间 2023-07-30 18:02:18作者: Xxaj5

写了一个很简单的程序,2-4译码器。

module decoder2to4(
    input in1, in0,
    output reg [3:0]out
    );
    
    always @ (*) begin
        if ({in1, in0} == 2'b00) 
            out = 4'b1111;
        else if ({in1, in0} == 2'b01)
            out = 4'b1101;
        else if ({in1, in0} == 2'b10)
            out = 4'b1011;
        else if ({in1, in0} == 2'b11)
            out = 4'b0111;
        else
            out = 4'b1111;
    end
    
endmodule

然后报错

[Vivado 12-1345] Error(s) found during DRC. Bitgen not run
[DRC NSTD-1] Unspecified I/O Standard: 6 out of 6 logical ports use I/O standard (IOSTANDARD) value 'DEFAULT', instead of a user assigned specific value.

官方给的解释就是:

The error message is to notify customers that they need to set IOSTANDARD and PACKAGE_PIN, in order to protect devices from accidental damage that could be caused by the tools randomly choosing a pin location or IOSTANDARD without knowledge of the board voltage or connections.

大概意思就是为了硬件安全起见,逻辑端口最好最好不要悬空,都要在XDC文件中作约束,我这的问题就是,我忘记给逻辑端口做约束了,所以我加上之后问题解决。

在大点的项目中,很多逻辑端口可能确实用不到,官方也给出其中一个解决办法,直接忽略报错:写一个后缀为.tcl的文件,然后添加下边内容。

set_property SEVERITY {Warning} [get_drc_checks NSTD-1]
set_property SEVERITY {Warning} [get_drc_checks UCIO-1]

右击Generate Bitstream,选择Bitstream setting,然后点击箭头标注的位置,添加上面写的.tcl文件就行。
image

网上搜到的,不管啥问题,都直接用了忽略报错的这种方法,还是要因实际而论,官方也给出了各种情况和解决办法。