B
bir
Guest
Guys
I need some help. Look at the style of the codes below.
reg a;
always @(negedge tlr, posedge tclk)
if (!tlr)
a <= 0;
else
if (read)
a <= 1;
and now look below.
always @(negedge tlr, posedge tclk)
begin
if (tlr==1'b0)
a <= 1'b0;
else
if (read==1'b1)
a <= 1'b1;
end
My questions are
1. How necessary is it to use begin and end in always block at the
start and end of an always block in a situation like this above.
2. For the the condition how is tlr == 1'b0 better than using (!tlr) or
vice versa.
3. Finally what difference does it make between
a <= 0; a<= 1'b0;
I was told that a<=0 is not a good practise?? What would an rtl
from a generic point of view look like with the above code in
considereation.
Plz help me out with solid reasons.
Thanks
Rik
I need some help. Look at the style of the codes below.
reg a;
always @(negedge tlr, posedge tclk)
if (!tlr)
a <= 0;
else
if (read)
a <= 1;
and now look below.
always @(negedge tlr, posedge tclk)
begin
if (tlr==1'b0)
a <= 1'b0;
else
if (read==1'b1)
a <= 1'b1;
end
My questions are
1. How necessary is it to use begin and end in always block at the
start and end of an always block in a situation like this above.
2. For the the condition how is tlr == 1'b0 better than using (!tlr) or
vice versa.
3. Finally what difference does it make between
a <= 0; a<= 1'b0;
I was told that a<=0 is not a good practise?? What would an rtl
from a generic point of view look like with the above code in
considereation.
Plz help me out with solid reasons.
Thanks
Rik