K
kb33
Guest
Hi,
I have been always been taught so and try to strictly follow the
practice of splitting my design into combinational and sequential
blocks (see example below). However, I have been asked to look at
somebody's design at my workplace that does not do so, and I do not
know whether I should ignore his style or bring it to the notice of
the manager. I am looking for the most convincing explanation as to
why the second style is not good.
----------My style----------------------
Sequential
---------------
always @(posedge clock)
data_out <= data_out_comb;
Combinational
---------------------
always @(reset_n or data_a or data_b)
if (~reset_n)
data_out_comb = 0;
else
data_out_comb = data_a + data_b;
-------Mixed sequential and combinational design----------------
always @ (posedge clock or negedge reset_n)
begin
if(~reset_n)
data_out <= 0;
else
data_out <= data_a + data_b;
end
P.S The second coding style doesn't even have the signals data_a and
data_b in the sensitivity list.
Thanks
kb33
I have been always been taught so and try to strictly follow the
practice of splitting my design into combinational and sequential
blocks (see example below). However, I have been asked to look at
somebody's design at my workplace that does not do so, and I do not
know whether I should ignore his style or bring it to the notice of
the manager. I am looking for the most convincing explanation as to
why the second style is not good.
----------My style----------------------
Sequential
---------------
always @(posedge clock)
data_out <= data_out_comb;
Combinational
---------------------
always @(reset_n or data_a or data_b)
if (~reset_n)
data_out_comb = 0;
else
data_out_comb = data_a + data_b;
-------Mixed sequential and combinational design----------------
always @ (posedge clock or negedge reset_n)
begin
if(~reset_n)
data_out <= 0;
else
data_out <= data_a + data_b;
end
P.S The second coding style doesn't even have the signals data_a and
data_b in the sensitivity list.
Thanks
kb33