I understand that always
block can be used to implement procedural and sequential logic.
- Will the gate-level realization of the following two codes be the same? If yes, what is the correct way of describing this continuous-time logic?
a.
module func(input a, input b , output reg o);
always @(a,b)
o=a&b;
endmodule
b.
module func(input, a, input b, output o);
assign o = a & b;
endmodule
In (a), 'o' is a reg type and in (b) it is a wire. What does this difference mean?
- What are the required 'always' block properties for the synthesis tool to implement a FF? I know the following will result in a FF:
always @(posedge clk or negedge rst)
[...]
But, I'm looking for a more in-depth understanding.