2
0

sys.h 936 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef SYS_H
  2. #define SYS_H
  3. /*
  4. * Various constants that need to match the hardware configuration.
  5. * This file must be includable from assembly and from a linker script.
  6. * XXX: generate this the fixed parameters here from iodevs.conf and
  7. * share with the Verilog code.
  8. */
  9. #define SRAM_ADDR 0
  10. #define SRAM_ADDR_BITS 15
  11. #define SRAM_SIZE (0x1 << SRAM_ADDR_BITS)
  12. #define SRAM_MASK (SRAM_SIZE - 1)
  13. #define SRAM_END (SRAM_ADDR + SRAM_SIZE)
  14. #define STACK_SIZE 2048 /* Minimum stack size */
  15. #define STACK_TOP SRAM_END /* Initial stack pointer */
  16. #define STACK_BOTTOM (STACK_TOP - STACK_SIZE)
  17. #define SDRAM_ADDR 0x40000000
  18. #define SDRAM_ADDR_BITS 25
  19. #define SDRAM_SIZE (0x1 << SDRAM_ADDR_BITS)
  20. #define SDRAM_MASK (SDRAM_SIZE - 1)
  21. #define SDRAM_END (SDRAM_ADDR + SDRAM_SIZE)
  22. /* This need to match the corresponding Verilog constants */
  23. #define _PC_RESET 0
  24. #define _PC_IRQ 0x10
  25. #endif /* SYS_H */