当前位置:网站首页>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
边栏推荐
- OpenCV----YOLACT实例分割模型推理
- 【NeurIPS 2019】Self-Supervised Deep Learning on Point Clouds by Reconstructing Space
- Numpy's broadcasting mechanism (with examples)
- RuntimeError: output with shape [4, 1, 512, 512] doesn‘t match the broadcast shape[4, 4, 512, 512]
- Vscode download and installation + running C language
- Idea debug debugging tutorial
- ROS series (IV): ROS communication mechanism series (1): topic communication
- [latex] formula group
- 作为一名码农,女友比自己更能码是一种什么体验?
- TreeSet课后练习
猜你喜欢

51 single chip microcomputer: D / a digital to analog conversion experiment

Retrieval question answering system baseline

Variables, constants, operators

Idea debug debugging tutorial

Overview of knowledge map (II)

Design and implementation of redis (3): persistence strategy RDB, AOF

Does China Mobile earn 285 million a day? In fact, 5g is difficult to bring more profits, so where is the money?

将编译安装的mysql加入PATH环境变量

SQL learning record

变量、常量、运算符
随机推荐
[latex] differences in the way scores are written
[AI vision · quick review of NLP natural language processing papers today, issue 29] Mon, 14 Feb 2022
Design and implementation of redis (6): how redis achieves high availability
Photoshop installation under win10
ROS series (V): common commands in ROS
ROS series (IV): ROS communication mechanism series (6): parameter server operation
Digital image processing third edition Gonzalez notes Chapter 2
UDP协议与TCP协议
2021-09-03 crawler template (only static pages are supported)
RuntimeError: output with shape [4, 1, 512, 512] doesn‘t match the broadcast shape[4, 4, 512, 512]
Identificateur, mot - clé, type de données
php导出Excel表格
MySQL zip installation tutorial
[AI vision · quick review of NLP natural language processing papers today, issue 28] wed, 1 Dec 2021
常用的辅助类
A function second kill 2sum 3sum 4sum problem
(valid for personal testing) compilation guide of paddedetection on Jetson
Writing latex with vscode - the latest tutorial 2022 / 4 / 17
Second kill all interval related problems
[AI vision · quick review of NLP natural language processing papers today, issue 30] Thu, 14 APR 2022