SAP Computer program counter

Source: Internet
Author: User

Program counter

The program was stored in memory with the first instruction at binary address 0000, and the second instruction at address 0001,  The third at address 0010 and so on. The program counter, which are part of the control unit, counts from 0000 to 1111. Its job was to send the memory the address of next instruction.

The program counter are reset to 0000 before computer run. When the computer run begins, the program counter sends address 0000 to the memory. The program counter are then incremented to get 0001. After the first instruction are fetched and executed, the program counter sends address 0001 to the memory. Again The program counter is incremented. After the second isntruction are fetched and executed, the program counter sends address 0010 to the memory. In this-this-is-keeping track of the next instruction-to-be fetched and executed. Counter

The program counter are like someone pointing at a list of instruction, saying does this first, does this second, etc. The counter is sometimes called a pointer; It points to a address in memory where something important is being stored.

1 LibraryIEEE;2  Useieee.std_logic_1164. All;3  Useieee.std_logic_unsigned. All;4 5 EntityPc is6 Port 7 (    8Ep:inch  Std_logic;--! Active high output enable from PC, or tri-state9Clr:inch  Std_logic;--! Active High Asynchronous clearTenClass:inch  Std_logic;--! Falling Edge Clock OneCp:inch  Std_logic;--! Active high Enable PC to count AQ: out Std_logic_vector(3 Downto 0)--! 4-bit PC output - );  - EndPC; the  - ArchitectureBeh ofPc is -  - SignalCount:Std_logic_vector(3 Downto 0); +  - begin +  A Process(Clr,ep,cp,clk,count) at begin -     ifCLR ='1'  Then -Q <="0000"; -Count <="0000"; -elsif CP ='1'  Then -          if(CLK'event and CLK ='0') Then in             ifCount <"1111"  ThenCount <= Count +1; -             ElseCount <="0000"; to             End if; +         End if;  -      End if; the      *     ifEP ='0'  Then  $Q <="ZZZZ";Panax Notoginseng     Else         -Q <=count; the     End if; +  A End Process;  the  + EndBeh

SAP Computer program counter

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.