sim.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Copyright (c) 2004-2006 by Tensilica Inc. ALL RIGHTS RESERVED.
  2. / These coded instructions, statements, and computer programs are the
  3. / copyrighted works and confidential proprietary information of Tensilica Inc.
  4. / They may not be modified, copied, reproduced, distributed, or disclosed to
  5. / third parties in any manner, medium, or form, in whole or in part, without
  6. / the prior written consent of Tensilica Inc.
  7. */
  8. /* sim.h
  9. *
  10. * Definitions and prototypes for specific ISS SIMCALLs
  11. * (ie. outside the standard C library).
  12. */
  13. #ifndef _INC_SIM_H_
  14. #define _INC_SIM_H_
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /* Shortcuts for enabling/disabling profiling in the Xtensa ISS */
  19. extern void xt_iss_profile_enable(void);
  20. extern void xt_iss_profile_disable(void);
  21. /* Shortcut for setting the trace level in the Xtensa ISS */
  22. extern void xt_iss_trace_level(unsigned level);
  23. /* Generic interface for passing client commands in the Xtensa ISS:
  24. * returns 0 on success, -1 on failure.
  25. */
  26. extern int xt_iss_client_command(const char *client, const char *command);
  27. /* Interface for switching simulation modes in the Xtensa ISS:
  28. * returns 0 on success, -1 on failure.
  29. */
  30. #define XT_ISS_CYCLE_ACCURATE 0
  31. #define XT_ISS_FUNCTIONAL 1
  32. extern int xt_iss_switch_mode(int mode);
  33. /* Interface for waiting on a system synchronization event */
  34. extern void xt_iss_event_wait(unsigned event_id);
  35. /* Interface for firing a system synchronization event */
  36. extern void xt_iss_event_fire(unsigned event_id);
  37. /* Interface for invoking a user simcall action,
  38. * which can be registered in XTMP or XTSC.
  39. */
  40. extern int xt_iss_simcall(int arg1, int arg2, int arg3,
  41. int arg4, int arg5, int arg6);
  42. #ifdef __cplusplus
  43. }
  44. #endif
  45. #endif /*_INC_SIM_H_*/