Altera_Forum
Honored Contributor
9 years agoSynthesis output for multiple driver within one always
Hi,
I came across a code snippet and has been boggling my mind quite a bit. The equivalent to the code is below: a is output and x is an internal register always@(posedge clk) begin a <= 1'b1; if (x == 1) begin a <= 1'b0; end end My question is this: What happens when x is 1? I know simulation results show 0. It takes the last value, but that's not what I'm looking for. What happens on the hardware? What signal is prioritized? How does the synthesis tool interpret this? Technically speaking, isn't this situation (X==1) a multiple driver issue? Thanks in advance.