0
\$\begingroup\$

I know this is a pretty basic question, but I didn't succeed to find an unambiguous answer. Does a register need to get load signal in the cycle in which the new value computation is made? or at the beginning of the next cycle? Ill give an example to make my question clearer:

lets assume I want to increase PC (program counter register) value by 4 every cycle. In t0 the initial PC value is been transmitted to an adder, which calculate PC+k and is connected back to the PC's entrance. In order that in the next clock t0+Tclock the PC value will be updated to it's new values PC+k , does the controller should have sent a Load signal in t0 or it should sent a Load signal in t0+Tclock (the next clock)?

\$\endgroup\$

closed as unclear what you're asking by Chris Stratton, Dwayne Reid, RoyC, Rev1.0, Dmitry Grigoryev Sep 24 '18 at 10:51

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ There is no generic register hence your question needs to be more detailed. \$\endgroup\$ – Andy aka Sep 22 '18 at 6:52
  • \$\begingroup\$ @Andyaka But this is a concept which I'm new at, I don't have any specific register which I am interested at, in case there are registers which work both ways it is also a good answer for my question. Any further reading reference would be appreciated! \$\endgroup\$ – user5721565 Sep 22 '18 at 6:55
  • 5
    \$\begingroup\$ Research the concept of setup time, understand how this is independent of clock, but when considered along with combinatorial and propagation delays might practically constrain what clock can be used. \$\endgroup\$ – Chris Stratton Sep 22 '18 at 6:55
  • \$\begingroup\$ If the register has 8 FFs, and those FFs directly drive the output pins, then as the data is shifted in, the moving data will be visible to your outside circuits and perhaps cause problems. To prevent this, some registers contain a duplicate set of FFs, that do not shift but are instead used to parallel-load the other group's data once the shifting is complete. \$\endgroup\$ – analogsystemsrf Sep 22 '18 at 15:40
2
\$\begingroup\$

A register is characterized by a setup time \$t_s\$ and a hold time \$t_h\$. These define a window around the clock event during which the input signals must be stable for the register to be guaranteed to work as expected.

If the clock event happens at time \$t_c\$, the input signal must be at the desired new value before \$t_c-t_s\$, and it must maintain that value until at least \$t_c+t_h\$. If this is done, then the new value of the output after the clock event will be as expected. If the input value changes during the window \$t_c-t_s < t < t_c+t_h\$, then it is uncertain what the new output value will be, and the register may even enter a metastable state where its output doesn't take a legal logic level.

enter image description here

(source)

Any control signals such as LOAD and synchronous SET or RESET inputs must meet setup and hold time requirements in exactly the same way as the data input must.

As a side note, it's also common in FPGAs for \$t_h\$ to be negative, so the entire timing window occurs before the clock event (by at least a few picoseconds). This ensures that when one register feeds another, changing the output of the first register doesn't violate the hold time requirement of the next register.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.