sim85e2.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * include/asm-v850/sim85e2.h -- Machine-dependent defs for
  3. * V850E2 RTL simulator
  4. *
  5. * Copyright (C) 2002,03 NEC Electronics Corporation
  6. * Copyright (C) 2002,03 Miles Bader <miles@gnu.org>
  7. *
  8. * This file is subject to the terms and conditions of the GNU General
  9. * Public License. See the file COPYING in the main directory of this
  10. * archive for more details.
  11. *
  12. * Written by Miles Bader <miles@gnu.org>
  13. */
  14. #ifndef __V850_SIM85E2_H__
  15. #define __V850_SIM85E2_H__
  16. #include <asm/v850e2.h> /* Based on V850E2 core. */
  17. /* Various memory areas supported by the simulator.
  18. These should match the corresponding definitions in the linker script. */
  19. /* `instruction RAM'; instruction fetches are much faster from IRAM than
  20. from DRAM. */
  21. #define IRAM_ADDR 0
  22. #define IRAM_SIZE 0x00100000 /* 1MB */
  23. /* `data RAM', below and contiguous with the I/O space.
  24. Data fetches are much faster from DRAM than from IRAM. */
  25. #define DRAM_ADDR 0xfff00000
  26. #define DRAM_SIZE 0x000ff000 /* 1020KB */
  27. /* `external ram'. Unlike the above RAM areas, this memory is cached,
  28. so both instruction and data fetches should be (mostly) fast --
  29. however, currently only write-through caching is supported, so writes
  30. to ERAM will be slow. */
  31. #define ERAM_ADDR 0x00100000
  32. #define ERAM_SIZE 0x07f00000 /* 127MB (max) */
  33. /* Dynamic RAM; uses memory controller. */
  34. #define SDRAM_ADDR 0x10000000
  35. #define SDRAM_SIZE 0x01000000 /* 16MB */
  36. /* Simulator specific control registers. */
  37. /* NOTHAL controls whether the simulator will stop at a `halt' insn. */
  38. #define SIM85E2_NOTHAL_ADDR 0xffffff22
  39. #define SIM85E2_NOTHAL (*(volatile u8 *)SIM85E2_NOTHAL_ADDR)
  40. /* The simulator will stop N cycles after N is written to SIMFIN. */
  41. #define SIM85E2_SIMFIN_ADDR 0xffffff24
  42. #define SIM85E2_SIMFIN (*(volatile u16 *)SIM85E2_SIMFIN_ADDR)
  43. /* For <asm/irq.h> */
  44. #define NUM_CPU_IRQS 64
  45. /* For <asm/page.h> */
  46. #define PAGE_OFFSET SDRAM_ADDR
  47. /* For <asm/entry.h> */
  48. /* `R0 RAM', used for a few miscellaneous variables that must be accessible
  49. using a load instruction relative to R0. The sim85e2 simulator
  50. actually puts 1020K of RAM from FFF00000 to FFFFF000, so we arbitarily
  51. choose a small portion at the end of that. */
  52. #define R0_RAM_ADDR 0xFFFFE000
  53. /* For <asm/param.h> */
  54. #ifndef HZ
  55. #define HZ 24 /* Minimum supported frequency. */
  56. #endif
  57. #endif /* __V850_SIM85E2_H__ */