Difference between revisions of "Return Stack"
Jump to navigation
Jump to search
Blwikiadmin (talk | contribs) |
Blwikiadmin (talk | contribs) |
||
Line 9: | Line 9: | ||
*** 12-bit register | *** 12-bit register | ||
*** Single deep calls | *** Single deep calls | ||
− | ** Optionally deeper as build option (uses | + | ** Optionally deeper as build option (uses more registers) |
+ | |||
+ | == Configuring Depth == | ||
+ | |||
+ | * Set STACK_DEPTH_PASS to the max nesting depth of the subroutines in the top file | ||
+ | |||
+ | <pre> | ||
+ | IOP16: ENTITY work.cpu_001 | ||
+ | -- Need to pass down instruction RAM and stack sizes | ||
+ | generic map ( | ||
+ | INST_ROM_SIZE_PASS => 512, -- Small code size since program is "simple" | ||
+ | STACK_DEPTH_PASS => 4 -- Subroutine depth (not nested) | ||
+ | ) | ||
+ | </pre> | ||
+ | |||
+ | == Resources == | ||
+ | |||
+ | * Value = 4 | ||
+ | ** ALMs: 54 | ||
+ | ** Registers: 158 |
Revision as of 14:40, 19 April 2022
IOP-16 Stack
- Last-In, First-Out (LIFO)
- Sizes
- 0 (none)
- No JSRs or RTSs in code
- Can do JMPs
- 1 deep (does not need SRAM)
- 12-bit register
- Single deep calls
- Optionally deeper as build option (uses more registers)
- 0 (none)
Configuring Depth
- Set STACK_DEPTH_PASS to the max nesting depth of the subroutines in the top file
IOP16: ENTITY work.cpu_001 -- Need to pass down instruction RAM and stack sizes generic map ( INST_ROM_SIZE_PASS => 512, -- Small code size since program is "simple" STACK_DEPTH_PASS => 4 -- Subroutine depth (not nested) )
Resources
- Value = 4
- ALMs: 54
- Registers: 158