stanford
Full Member level 2
Let's say we have a flop declared like this. When we = 0, it is assumed that ram will hold its value, and when we = 1, the value will update to din. If we don't specify what happens with else, why does this construct implicitly loop the flop output into the input of the mux even though we haven't told it to?
Is below what the tool assumes it to be?
Code:
always @ (posedge clk) begin
if (we)
ram[address] <= din;
end
Is below what the tool assumes it to be?
Code:
always @ (posedge clk) begin
if (we)
ram[address] <= din;
else
ram <= ram;
end