In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the use of Tool Simulator, which is very detailed and has certain reference value. Friends who are interested must finish reading it!
Simulator can simulate hardware devices and run VxWorks systems. This simulated system can provide most of the standard functions of VxWorks, including network, Shell, and so on. And its construction process is basically the same as the process of building a real hardware device image. With it, we can develop, run and test VxWorks applications directly on Host without hardware devices. In this way, the dependence on hardware equipment is reduced as much as possible in the project development phase. The application program that the outside world interacts with this VxWorks system cannot tell whether it is a simulated device or a real hardware device. Therefore, in addition to speeding up the progress of software development, Simulator can also help us in many areas, such as teaching, project presentation and so on.
The API provided by Simulator in the application layer is no different from the API on real devices. The only difference is the access to peripherals, that is, the drivers of some peripherals cannot be provided. Simulator can simulate at least the following hardware or functions
32/64-bit hardware platform
Console
System Timer
Timestamp
Real-time Clock
Auxiliary Clock
MMU
NVRAM
Virtual Disk
SMP
AMP
ED&R
RTP
ROMFS
Shared Data Region
Shared Library
C++
Network Stack
POSIX
VxMP
VSB
System Viewer
ISR Stack Protection
MIPC
Overlapped Memory
Start
Let's see how to use Simulator. First, create a new VIP.
Select the appropriate BSP and compiler
Compile the VxWorks image, then create a new Simulator Connection, and specify the image you just compiled
Connect, this Connection,Simulator can be used.
Matters needing attention
Some of the limitations of Simulator need to be understood
SMP-multicore Host can provide more accurate SMP function
64-bit Simulator-Host needs to be Windows or Linux of 64-bit
Byte Order-Simulator simulates a small-end environment in Windows/Linux, while a large-end environment in Solaris.
Hardware Breakpoint-Simulator does not support Hardware Breakpoint
MMU-does not distinguish between kernel / user mode, so RTP has the potential to destroy Kernel space
Floating Point-Simulator does not support the following floating-point functions
Cbrt () ceil () infinity () irint () iround () round () sincos () trunc () cbrtf () infinityf () irintf () iroundf () log2f () roundf () sincosf () truncf () acosf () asinf () atanf () atan2f () ceilf () cosf () fabsf () floorf () fmodf () logf () log10f () powf () sinf () sqrtf () tanf () tanhf ()
Interrupt-Simulator uses Host's message to simulate hardware interrupts under Windows, while under Solaris and Linux, Host's signal is used
The ISR Stack Protection-Windows system has automatically detected the overflow and underflow of ISR Stack, so there is no need for Simulator to do any extra work
Resource access
Simulator can simulate most of the standard functions of VxWorks, for example, some functions related to system resources or file systems are as follows
NVRAM-Simulator uses files on Host to simulate NVRAM, and the default location is the directory where the image is located. The size of NVRAM is NV_RAM_SIZE, and its space can be accessed through sysNvRamSet () and sysNvRamGet ()
Serial Device-through the components INCLUDE_HOST_SIO and library commSio (Windows) or ttySio (Linux/Solaris), Simulator can access Host's serial device HOST_SIO_PORT_NUMBER, but only for COM1 and COM2
Network-complete Network can be simulated through the Network Daemon,Simulator on the host side
Shared Memory Network-Simulator can simulate multiple CPU boards using shared backboards (such as VME bus) for communication scenarios.
PassFS-Simulator can access Host's files directly using the default included component INCLUDE_PASSFS (pass-through file system). After Simulator starts, a virtual device is created and formatted as passFS. The name of this device defaults to "host:", which can be modified in the properties of Connection.
Then you can access Host's files directly.
Virtual Disk
Simulator can simulate block devices through Virtual Disk. For example, after including the corresponding components, use the following code to create a 3MB file fileX on the host side and format it into a block device "/ Q" with 512 bytes of block and 32 track
INCLUDE_VIRTUAL_DISK (default)
INCLUDE_FS_MONITOR
INCLUDE_XBD_BLK_DEV
INCLUDE_DOSFS_FMT
VdBlkDev = virtualDiskCreate ("fileX", 512,32,323,200)
FsmNameInstall ("/ Q 0", "/ Q")
XbdBlkDevCreateSync (vdBlkDev, "/ Q")
DosFsVolFormat ("/ Q", 0,0)
Host Routine
You can access the functions of the Host system through vxsimHostProcAddrGet ()
The dynamic link library of Host system can be loaded through vxsimHostDllLoad ().
Finally, there is the Memory Layout of Simulator. Note that it is different from the Layout of any real physical device, so just learn about it.
The above is all the content of this article "what is the use of Tool's Simulator?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.