This website uses cookies. By using this site, you consent to the use of cookies. For more information, please take a look at our Privacy Policy.
Home > Wiki encyclopedia > SP

SP

The stack pointer always points to the top of the stack. Generally, the bottom of the stack cannot be moved, so the stack pointer must be modified before the data is put on the stack, so that it points to the new free space, and then the data is stored in. The opposite is true when it is out of the stack.

The stack pointer keeps track of the top address of the stack at any time, and accesses the data according to the principle of "advance after last".

SP

Catalogues

Introduction

The stack is a special linear table, which is a linear table that only allows insert or delete operations at one end of the table. The end of the table that allows insert and delete operations is called the top of the stack. The other end of the table is called the bottom of the stack. The current position of the top of the stack is dynamic, and the mark of the current position of the top of the stack is called the top pointer of the stack. When there are no data elements in the stack, it is called an empty stack. The insertion operation of the stack is usually called stacking or stacking, and the deleting operation of the stack is usually called unstacking or popping.

The stack in the computer is mainly used to store temporary data, local variables and the return address of the interrupt/call subroutine program.

The stack pointer is a special stack pointer (usually called TOP) during the stack operation, indicating the location of the top element of the stack.

The stack pointer always points to the top element of the stack.

The stack can grow downward (towards lower addresses) or grow upward.

If the stack grows upward, when the data is pushed onto the stack, the stack pointer is incremented by 1, and then pushed onto the stack. When popping the stack, the data is first popped and the stack pointer is decremented by one. If the stack grows downward, the pointer will decrease by 1 when the data is pushed onto the stack, and increase by 1 when the data is pushed out of the stack.

ASSOCIATED PRODUCTS

  • XC3064-125PC84C

    XC3064-125PC84C

    FPGA XC3000 Family 4.5K Gates 224 Cells 125MHz 5V 84-Pin PLCC

  • XCV200-6FG256C

    XCV200-6FG256C

    FPGA Virtex Family 236.666K Gates 5292 Cells 333MHz 0.22um Technology 2.5V 256-Pin FBGA

  • XC4028XL-2HQ160I

    XC4028XL-2HQ160I

    FPGA XC4000X Family 28K Gates 2432 Cells 0.35um Technology 3.3V 160-Pin HSPQFP EP

  • XC5VFX130T-1FFG1738I

    XC5VFX130T-1FFG1738I

    FPGA Virtex-5 FXT Family 65nm Technology 1V 1738-Pin FCBGA

  • XC5VFX130T-2FFG1738I

    XC5VFX130T-2FFG1738I

    FPGA Virtex-5 FXT Family 65nm Technology 1V 1738-Pin FCBGA

FPGA Tutorial Lattice FPGA
Need Help?

Support

If you have any questions about the product and related issues, Please contact us.