Interview questions

Hi

I just came across some interview questions for digital design, and would like to discuss my solutions with you!

#Design a circuit to divide input frequency by 2 I could do this with a Toggle Flip flop where the inverted output is connected to the input, then i also divide the clock frequency by two

# Design a divide-by-3/divide-by-5 sequential circuit with 50% duty cycle. I was thinking of having here a statemachine that outputs for 3 cycles

0, and then it changes the state to output 3 times a 1 at each clock transition.

# Which one is superior: Asynchronous Reset or Synchronous Reset

Well, until now I was always using asynchronous resets because u find it in most textbooks ;) not so sure about the right answer here!

Reply to
Clemens Blank
Loading thread data ...

Clemens Blank schrieb:

and the best one I came across was to double the clock frequency. How on earth should this be possible, must be a trap!

Reply to
Clemens Blank

For the question about dividing the frequency by two, be sure to note that you wouldn't use the resulting output as a (gated) clock!

To double a frequency the best method is to use a PLL, but this requires some analog components. A DLL works well, but is jittery. A simple dirty method requires just an XOR and a delay element, but that's not a good synchronous design practice.

-Kevin

Reply to
Kevin Neilson

Having a state machine with three high states followed by 3 low states is a divide by 6, not a divide by 3!

The trick here to getting a 50% duty cycle output is to know that you need the positive edge of the incoming clock to control the rising edge of the output clock and the negative edge to control the falling (or vice-versa). This assumes, of course, that the input clock is

50%.

Since most registers can't toggle on both posedge clk and negedge clock in the same flop, the output has to be a combinatorial result from the two edge domains.

- John_H

Reply to
John_H

e.

About clock divider

formatting link

Reply to
muthusnv

I ran a series of posts on this:

formatting link
formatting link
formatting link
hope this helps.

I also have in my blog a full section on interview questions and puzzles:

formatting link
formatting link

hope this helps.

Nir

Reply to
Nir Dahan

Depends upon what your criteria of superior is.

Cheers, Jon

Reply to
Jon Beniston

An easy answer is to use a DCM in Virtex FPGA ... :-) haha details, as said, PLL and DLL...

Reply to
jack.harvard

Another interesting question I read from a newspaper yesterday, how to get more than 10% gain if share prices increase by 10%?

Reply to
jack.harvard

The best answer to all these questions is a question. Starting with the architecture / type of logic.

--
Programmeren in Almere?
E-mail naar nico@nctdevpuntnl (punt=.)
Reply to
Nico Coesel

Is it?

Reply to
Symon

Leverage.... The same way a 10% drop can cost you much more than 10%!!!

Reply to
jtw

Ofcourse. Interview questions are designed to start a technical debate in order to reveal the applicant's knowledge (or lack thereof).

--
Programmeren in Almere?
E-mail naar nico@nctdevpuntnl (punt=.)
Reply to
Nico Coesel

Is that the only purpose?

Reply to
Philip Potter

What other purpose could there be?

Reply to
Symon

I think you all need the philosophy group. This is the place to come when you have a question that needs an answer, not when you have an urge to consider the meaning of life.

Reply to
MikeShepherd564

What are you suggesting?

Reply to
Philip Potter

Isn't it obvious?

Reply to
checo

Last time I looked, a Toggle flip-flop with its output inverted to its input will stop toggling as soon as the output goes high... I think you meant to make a Toggle flip flop using a D flip-flop with the inverted output tied to the D input.

You could do that, but it would be tough to synthesize. A lot easier to have only elements switching on one clock edge or the other. By the way, even so you only get 50% duty cycle out if the clock had 50% duty cycle coming in. There was a nice tool posted called:

Topweaver Anydivider 1.0 Topweaver Tools Family Copyright (c) 2002-2006, Topweaver Author: Song Tianning Website:

formatting link
All rights reserved.

Superior for doing what? Resetting sooner whether the clock is running or not? Resetting in a way that doesn't create glitches on the outputs?

Good Luck, Gabor

Reply to
Gabor

To whom?

Reply to
Symon

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.