UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
5,056 Views
Registered: ‎04-18-2015

A simulation waveform question

Jump to solution

Can anyone tell me what is the answer for this question? I am not sure whether it is A2 or A3.

 

Best wishes

648139509037473677.jpg
0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
9,113 Views
Registered: ‎04-18-2015

Re: A simulation waveform question

Jump to solution

@muzaffer@thakurr

 

Thanks for the help.

 

I did a simulation today. However, I found out that the A2 or A3 is dependent on where does the first flip-flop get its input.

 

If it gets its input from the testbench directly, the waveform looks like A2. See signal a,b,c, ignore d:

If it gets its input from the previous flip-flop, the waveform looks like A3. Assume a is the previous flip-flop, see signal b,c,d: 

Asynchronous Input.jpg

 

 

Anyone know why?

 

Best wishes

0 Kudos
9 Replies
Teacher muzaffer
Teacher
5,026 Views
Registered: ‎03-31-2012

Re: A simulation waveform question

Jump to solution

@d4223738 we really don't want to do your homework for you. But I have a clue for you: what would the waveform be at the wire between Q of the first flop and D of the second flop? If you can answer this, then ask what is the waveform at A again. 

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Moderator
Moderator
5,017 Views
Registered: ‎09-15-2016

Re: A simulation waveform question

Jump to solution

Hi @d4223738

 

Answer should be A2 as A should propagate till D with the gap of one clock cycle.

 

Regards

Rohit

 

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

Regards
Rohit
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

0 Kudos
Adventurer
Adventurer
5,005 Views
Registered: ‎04-18-2015

Re: A simulation waveform question

Jump to solution

Hi @thakurr

Thanks for the reply.

I am wondering do I need to consider timing violation?

Input A goes high at the same time the clock goes high.

Best wishes

0 Kudos
Teacher muzaffer
Teacher
4,990 Views
Registered: ‎03-31-2012

Re: A simulation waveform question

Jump to solution

@thakurr are you sure? I think it is worth firing up a simulator and checking.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Moderator
Moderator
4,978 Views
Registered: ‎09-15-2016

Re: A simulation waveform question

Jump to solution

Hi @d4223738

 

 It is worth writing a test bench and simulate. Here is the wave form which hope clears your doubt.

ttt.PNG

 

Also timing voilation should not be ignored anyway. Timing engine in Vivado make sure that your design is perfectly analyzed and all the hold and set up requirement are strongly met.

 

Regards

Rohit

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

Regards
Rohit
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

0 Kudos
Moderator
Moderator
4,976 Views
Registered: ‎09-15-2016

Re: A simulation waveform question

Jump to solution

@muzaffer

 

Thank you for your advice. It was actually worth doing.

 

Regards

Rohit

Regards
Rohit
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

0 Kudos
Teacher muzaffer
Teacher
4,970 Views
Registered: ‎03-31-2012

Re: A simulation waveform question

Jump to solution

@thakurr can you please show the waveform on the net between Q of first flop & D of second flop in addition to A &  C nets?

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Adventurer
Adventurer
9,114 Views
Registered: ‎04-18-2015

Re: A simulation waveform question

Jump to solution

@muzaffer@thakurr

 

Thanks for the help.

 

I did a simulation today. However, I found out that the A2 or A3 is dependent on where does the first flip-flop get its input.

 

If it gets its input from the testbench directly, the waveform looks like A2. See signal a,b,c, ignore d:

If it gets its input from the previous flip-flop, the waveform looks like A3. Assume a is the previous flip-flop, see signal b,c,d: 

Asynchronous Input.jpg

 

 

Anyone know why?

 

Best wishes

0 Kudos
Teacher muzaffer
Teacher
4,894 Views
Registered: ‎03-31-2012

Re: A simulation waveform question

Jump to solution

@d4223738 the question to ask yourself is "what happens if a flop receives a change at its input at delta before clock?" In your "input from the testbench directly" case, waveform a & b are (almost) identical. Again ask yourself if this is a physically realizable DFF behavior. Another question is "in a real circuit where would the first flop get its input?" and in a related way "how should the testbench generate proper input to device under test?"

 

I hope these questions help you answer your question.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos