In a simple architecture(not considering parallel architecture) how exactly this can be performed in a single clock cycle: P:R1 <- R2, R2 <-R1 where R1 and R2 are registers and P is a control variable.

I do not exactly understand when does this microoperation gets completed on the rising edge of the beginning of the cycle or just before clock transition.


1 Answer 1


One way this can be performed in a single cycle is through register renaming. If the processor supports register renaming, no data needs to be moved: one simply renames which register is called R1 and which one is called R2.

If the processor doesn't support register renaming, the other option is that the data can simply be swapped between the two registers.

  • $\begingroup$ How swapping will take place in 1 clock cycle considering registers to be positive edge triggered.I mean exact sequence of events with respect to the clock cycle.??? $\endgroup$
    – saladi
    Jul 25, 2015 at 6:22
  • $\begingroup$ @saladi, I see no reason why it'd be any different than any other 1-cycle read-compute-write update (e.g., incrementing R1). $\endgroup$
    – D.W.
    Jul 25, 2015 at 6:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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