To use such a tool, load and assemble a LoongArch program of interest then select the desired tool from the Tools menu. The tool's window will open and depending on how it is written it will either need to be "connected" to the LoongArch program by clicking a button or will already be connected. Run the LoongArch program as you normally would, to initiate tool interaction with the executing program.
Beginning with Release 3.2, the abstract class LARS.tools.AbstractLARSToolAndApplication is included in the LARS distribution to provide a substantial framework for implementing your own LARS Tool. A subclass that extends it by implementing at least its two abstract methods can be run not only from the Tools menu but also as a free-standing application that uses the LARS assembler and simulator in the background.
Several Tools developed by subclassing AbstractLARSToolAndApplication are included with LARS: an Introduction to Tools, a Data Cache Simulator, a Memory Reference Visualizer, and a Floating Point tool. The last one is quite useful even when not connected to a LoongArch program because it displays binary, hexadecimal and decimal representations for a 32 bit floating point value; when any of them is modified the other two are updated as well.
Release 3.5 includes new tools, most notably a keyboard and display simulator that allows you to perform memory-mapped I/O (MMIO) using polled and interrupt-driven techniques as described in various references. Click its Help button for more details.
If you wish to develop your own LARS Tool, you will first need to extract the LARS distribution from its JAR file if you have not already done so. All LARS tools must be stored in the LARS/tools directory.
Follow the Tutorial Materials link on the LARS homepage to find a tutorial that covers development of LARS Tools.
Syscalls and syscall number assignments in LARS match those of SPIM for syscalls 1 through 17. However if you wish to change syscall number assignments, you may do so by editing the Syscall.properties file included in the release (this requires extraction from the JAR file).
Follow the Tutorial Materials link on the LARS homepage to find a tutorial that covers development of system calls.
PseudoOps.txt is read and processed at LARS startup, and error messages will be produced if a specification is not correctly formatted. Note that if you wish to edit it you first have to extract it from the JAR file.
Follow the Tutorial Materials link on the LARS homepage to find a tutorial that covers modification of the pseudo-instruction set.
This document is available for printing on the LARS home page http://www.cs.missouristate.edu/LARS/.