always @(posedge clk) begin
if (en) begin
Q <= D;
end
endThat verilog will work with most tools, but it seems to me that if I want to use Icarus synthesis, I have to change the code to the following:
always @(posedge clk) begin
if (en) begin
Q <= D;
end else begin
Q <= Q;
end
endHowever, this doesn't really describe a register with an enable signal. Is this making any sense?
Thanks for any insights.
-d
