sudhirkv
Advanced Member level 4
- Joined
- Dec 13, 2005
- Messages
- 106
- Helped
- 8
- Reputation
- 16
- Reaction score
- 1
- Trophy points
- 1,298
- Location
- Chennai, India
- Activity points
- 1,992
Hi everybody....
I need to generate reset pulse where it goes low for 100 milli seconds and goes high for another 10ms and then goes low for another 10 ms and then goes high after that.
I have written the code as below. its working fine.
But i want to know any other way to code for this task.
always @ (posedge ClkIn or negedge n_Reset)
begin
if(!n_Reset)
begin
n_resetout <= 1'b0;
resetcount <= 24'b0;
end
else if(resetcount < 24'h7A120)
begin
n_resetout <= 1'b0;
resetcount <= resetcount+1;
end
else if(resetcount >= 24'h7A120 && resetcount < 24'h86470)
begin
n_resetout <= 1'b1;
resetcount <= resetcount+1;
end
else if((resetcount >= 24'h86470) && (resetcount < 24'h100590))
begin
n_resetout <= 1'b0;
resetcount <= resetcount+1;
end
else if(resetcount >= 24'h100590)
n_resetout <= 1'b1;
end
I need to generate reset pulse where it goes low for 100 milli seconds and goes high for another 10ms and then goes low for another 10 ms and then goes high after that.
I have written the code as below. its working fine.
But i want to know any other way to code for this task.
always @ (posedge ClkIn or negedge n_Reset)
begin
if(!n_Reset)
begin
n_resetout <= 1'b0;
resetcount <= 24'b0;
end
else if(resetcount < 24'h7A120)
begin
n_resetout <= 1'b0;
resetcount <= resetcount+1;
end
else if(resetcount >= 24'h7A120 && resetcount < 24'h86470)
begin
n_resetout <= 1'b1;
resetcount <= resetcount+1;
end
else if((resetcount >= 24'h86470) && (resetcount < 24'h100590))
begin
n_resetout <= 1'b0;
resetcount <= resetcount+1;
end
else if(resetcount >= 24'h100590)
n_resetout <= 1'b1;
end