Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Coding the Logic Minimization

Status
Not open for further replies.

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
 

Logic Minimization

you can use state machine also
 

Re: Logic Minimization

if we use the state machine there also we have to use counters to count.

How to optimize the counting technique
 

Logic Minimization

The max time step is 100ms, so the counter size is determined by 100ms, other time steps can reuse this counter.
BR.
ls000rhb
 

Logic Minimization

using FSM can reduce the width of the counter, so it is a good way to reduce the logcal resources.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top