How does a latch get its initial state? I'm guessing that it depends on race conditions and which ever condition comes first then that is the state that the latch starts off with.
|
|
There is certainly a lot of stuff taught in school that is not required in the job market. And, of course, there is a lot that is not taught that should be. This could probably be said about any job market, since it depends on what specialty the person ends up being employed in. Unfortunately for you, neither your professors or I can tell you what you will and will not use once you get a real job in your field. For example, I don't use calculus in my job as an E.E.. But a coworker, who is also technically an E.E., uses calculus almost daily. I design PCB's and FPGA's, while he writes DSP algorithms. There was no way our teachers could have ever known what we needed to get the job done. That being said... Your question to your teacher, about the initial value of the latch or Flip Flop (FF), was a great question and the way your professor responded shows her ignorance of the requirements for designing practical digital logic circuits. Simply put, the initial value of a Latch or FF is indeterminate. Meaning, it will have an initial value but you won't know what it is in advance. A given latch/FF might even have different initial values from one power-up to the next. Sometimes it'll be a '0', other times a '1'. Things like temperature and how fast the power rails ramp up will effect the initial value. If your circuit requires a known initial value then you must force the value. Normally this is done using some sort of set/reset/clear input that is driven by a reset signal. This is also why almost any digital circuit of reasonable complexity has a reset signal. Reset signals are not just for CPU's. |
|||||||||||||||
|
|
If you mean at turn on (before reset), then it's pretty much as you say - the gates in the FF will not be perfectly symmetrical so one will "win" the race and the latch will head towards that state. Which state it will be is unpredictable. It's a bit like if you balance a ball at the top of a pointy house roof - in theory if everything was perfectly still, it should stay there. In practice it will always roll off to one side or the other. So this is why on turn on, most digital circuits need to be reset to a known state (where it's necessary for the state to be known initially, you mat leave some registers undefined/unused until thy are written to the first time) |
|||
|
|
|
I guess it depends on what latch you are talking about. http://en.wikipedia.org/wiki/Latch_%28electronics%29 Some of the latches can be reset, so you know where you begin with. I also think she was just trying to demonstrate the concept of "unchanged"/"keep" state, it does not really matter what the previous state is. |
|||
|
|
|
Two brief things: for the first question, I'm still a student, I'm doing an internship in a company and I found that many concepts, even some that I considered less important, are useful, and you will complain when you won't know well these notions because you had a bad teacher. (I know that it may seem trivial, but it's the first impression I had when I got to the real world) For the second question, I would just add my point of view: latches and FFs are meant to hold values, and they have sense if you give that value first (unless you want to create a somehow random generator). So, with reset or putting a value, the first step is always the input. |
||||
|
|