News

Home > News > Content
The Main Features Of The Program Pop Up Counter
Jun 23, 2017

The program Pop Up Counter is a register in the computer processor that contains the address (location) of the instruction that is currently executing. When each instruction is fetched, the program pops up the memory address of the counter plus one. After each instruction is fetched, the program pops up the counter to the next instruction in the order. When the computer restarts or resets, the program pops up the counter normally to zero.

One of the main elements of the von Neumann computer architecture is "program pre-storage, computer execution"! The program (instruction sequence) to be executed by the processor is pre-stored in the memory of the computer in binary code sequence. The processor fetches the code into the processor and then decodes and executes it to complete the execution of the entire program. In order to ensure that the program can be executed continuously, the CPU must have some means to determine the address of the next fetch instruction. Program Pop Up Counter (PC) is to play this role, it is often called 'instruction Pop Up Counter'.

Before the program begins execution, the start address of the program instruction sequence, that is, the memory address of the first instruction of the program, is sent to the PC. The CPU reads the first instruction (fetch) from memory as instructed by the PC. When the instruction is executed, the CPU automatically modifies the contents of the PC, ie, increments by one for each instruction PC, which is equal to the number of bytes (the number of bytes of instruction) contained in the instruction, so that the PC always points to the next Of the instruction address. Since most of the instructions are executed in order, the process of modifying the PC is usually simply a "number of bytes" to the PC.

When the program is transferred, the final result of the transfer instruction is to change the value of the PC, which is the destination address. The processor is always in accordance with the PC point to fetch, decoding, implementation, in order to achieve the program transfer.

ARM processor uses R15 as a PC, which always points to the fetch unit, and there is only one PC register in the ARM processor that is shared by each mode. R15 has a 32-bit width (the following flag is R15 [31: 0], which means '31' to '0' of R15). The ARM processor can address 4GB of address space directly (2 ^ 32 = 4G ).

In order to ensure that the program (understood as a process in the operating system) can be executed continuously, the processor must have some means to determine the address of the next instruction. And the program Pop Up Counter is to play this role, it is often called the instruction Pop Up Counter. Before the program begins execution, it must send its starting address, that is, the memory address of the first instruction of the program, to the program Pop Up Counter, so the contents of the program Pop Up Counter are the address of an instruction fetched from memory. When the instruction is executed, the processor will automatically modify the contents of the PC, that is, an amount that increments an amount for each instruction PC, which is equal to the number of bytes contained in the instruction so that it remains the address of the next instruction that will always be executed The Since most of the instructions are executed in order, the modification process is usually simply a plus for the PC.

However, when a branch instruction such as a JMP (JUMP) instruction is encountered, the address of the subsequent instruction (ie, the contents of the PC) must be obtained from the address field in the instruction register. In this case, the next instruction fetched from memory will be specified by the branch instruction, rather than in the usual order. So the program Pop Up Counter structure should be a registered information and counting the two functions of the structure.





Adsign International Company Ltd