[英]Is Verilog code with disable named block operation synthesizable?
具有命名塊操作的Verilog代碼是否可以合成? 下面是一個這樣的示例:
module named_block_disable();
reg [31:0] bit_detect;
reg [5:0] bit_position;
integer i;
always @ (bit_detect)
begin : BIT_DETECT
for (i = 0; i < 32 ; i = i + 1) begin
// If bit is set, latch the bit position
// Disable the execution of the block
if (bit_detect[i] == 1) begin
bit_position = i;
disable BIT_DETECT;
end else begin
bit_position = 32;
end
end
end
命名塊始終是可合成的-它是disable
語句,可能對某些工具有問題。 這種擺脫循環的用法應該是可綜合的。 在SystemVerilog中,您將使用break
語句,該語句肯定是可綜合的。 for
循環必須是靜態展開的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.