CPU Simulator - Simos Introduction

zhaozj2021-02-16  68

CPU Simulator - Simos Introduction

Developing and debugging a new system on hardware is very wasteful. It is also very good to be a headache. If there is a stable simulation of actual hardware analog environments will bring us great help in actual work. The programs typically run on the virtual machine will have a slower, but these disadvantages become "pain" in the actual development of debugging, it is no longer important. Some similar technologies in foreign countries have existed, and they also released some works. Simos Release 2 is the first version of Stanford University. Let's talk about the use of CPU simulation virtual machine environments and virtual machines: 1. Download CPU Simulator (SIMOS) can go to Stanford University on the homepage of simulation CPU research (http://simos.stanford.edu) download one of them released CPU simulator Release 2 (current). When downloading, you will ask you to fill in a form, which is relatively simple, after filling, you can download it. If you don't want to fill in what form, you can see the downloaded link directly to visit http://simos.stanford.edu/release2/download.html. 2. Installing SIMOS 2.1 System Demand Vost of the SIMOS developers are using SGI's computer, the operating system used is the IRIX operating system of SGI, SIMOS recommended running system is based on MIPS R4000 SGI computer, operating system is IRIX5.2 or higher, although not in SGI other processors such as R5000, R8000 is fully tested above, but the software should be properly running on these processors. The current release of the SIMOS cannot be run on or on a MIPS R3000-based processor or a low version of the IRIX operating system. The currently released Simos Release 2 can support running on Sun-based SPARC. If you don't have SGI or Sun's computer, you can try SiMOS to run under your operating system, it should be not difficult to port SIMOS to UNIX-based Big-Endian, if ported to DEC or Interl The x86 series of Little-Endian machines may need to be more work, as the code of the SIMOS, which is considered to run SIMOS, and the byte sequence of the processor simulated by SIMOS. Hardware requirements: SINOS requires a lot of CPU, memory, and hard disk resources. Minimum configuration requires 50 m memory, a few hundred m hard drives. Of course, the CPU runs is, the better. Software demand: Need Perl 5.002 or higher version; Gzip / Gunzip already contains tools used on the SGI / Sun computer in the downloaded package, if you want to compile the source code, you need Gmake and GCC, you can Download these tools with anonymous ftp to preP.ai.mit.edu. 2.2 Stanford released SIMOS components currently released three parts: The first part is SIMOS source code and binary file; the second part is the system core of Irix 5.3 transplanted SIMOS; the third part is running in SIMOS Some application examples above the IRIX system. All of these files require a total of 100m space. Establish SIMOS under / usr / local, put all components in this directory. Set the $ SIMOS_DIR environment variable, point to the directory of the Simos just established. Host #> STENV SIMOS_DIR / local / usr / simos file Simos1.0-binaries.tar.gz contains all source code of SIMOS, and some support files.

Host #> CD $ Simos_Dir Host #> Gunzip Simos 2.0-binaries.tar.gz Host #> TAR VFX Simos 2.0-binaries.tar You can see the source code. If your Simos runs on the SGI platform, you should copy $ SIMOS_DIR / BIN / SGI / SPLOT.PS to / usr / local / lib host #> cp bin / sgi / splot.ps / usr / local / lib 2.3 Compile SIMOS Source Codes You can use the binaries in the SIMOS release package, you can compile SIMOS from the source code. The process of compilation is very simple, move the src directory below the $ SIMOS_DIR directory, enter the src directory, enter Gmake. Before compiling, you should set an environment variable $ CPU, the environment variable CPU is now only supporting two kinds, one is the other of the SGI, if compiled above the platform of SGI, then the obtained binary is SIMOS, if The Sun's platform is compiled, then the obtained binary is SIMOS-SPARC. After compiling, you will find the compiled binaries in the $ SIMOS_DIR / BIN directory. The architecture of the code is easy to extend the new CPU, IO device, and system interface. In the SRC, there is a Makefile to control the compilation option, you can modify makefile to reach your compile request. 3. Installing Irix 5.3 on SIMOS 5. Now SIMOS's most significant feature is to simulate an SGI computer that can run the IRIX operating system on the SIMOS. Using the IRIX operating system on SIMOS requires certain licenses, downloading IRIX needs to agree to a license. You can download from http://simos.stanford.edu / IRIX 5.3 kernel that can run on SIMOS. 3.1 IRIX 5.3 Cable SIMOS2.0-IRIX.TAR.GZ file contains IRIX's IRIX's IRIX's operating system kernel. To download this file, you need to get SGI's license. Host #> cd $ simos_dir host #> gunzip simos2.0-irix.tar.gz Host #> TAR VFX Simos 2.0-Irix.tar In order to run on the SIMOS, IRIX needs to do a small amount of modification, modify the main device driver For additional information about this version of IRIX, please visit http://www.sgi.com/products/hardware/challenge/irix53/irix53.html. 3.2 Establishing an IRIX boot disk file In order to be able to start the operating system, there must be some configuration files and programs on the startup disk file. Since the SGI use permissions, Stanfurt does not publish an IRIX boot disk file with SIMOS, you can use the following two ways to establish Your own boot disk file, from an existing boot disk or from an SGI machine. In the published binaries, there is a mkfs that uses the IRIX file file system, no matter that way, we must run a script to create the MKFS input, establish the specific process of starting the launcher and run the script. SIMOS's user manual has been described in detail. Finally, we must generate a ROOT.DISK read-only file, SIMOS will run information during operation, and configure it to the file.

The root.disk file must be chained in the path of SIMOS running as disk0.1. i: The first way to establish the boot disk file using Irix 5.3 is your iRix5.3 distribution disk, SGI's distribution disk The file format is an EFS format, and you need to use a computer running IRIX to access. You can make a boot disk file according to the following steps. 1, Host #> INST -A -F / CDROM-R / TMP / SIMOS-CD-FILES -I C _ eoe, c_eoe, compiler_eoe, eoe1, eoe2, x_eoe, inSight.sw.data, DPS_EOE.SW.DPSFONTS After Insight.sw.public After running this command, the / tmp / simos-cd-file will have a dozens of M files, 2, enter the $ SIMOS_DIR / Disks / Build directory, edit the root-cd.bld file, this The file is used to describe where the files need to be found, the specific format of the file is described in the user manual, and we only need to modify the first line of this file, change the file where the installed IRIX operating system is located. . 3, run the make-cd-root-disk script, this script must be executed with superuser, this script is running for a while, and finally you will see the "Successful Completion" word, otherwise, wherever there is an error, start disk The file is not produced successfully. If the above steps are correct, you will discover read-only boot files in $ Simos_Dir / Disk / Build Directory, move this file below the $ SIMOS_DIS / DISK / Build directory. The created startup file has a root partition, and 20 m exchange partitions. II: Use the Irix 5.3 operating system to make a boot disk file if you don't have an Irix 5.3 disc, then you can use the Irix 5.3 operating system to make a boot disk file, which uses this method to make a boot disk file is also very simple. 1. Edit the root-host.bld file below the $ SIMOS_DIR / DISKS / Build directory according to the computer you run the Irix system. For details, please see the user manual. 2. Run the make-host-root-disk script file, this script also requires your specific superuser permissions. If everything you will see the words "successful completion". Move the file to $ Simos_DIS / DISK / Build below, the file also contains a ROOT partition 20m switch partition. 4. Run the test running on SIMOS 4.1 Before running SIMOS Run SIMOS, you need to configure some environment variables, you can add these environment variables to the .cshrc file, as follows: Host #> setENV SIMOS_DIR / USR / local / simos (or wherever you put it) host #> setENV CPU SGI HOST #> STENV TCL_LIBRARY $ SIMOS_DIR / Build-Files Host #> set path = $ simos_dir / bin / $ cpu $ simos_dir / bin / (add SIMOS to PATH) If you are on Sun's work platform Then, the environment variable CPU is set to Sun, then you need to create an init.simos file, please refer to the user manual for the creation method.

转载请注明原文地址:https://www.9cbs.com/read-21894.html

New Post(0)