Xilinx 警告 XST:1710 和 XST:1895 之间到底有什么区别?
What exactly is the difference between the Xilinx warnings XST:1710 and XST:1895?
谁能解释一下这两个 Xilinx 警告之间的区别:
Xst:1710 - FF/Latch reg_0 (without init value) has a constant value
of 0 in block . This FF/Latch will be trimmed during the
optimization process.
Xst:1895 - Due to other FF/Latch trimming, FF/Latch reg_1 (without
init value) has a constant value of 0 in block . This FF/Latch
will be trimmed during the optimization process.
假设"reg"是一个字节长的寄存器。
reg_0
被优化掉(又名修剪),因为它从未被分配但在其他寄存器或网络分配期间被引用。由于它没有指定的初始值,因此合成器默认为零。因此,合成器可以保存 flop(s),并且设计中任何 reg_0
的使用都将被视为逻辑 0。
reg_1
被优化掉了,因为它的值取决于其他已经被优化掉的触发器。使用下面的示例:reg_1
依赖于 reg_0
。由于 reg_0
将始终为零(因为它从未被分配),因此 reg_1
也将始终为零。这就是为什么它说 "Due to other FF/Latch trimming"。合成器保存 flop(s),设计中任何 reg_1
的使用都将被视为逻辑 0。
reg [7:0] reg_0;
reg [7:0] reg_1;
always @(posedge clk) begin
reg_1 <= in & reg_0;
end
总结:
- Xst:1710 - 由于从未分配
而被修剪
- Xst:1895 - 被修剪因为相关逻辑被修剪
结果相同,但原因不同。
如果设计中存在错误,解决 Xst:1710 问题可以自动解决 Xst:1895。如果没有错误,则这些警告指向死代码。
谁能解释一下这两个 Xilinx 警告之间的区别:
Xst:1710 - FF/Latch reg_0 (without init value) has a constant value of 0 in block . This FF/Latch will be trimmed during the optimization process.
Xst:1895 - Due to other FF/Latch trimming, FF/Latch reg_1 (without init value) has a constant value of 0 in block . This FF/Latch will be trimmed during the optimization process.
假设"reg"是一个字节长的寄存器。
reg_0
被优化掉(又名修剪),因为它从未被分配但在其他寄存器或网络分配期间被引用。由于它没有指定的初始值,因此合成器默认为零。因此,合成器可以保存 flop(s),并且设计中任何 reg_0
的使用都将被视为逻辑 0。
reg_1
被优化掉了,因为它的值取决于其他已经被优化掉的触发器。使用下面的示例:reg_1
依赖于 reg_0
。由于 reg_0
将始终为零(因为它从未被分配),因此 reg_1
也将始终为零。这就是为什么它说 "Due to other FF/Latch trimming"。合成器保存 flop(s),设计中任何 reg_1
的使用都将被视为逻辑 0。
reg [7:0] reg_0;
reg [7:0] reg_1;
always @(posedge clk) begin
reg_1 <= in & reg_0;
end
总结:
- Xst:1710 - 由于从未分配 而被修剪
- Xst:1895 - 被修剪因为相关逻辑被修剪
结果相同,但原因不同。
如果设计中存在错误,解决 Xst:1710 问题可以自动解决 Xst:1895。如果没有错误,则这些警告指向死代码。