王凡臺灣大學:電機工程學研究所黃雯婷Huang, Wen-TingWen-TingHuang2007-11-262018-07-062007-11-262018-07-062007http://ntur.lib.ntu.edu.tw//handle/246246/53331This thesis describes our work on constructing an emulator for emulating multiple hard drive disks. We introduce an operating system mechanism called a virtual hard disk. A virtual hard disk manipulates the requests and responses of device drivers to emulate IDE storage disk. In this way, applications can use the VHD, as well as using physical hard drive disks. No changes to existing device drivers except modest changes to the OS kernel are needed. Furthermore, we introduced the way to build the emulator by generative programming and model-driven development which helps save time and material cost for industral developers and maintainers.Contents i List of Figures iii List of Tables iv Acknowledgements v 1 Introduction 1 2 Emulation of Hard Drive Disk 4 2.1 VHD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 IDE Control Emulator . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2.1 I/O Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 I/O Event Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3.1 System Calls and Signals . . . . . . . . . . . . . . . . . . . . . . 11 2.3.2 Access Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.3.3 Regulation of Time . . . . . . . . . . . . . . . . . . . . . . . . . 15 3 Extension of TTCN-3 Executable Engine 17 3.1 Tool Chain Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.1.1 Test and Testing Notation 3(TTCN-3) . . . . . . . . . . . . . . 19 3.1.2 GFT - Graphical Editor . . . . . . . . . . . . . . . . . . . . . . 19 3.1.3 TTCN-3 to XML Parser . . . . . . . . . . . . . . . . . . . . . . 20 3.2 Testcase Executable Engine . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2.1 XQuery and XPath . . . . . . . . . . . . . . . . . . . . . . . . . 22 i 3.2.2 Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.3 Extension Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.3.1 Use of C Language . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.3.2 Pointers in C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.3.3 Handling of Special Characters . . . . . . . . . . . . . . . . . . 26 3.3.4 Other Modi cations . . . . . . . . . . . . . . . . . . . . . . . . 26 3.3.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4 Examples 29 4.1 Generation of Request Manager . . . . . . . . . . . . . . . . . . . . . . 30 4.2 Simulation of Cell Phone Communication . . . . . . . . . . . . . . . . . 32 4.3 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5 Related Works 37 6 Conclusions 39 7 Future Work 41 A Prede ned header le of VHD example 42 B Prede ned header les of send/receive example 45 C The C list functions for TTCN-3 47 Bibliography 50. . . . . . . . . . . . . . .995662 bytesapplication/pdfen-US仿真器虛擬硬碟emulatorVHDTTCN-3電腦系統之高效率高階仿真器的建置Efficient and High-Level Emulator Construction for Computer Systemsthesishttp://ntur.lib.ntu.edu.tw/bitstream/246246/53331/1/ntu-96-P94921009-1.pdf