FAQ
From jmips
What does jMIPS do and what is it intended to do?jMIPS is a program written in Java (hence the 'j') that simulates in software the functions of a MIPS CPU - the processor chip in a MIPS-based computer. "CPU" is an acronym for 'central processing unit', which is the part of a computer which carries out the basic instructions and system operations of a computer program. The current version of jMIPS contains 5 different CPU models of varying complexity, each modeling real advances in computer architecture. These advances include:
The jMIPS utility itself loads and runs 'mips32' executable files containing machine code programs to be run on a 32-bit MIPS processor. jMIPS is a tool for learning about how processors work and therefore can be run in different modes; either simply returning what the mips32 program would return or a displaying a printout of the machine instructions as the processer works. For more information, go to the JMIPS website What is a MIPS processor?MIPS should not be confused with the computer jargon for 'Millions of Instructions Per Second'. The latter is used as a unit in measuring computing performance (speed). Or perhaps it should ... In our context, MIPS might be taken as an acronym for 'Microprocessor without Interlocked Pipeline Stages' [1], but really MIPS as-is is the name and the supposed acronym was invented for the benefit of po-faced people who did not get the joke. Its name is a reference to the unit of speed, and therefore connotes "speed" and nothing more. The MIPS microprocessor was produced by MIPS Computer Systems Inc, or "Speed Computer Systems Inc", on that reading. It's like having a car manufacturer called "MPH" (KPH for users of non-imperial units, or should that be KPS?). Yeah, and "emacs" really does mean "escape meta alt control shift"! MIPS machines embodied the original Reduced Instruction Set Computer (RISC) microprocessor architecture. The design was developed at Stanford in the 1980s, as a test of the idea that one could design a faster processor by making the design simple so that it could be clocked fast (the alternative is making a complicated design that contains loads of optimizing circuitry that slows it down). The same kind of idea resurfaced with the Pentium 4, which deliberately threw out much optimization in favour of increasing the clock speed. RISC designs had great success. The simple and elegant instruction set architecture actually allowed optimizations to be achieved in more generic ways. Super-scalar design (multiple pipelines and more than one instruction per cycle) in particular became possible through RISC. SGI graphics workstations and Sun SPARC machines were all top-of-the class RISC designs in their day. Today most CISC (complex instruction set computers) are actually closer to RISC machines internally, a reconciliation of the opposing design philosophies. MIPS machines were originally 32-bit microprocessors (at a time when Intel chips were still 8 or 16 bit) but today there are both 32- and 64-bit MIPS chips. The first MIPS was the R2000 (1985);later R3000 (1988), R4000 (1991; 64-bit), etc. The 3 basic formats 'on the metal' of MIPS 32-bit instructions are:
Why do I get warnings or errors when I unarchive the zip file?You are on Windows. Or you are running on a Mac and you have yet to set your HFS or HFS+ file system to preserve case (system settings). ... For Windows users who want to 'import from zip/rar' under Eclipse (it must also be possible in NetBeans), follow these steps:
The files will be visible in your package. Where is the FAQ?You are looking at it! [2] How do I get started using jMIPS?Firstly, download the jMIPS package and then read through the README in the package and maybe the wiki documentation. Everything you need should be on the wiki, and if not you can ask for it! That already includes information on compiling (if need be) and running. Have fun! Where can I find more MIPS32 files to run on the simulator?You can make your own! The source code for the example hello_mips32 written in C is included in the misc/ folder of the distributed package. For instructions on how to compile it (and, obviously, other source codes) to MIPS machine code, refer to section 1.4 of the documentation. That says, essentially, "use a compiler if you are on a MIPS platform, or a cross-compiler if you are not on a MIPS platform". The result from compilation will be an ELF format file. If you want pre-compiled code, go and look for some software ready-compiled for MIPS. MIPS is one of the architectures supported by the Linux kernel, so one gets all the usual Linux and Unix stuff in distributions available on archives. ELF is the vendor-neutral standard executable format, and the executables will be ELF format files by default. It's not likely that you'll get something off-the-shelf to run in CPU1, however, unless it's almost as simple as Hello world! Perhaps it's a good idea to put some more such stuff in misc! I have a question which is not answered here. Where could I go next?If you can't find your answer here please feel free to ask a question in our Help forum. Other MIPS emulators are available, why use jMIPS?
Where can I download the latest version of the jMIPS source code?The latest version of the jMIPs code is available here for download I'm having problems submitting code via SVN - what should I do?Check out the forum discussion page - lots of people have posted about specific problems that they're having, and some people have posted replies which explain what they might be doing wrong. If you can't find what you're looking for, create a new post. It's likely that someone else will be having or has had a similar issue, so you might be able to get some support there. Remember! Nobody is obliged to help you, and posting only "I can't do it" is likely to win you as much sympathy and deference as a yowling nipper would get in an airport queue. Everyone else has their own problems too! If you put effort into your posting, detailing exactly what your environment is, what you are typing, what the results are, etc, then people will see the effort you have made and respond to it in similar measure. Otherwise they'll think to themselves "this guy is trying to get something for nothing". That's cadging off other people's labour and biological societies have grown up to not respond to that kind of thing, and virtual societies are no different in that respect. So it's unlikely that "I can't do it" alone will get you anything useful in response. For one thing, nobody can help you given only that as basis. Encourage the response you want by helping helpers to help you. Provide copious detail. Show you have a mind that is willing and that you are likely to pay back any effort put in by other people by learning and teaching them something in the near future if they get you over this hump now, and they'll help. That means showing that you are sharp and 'on the ball'. Explain exactly what research you have done, where you have looked, what you have tried, what you have deduced, and generally show that you're doing your part. Here's my free advice on using subversion:
That works fine. If it doesn't, I google the error message that appears, and do whatever seems sensible according to at least 30% of the posts (I would say that sometimes about half the respondents are unaware that they are speaking in public for posterity, and one has to apply one's own intelligence to filter theirs!). Oh .. and if you edit code, don't dare check in nonworking code! People will shout at you if you do! Always test before commit. Alternative: You can use the TortoiseSVN GUI to help you navigate through all that. Look at the HOWTO on how to use TortoiseSVN. |