2
0

sys.h 687 B

123456789101112131415161718192021222324
  1. #ifndef SYS_H
  2. #define SYS_H
  3. #define SRAM_ADDR 0
  4. #define SRAM_ADDR_BITS 15
  5. #define SRAM_SIZE (0x1 << SRAM_ADDR_BITS)
  6. #define SRAM_MASK (SRAM_SIZE - 1)
  7. #define SRAM_END (SRAM_ADDR + SRAM_SIZE)
  8. #define STACK_SIZE 2048 /* Minimum stack size */
  9. #define STACK_TOP SRAM_END /* Initial stack pointer */
  10. #define STACK_BOTTOM (STACK_TOP - STACK_SIZE)
  11. #define SDRAM_ADDR 0x40000000
  12. #define SDRAM_ADDR_BITS 25
  13. #define SDRAM_SIZE (0x1 << SDRAM_ADDR_BITS)
  14. #define SDRAM_MASK (SDRAM_SIZE - 1)
  15. #define SDRAM_END (SDRAM_ADDR + SDRAM_SIZE)
  16. /* This need to match the corresponding Verilog constants */
  17. #define _PC_RESET 0
  18. #define _PC_IRQ 0x20
  19. #endif /* SYS_H */