Beijer Electronics (formerly QSI Corporation)
http://www.qsiforums.com/

Define to indicate when running in simulator view?
http://www.qsiforums.com/viewtopic.php?f=6&t=3957
Page 1 of 1

Author:  nwest [ Fri Jul 09, 2010 9:03 am ]
Post subject:  Define to indicate when running in simulator view?

Is there a define similar to _TOOL that I can use to conditionally run code based on if I am on the simulator vs the hardware?

My code saves to /drv1/ for the USB access, but the simulator will not cd or create that directory so I have an init that I comment out to choose if I want to use /drv1/ or /sim:/ as my root path.

' when simulating, use this path
'init FILE_ROOT := "/sim:"
' when loading to the terminal use this one
init FILE_ROOT := "/drv1"

would be better if it was a conditional.
#if _SIMULATOR
init FILE_ROOT := "/sim:"
#else
init FILE_ROOT := "/drv1"
#endif

Thanks,
Nathan

Author:  Jeremy [ Fri Jul 09, 2010 9:06 am ]
Post subject:  Re: Define to indicate when running in simulator view?

'Layout View test
#if _TOOL

'Simulation View test
#if _TOOL_SIM

'Layout or Simulation view test
#if _TOOL_ANY

Author:  nwest [ Fri Jul 16, 2010 8:28 am ]
Post subject:  Re: Define to indicate when running in simulator view?

Thanks for the information. Is there a document that lists these?

Nathan

Author:  Ron L. [ Tue Jul 20, 2010 10:23 am ]
Post subject:  Re: Define to indicate when running in simulator view?

_TOOL is partially documented in section 2.21.2 of the Programmers Reference Manual, but the rest of those are un-documented options.
http://www.qsicorp.com/pdf/?id=qlarity/programref

Author:  Jeremy [ Tue Jul 20, 2010 10:34 am ]
Post subject:  Re: Define to indicate when running in simulator view?

I have put in a request to get those options documented.

They are supported options and are not going to be changing, they were simply missed in the documentation.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/