Rules | Recent posts | topic RSS | Search | Register  | Log in

Delay!! Help!

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> ASIC Design Methodologies & Tools (Digital)
Author Message
jaseel_abdulla



Joined: 13 Aug 2007
Posts: 6


Post03 Sep 2007 14:27   Delay!! Help!

How can we design a digital circuit to delay the negative edge of the input by 2 clock cycles
Back to top
lordsathish



Joined: 11 Feb 2006
Posts: 248
Helped: 26
Location: Asia


Post03 Sep 2007 15:18   Re: Delay!! Help!

hey i think this circuit could be easily designed using a divide by four counter...its pretty simple if you know state machine design...are you going to implement it in HDL or a in circuit using discrete components...
Back to top
jaseel_abdulla



Joined: 13 Aug 2007
Posts: 6


Post05 Sep 2007 4:42   Re: Delay!! Help!

Thanks

How can we implement using divide by 4 counter.

I
Back to top
amitjagtap



Joined: 10 Jan 2007
Posts: 89
Helped: 3


Post05 Sep 2007 10:39   Delay!! Help!

hi jaseel_abdulla
Its true that we will required mod 4 counter.
in addition to that,to delay negative edge by 2 clock cycles, we must exor the outputs Q0 and Q1.
Q0 exor Q1 will give you the reqd waveform.
thanks
Back to top
Gokulmuthu



Joined: 13 Aug 2007
Posts: 6


Post05 Sep 2007 11:19   Re: Delay!! Help!

jaseel_abdulla wrote:
How can we design a digital circuit to delay the negative edge of the input by 2 clock cycles

If the positive edge shouldn't be delayed then use two D flipflops cascaded.
Use the given input as D input to the first flipflop and set inputs of both the flipflops

In this case it should be taken care than the input signal should not violate the minimum pulse width ....If it does then it may lead to metastability in the flipflops



Sorry, but you need login in to view this attachment

Back to top
vlsi_freak



Joined: 03 Sep 2007
Posts: 84
Helped: 4


Post05 Sep 2007 13:07   Re: Delay!! Help!

Thanx
Can u please tell me how will this work..
Back to top
Gokulmuthu



Joined: 13 Aug 2007
Posts: 6


Post05 Sep 2007 13:39   Re: Delay!! Help!

If logic 1 comes, both the flipflops are set so the output comes out without any delay. When the logic goes to 0 the set is removed . So the logic zero is delayed by two clock cycles as it has to pass through two flipflop.
Back to top
avimit



Joined: 16 Nov 2005
Posts: 415
Helped: 68
Location: Fleet, UK


Post05 Sep 2007 14:37   Re: Delay!! Help!

dear Gokulmuthu,
I guess you are not allowed to use this kind of circuitry in digital design, where you are affecting datapath by Async Set/resets. So I wont buy your idea/solution
Kr,
Avi
http://www.vlsiip.com
Back to top
vlsi_freak



Joined: 03 Sep 2007
Posts: 84
Helped: 4


Post06 Sep 2007 4:48   Re: Delay!! Help!

Dear Amit

If u know the answer plz share it.

Thanks in advance
Back to top
uditkumar1983



Joined: 03 Dec 2006
Posts: 87
Helped: 4
Location: India


Post06 Sep 2007 6:19   Delay!! Help!

Hi Amit,
These type of circuit is allowded when passing signal from one clock domain to another clock domain ,and above circuit will work like above problem and as well like synchronous reset removal..
1st flop can go into metastable but second flop will work like synchronizer.
jaseel_abdulla you can design your problem using state machine like this(assumption :positive edge shouldn't be delayed )
Present state Next State, op
i/p=0 i/p =1
A A,0 B,1
B C,1 B,1
C D,1 B,1
D A,0 B,1

After solving Kmap you will get these expression (q1=>MSB,q0=>LSB)
D0 = i/p + q1q0_bar
D1=i/p_bar( q1 exor q0)
O/p = i/p + (q1 exor q0)

I think it may help you ...

Regards
Back to top
avimit



Joined: 16 Nov 2005
Posts: 415
Helped: 68
Location: Fleet, UK


Post06 Sep 2007 10:26   Re: Delay!! Help!

Dear uditkumar1983,
With all respect, I would say that I dont agree with you on this occasion.
1.Where does clock domain corssing comes from? in this simple question
2.Say if we have to delay the -ive of the incoming signal by jsut one clock cycle then?
3. In normal digital design, these type of circuits are not recommended, if you feel 'allowed' it a bit strong here.
4. And I dont even understand where does 'sync reset removal' comes from in this simple problem.

Dear vlsi_freak, Yes I do know the answer, as it is my framed question which sombody picked up from:
http://www.vlsiip.com/misc/q.html

Best way is use a state machine. how? Well I wont say how, its up to you to make out.
Kr,
Avi
Back to top
uditkumar1983



Joined: 03 Dec 2006
Posts: 87
Helped: 4
Location: India


Post06 Sep 2007 12:46   Delay!! Help!

Dear avimit,
I told above word because you was telling these types of circuit not allowded in digital design.and above circuit will work for sync reset removal when we are doing reset from other clock domain (I told these not related with question but related with that circuit features in multiple clock domain design). this type circuit is used in this paper also CummingsSNUG2002SJ_FIFO2.pdf.

Yes above type circuit will not work for if we have to delay the -ive of the incoming signal by jsut one clock cycle , for that purpose we required state machine design only ...

Regards
Back to top
avimit



Joined: 16 Nov 2005
Posts: 415
Helped: 68
Location: Fleet, UK


Post06 Sep 2007 12:53   Re: Delay!! Help!

hi uditkumar1983,
In that case, pls accept my apologies.. Yes, OK, these kind of circuts are accepted in special cases as pointed out by uditkumar1983. But I wont accept them in the context of this question.
Kr,
Avi
http://www.vlsiip.com
Back to top
uditkumar1983



Joined: 03 Dec 2006
Posts: 87
Helped: 4
Location: India


Post06 Sep 2007 13:21   Delay!! Help!

Dear avimit,
For this type of question surely state machine design is a better solution, there is no chances of any flop going into metastability.

But it was very nice for discussing it.

Regards
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> ASIC Design Methodologies & Tools (Digital)
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap