当前位置:网站首页>Qtspim manual - Chinese Translation
Qtspim manual - Chinese Translation
2022-04-23 03:54:00 【Douglas van punk】
QtSpim manual
QtSpim Is a self-contained Simulator , It will run MIPS32 Assembler and display processor registers and memory . QtSpim The assembly language used for reading and execution is MIPS A program written by a computer .QtSpim Do not execute binary ( The compiled ) Program . To simplify programming ,QtSpim Provides a simple debugger and a small group of operating system services . QtSpim Achieved most of MIPS32 Assembler extension instruction set .( It omits floating-point comparison and rounding modes and memory system page tables .MIPS There are several variants of the architecture , These variants are different in every way ( for example ,MIPS64 Architecture support 64 Bit integer and address ), It means QtSpim Not for all MIPS The processor runs the program .
QtSpim introduction
When QtSpim Startup time , It opens a window , It contains the following windows .( The functions in the window are Microsoft Windows It looks like in Linux or Mac OSX It's a little different in the world , But all menus and buttons are in the same place , And work the same way ).
QtSpim The main window of has three parts :
-
The narrow pane on the left can display integer or floating-point registers . Select the register set by clicking the tab at the top of the pane .
-
The wide pane on the right can display text segments ( Contains instructions ) And data segment . Select between text and data by clicking the tab at the top of the pane .
-
The small pane at the bottom is QtSpim Where to write its message .
All panes are dockable , This means that you can grab the pane through the top bar of the pane and drag it out QtSpim Main window , To be placed in other parts of the screen . QtSpim Another file named “ Console ” The window of , This window displays the output of the program .
Loader
Your program should be stored in a file . Assembly code files usually have extensions “.s”, Such as file1.s As shown in . To load a file , Please go to 【 file 】 menu , And then choose 【Load File Load the file 】. The screen will change as the file is loaded , To display the instructions and data in the program . Another very useful command on the filer is 【Reinitialize and Load File Reinitialize and load files 】. It first clears all changes made by the program , Including all instructions to delete it , Then reload the latest file . This command works well when debugging the program , Because you can change the program and quickly test it on your new computer , Without shutting down and restarting QtSpim.
Run the program
To start the running program after loading the program , Please go to 【Simulator Simulator 】 menu , And then click 【Run/Continue function / continue 】. The program will run until it is completed or an error occurs . Either way , You will see the program on MIPS Changes made to registers and memory , And the output written by the program will be displayed in “ Console ” Window . If your program doesn't work properly , You can do the following . The simplest way is to step between instructions , This allows you to view the changes made by each instruction one at a time . This command is also located in 【Simulator Simulator 】 Menu , be known as 【Single Step Step by step 】.
however , Sometimes you need to run the program for a while to make an error , And the single step execution speed is too slow .QtSpim Allows you to set breakpoints at specific instructions , This stops... Before the instruction is executed QtSpim. therefore , If you think the problem is in a specific function in the program , Please set a breakpoint at the first instruction in the function , Every time the function is called QtSpim Will stop . Right click the command you want to stop , And then choose 【Set Breakpoint To set breakpoints 】 To set breakpoints , You can set breakpoints . After the breakpoint operation is completed , You can select 【Clear Breakpoint clear breakpoints 】 To delete it .
If you want to stop the program while it is running , Please go to 【Simulator Simulator 】 menu , And then click 【Pause Pause 】. This command will stop the program , Let you look around , And continue as needed . If you don't want to continue running , Please click on the 【Stop stop it 】. When QtSpim When it stops , Whether it's due to an error in the program 、 The breakpoint 、 single click “ Pause ” Or after a single step , You can click 【Run/Continue function / continue 】 To continue running the program ( You can also click 【Single Step Step by step 】 Continue to step into ). If you click 【Stop stop it 】 instead of 【Pause Pause 】, Then click 【Run/Continue function / continue 】 The program will be restarted from the beginning , Instead of continuing from where it stopped .( This is roughly the same as the operation of the music player ; You can pause and restart songs , But if you stop the music , You need to play from the beginning .
Display options
The other three menus - 【Registers, Text Segment, and Data Segment register , Text and data segments 】 - control QtSpim Display of . for example ,【Registers register 】 Menu control QtSpim How to display the contents of the register , In binary 、 With 8 Cardinal number ( octal )、 With 10 Cardinal number ( Decimal system ) Or to 16 Cardinal number ( Hexadecimal ). It is often convenient to switch between these representations to understand the data . These menus also allow you to turn off the display of various parts of the machine , This helps reduce clutter on the screen , And let you focus on the really important part of the program or data .
Change registers and memory
You can right-click a register or memory location and select 【Change Register Contents or Change Memory Contents “ Change register contents ” or “ Change memory contents ”】 To change the contents of a register or memory location .
Set up
【Simulator Simulator 】 The menu contains “ Set up ” command , This command will open a dialog , As shown below :
The dialog box has two tabs . first , As shown above , Changed the QtSpim The visual aspect of , For example, font . The second one looks like this :
It changed QtSpim How it works :
-
【Bare machine Bare pager 】 send QtSpim Simulated bare MIPS processor .
-
【Accept pseudo instructions Accept pseudo instructions 】 send QtSpim Can accept MIPS Assembly instructions that are not actually executed , This makes programming easier .
-
【Enable delayed branches Enable deferred branching 】 It can lead to QtSpim Execute the instruction immediately after the branch instruction before transmitting control , And calculate the new address according to the address of the next instruction PC.
-
【Enable delayed loads Enable lazy loading 】 It can lead to QtSpim Delay the value of an instruction loaded from memory after loading the instruction .
-
【Enable mapped IO Enable mapping IO】 The memory map... Will be opened IO.
Marked as 【Simple Machine“ Simple machines ”】 The button enables the most commonly used options for most people (【Accept pseudo instructions Accept pseudo instructions 】). Marked as 【Bare machine Bare pager 】 The button opens with the actual MIPS processor ( Bare pager 、 Delay branch 、 Delay loading ) Corresponding instructions .
版权声明
本文为[Douglas van punk]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230353210867.html
边栏推荐
- Jupiter notebook modify configuration file setting startup directory is invalid
- UDP protocol and TCP protocol
- [latex] formula group
- vscode删除卸载残余
- Numpy's broadcasting mechanism (with examples)
- As a code farmer, what kind of experience is it that a girlfriend can code better than herself?
- Set经典小题目
- Installation and configuration of MinGW under win10
- 秒杀所有区间相关问题
- UDP协议与TCP协议
猜你喜欢
Detailed explanation on the use of annotation tool via (VGg image annotator) in mask RCNN
变量、常量、运算符
Writing latex with vscode - the latest tutorial 2022 / 4 / 17
The art of concurrent programming (2): synchronized usage scenarios
硬核拆芯片
Process seven state transition diagram
Vscode download and installation + running C language
Cause analysis of incorrect time of AI traffic statistics of Dahua Equipment Development Bank
Cuda11 is installed perfectly in win10 X + pytorch 1.9 (blood flowing into the river) cuda. is_ Available() becomes true!
Design and implementation of redis (6): how redis achieves high availability
随机推荐
The art of concurrent programming (6): explain the principle of reentrantlock in detail
抽象类、接口、常用关键字
Vs studio modifies C language scanf and other errors
Set经典小题目
The whole process of connecting the newly created unbutu system virtual machine with xshell and xftp
Cmake qmake simple knowledge
【ICCV 2019】MAP-VAE:Multi-Angle Point Cloud-VAE: Unsupervised Feature Learning for 3D Point Clouds..
秒杀所有区间相关问题
[string] ranking of country names ----- problem solving notes
Use of rotary selector wheelpicker
A function second kill 2sum 3sum 4sum problem
RuntimeError: output with shape [4, 1, 512, 512] doesn‘t match the broadcast shape[4, 4, 512, 512]
Source code and update details of new instance segmentation network panet (path aggregation network for instance segmentation)
OpenCV----YOLACT实例分割模型推理
对象和类的概念
Wechat applet canvas draws a simple asymptotic color of the dashboard
Solve the technical problems in seq2seq + attention machine translation
Instructions for fastmock
[latex] differences in the way scores are written
Idea debug debugging tutorial