This is an exam question (practice exam, not the real one) but I have no idea how to work out the answer:
The computer has a 64-bit CPU with a speed of 2GHz, the instructions perform programmed Input/Output to a device which is attached to a 33MHz bus (32 bits wide). The device registers are memory-mapped in the range e000 to e0ff.
(MOVQ $A,R performs a 64-bit copy from address A to register R.)
Roughly how many CPU cycles would these instructions take to execute?
- MOVQ $0xe000, r1
- MOVQ $0xe000, r2
- MOVQ $0xe000, r3
- MOVQ $0xe000, r4
- MOVQ $0xe008, r5
It's a multiple choice answer and here's the possible options:
- a. Approximately 120 CPU cycles
- b. Approximately 240 CPU cycles
- c. Approximately 600 CPU cycles
- d. Approximately 1200 CPU cycles
- e. Approximately 9600 CPU cycles
So, although I'm looking for the answer, I'm also looking for the reasoning behind the correct answer so that I could answer this correctly by working it out myself if a similar question is in the real exam.
I can't find anything in the text books nor online to help me calculate this.