这个具有未完成敏感性列表的 [verilog] 多路复用器的合成数字电路是什么?
Which is the synthesized digital circuit for this [verilog] mux with an uncompleted sensibility list?
以下代码的合成未优化数字电路是什么:
a、b、c 为 1 位长。
sel 有 2 位。
always@(a, b, sel)
case(sel)
begin
2'b00: a;
2'b01: b;
2'b10: c;
default: 0;
end
endcase
如果我没记错的话,我们会有一个具有三个输入和两个选择位的多路复用器。
作为选择位,我们有 sel[0] 和 sel[1]。
作为输入,我们有 a、b 和一个锁存器。
锁存器将有输入 c 和其他东西。我不知道还有什么要进入闩锁。
这个问题只是教育问题。
这并没有综合成数字逻辑。 c 上锁存器的使能信号必须是 "when any of the 4 bits {a,b,sel} change, and then close it before c changes again".
大多数合成器不考虑灵敏度列表,除非它用于同步逻辑。您在模拟中看到的闭锁行为不会发生 post-synthesis。 @*
加入IEEE1364-2001防止敏感列表意外遗漏的主要原因
如果你真的想输出锁存版本的c
,那么你需要在多路复用器之前创建锁存器:
always @*
if (lat_en) c_latch <= c;
always @*
case(sel)
2'b00: a;
2'b01: b;
2'b10: c_latch;
default: 0;
endcase
电平敏感锁存器在 FPGA 上并不常见。由于时序问题,它们在 ASIC 上很少使用。通常首选边沿敏感触发器:
always @(posedge clk)
if (update) c_ff <= c;
always @*
case(sel)
2'b00: a;
2'b01: b;
2'b10: c_ff;
default: 0;
endcase
以下代码的合成未优化数字电路是什么:
a、b、c 为 1 位长。 sel 有 2 位。
always@(a, b, sel)
case(sel)
begin
2'b00: a;
2'b01: b;
2'b10: c;
default: 0;
end
endcase
如果我没记错的话,我们会有一个具有三个输入和两个选择位的多路复用器。
作为选择位,我们有 sel[0] 和 sel[1]。 作为输入,我们有 a、b 和一个锁存器。 锁存器将有输入 c 和其他东西。我不知道还有什么要进入闩锁。
这个问题只是教育问题。
这并没有综合成数字逻辑。 c 上锁存器的使能信号必须是 "when any of the 4 bits {a,b,sel} change, and then close it before c changes again".
大多数合成器不考虑灵敏度列表,除非它用于同步逻辑。您在模拟中看到的闭锁行为不会发生 post-synthesis。 @*
加入IEEE1364-2001防止敏感列表意外遗漏的主要原因
如果你真的想输出锁存版本的c
,那么你需要在多路复用器之前创建锁存器:
always @*
if (lat_en) c_latch <= c;
always @*
case(sel)
2'b00: a;
2'b01: b;
2'b10: c_latch;
default: 0;
endcase
电平敏感锁存器在 FPGA 上并不常见。由于时序问题,它们在 ASIC 上很少使用。通常首选边沿敏感触发器:
always @(posedge clk)
if (update) c_ff <= c;
always @*
case(sel)
2'b00: a;
2'b01: b;
2'b10: c_ff;
default: 0;
endcase