aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine
Commit message (Collapse)AuthorAge
* Remove forgotten debug print in relocation code.Pavel Pisa2019-07-18
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Add config option to reset machine before internal assembler starts.Pavel Pisa2019-07-18
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Simple assembler moved to separate class which is independent on Qt GUI API.Pavel Pisa2019-07-17
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Instructions update and encoding enhanced.Pavel Pisa2019-07-03
| | | | | | | | | Be permissive when signed argument is defined as unsigned value near 2^32 because it is usual way how the negative arguments are encoded on 32-bit system. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Use explicitly declared empty stringlist for instructions without arguments.Pavel Pisa2019-07-03
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Allow underscore in labels.Pavel Pisa2019-07-03
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Add option to parse and show symbolic registers names.Pavel Pisa2019-07-03
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Allow spaces in middle of assembler arguments and report errors.Pavel Pisa2019-07-03
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Extend instruction parsing to accept numeric value continuing by expression.Pavel Pisa2019-07-02
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Add binary complement operation to the parser.Pavel Pisa2019-07-02
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Simple highlighter for assembly language added.Pavel Pisa2019-07-02
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Implement load of sources in emscripten build and minor fixes.Pavel Pisa2019-07-02
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Teach simple embedded assembler .orig and .word directives.Pavel Pisa2019-07-02
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Change instruction parsing to allow multiple words pseudo-operations.Pavel Pisa2019-07-02
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Evaluation of symbolic expressions in assembler added.Pavel Pisa2019-07-02
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Minimal prototype of integrated assembler.Pavel Pisa2019-07-01
| | | | | | | The labels are parsed and stored into symbol table but expressions dependent on symbols values are not evaluated. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Fix memory leakages which repeat during program operation.Pavel Pisa2019-07-01
| | | | | | | There are some singletons left which are allocated/created during main window content population. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Use override to make newer versions of C++ compiler happy.Pavel Pisa2019-06-30
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Memory change counter moved to MemoryAccess and external changes ↵Pavel Pisa2019-06-30
| | | | | | | | | | | notification added. This change together with use of PhysAddrSpace as the memory content source for memory and program view allows to access and monitor contents of peripheral registers and frame-buffer memory from graphic user interface. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Initial optimized version LCD display emulation.Pavel Pisa2019-06-28
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Simulate push of dial buttons by check box.Pavel Pisa2019-06-27
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Convert QString to C string character by character, std::strtol{l} fails ↵Pavel Pisa2019-06-26
| | | | | | | | | | under some circumstances. It seems that under Emscripten build and sometimes even under Windows build the conversion QString.toLatin1().data() does not guarantee well formed null terminated C string. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Allow to create simulator without loaded executable.Pavel Pisa2019-06-26
| | | | | | | This allows to test simple instruction sequences without need to install compiler. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* qtmips_cli: add option to report number of required cycles and stalls.Pavel Pisa2019-04-05
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Implement stall cycles counter and view of CPU cycles counter.Pavel Pisa2019-04-02
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Coreview multiplexers updated and added for branch compare forward.Pavel Pisa2019-04-01
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Set gray background to stalled instructions/idled stages.Pavel Pisa2019-03-31
| | | | | | This allows to easier identify unused pipeline stages. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Change single cycle core with delay slot to use separate fetch stage.Pavel Pisa2019-03-26
| | | | | | | | | | | | When instructions are visualized then it is even more misleading to keep old instruction in decode phase delay buffer. The single cycle core with delay slot is upgraded to the variant with fetch and execute phases. This way the structure is logical and delay slot has purpose. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Highlight instructions passing through the pipeline stages.Pavel Pisa2019-03-25
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Correct write through spelling. Reported by Richard Susta.Pavel Pisa2019-03-25
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Extend qtmips_cli to recognize break and report final state.Pavel Pisa2019-03-24
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Registers and cop0 state updates and reads are visualized by highlights.Pavel Pisa2019-03-17
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Highlight actual word read or written to the cache.Pavel Pisa2019-03-17
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Correct word in block visualization in cache view.Pavel Pisa2019-03-17
| | | | | | | The word index (column) has been erroneously used for set index value. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Make use of QVERIFY_EXCEPTION_THROWN conditional, it is not available on ↵Pavel Pisa2019-03-15
| | | | | | Ubuntu Trusty. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Switch to static libraries by default and ensure application rebuild when a ↵Pavel Pisa2019-03-15
| | | | | | | | | | | | | | | | library changes. I have not found a way how to pass additional CONFIG options to Debian package build (dpkg-buildpackage) when qmake is invoked from debian/rules with debian helper based (dh) build. The way how qmake solves dependencies between program and libraries comes from stone age. It is necessary to include complete path to the library in PRE_TARGETDEPS definition including lib prefix and .a suffix. This is non portable and cannot be easily used when static and dynamic libraries build alternatives are considered. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Allow byte and half-word access to the peripherals.Pavel Pisa2019-03-13
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Fix LB and LH sign extension and LH/SH mask calculation.Pavel Pisa2019-03-13
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Correct use of uninitialized dt_d.num_rd and delete reported by valgrind.Pavel Pisa2019-03-12
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Fix program end by exception if divisor is zero for div instruction.Pavel Pisa2019-03-10
| | | | | | | | | | | | | | | | | | | | Problem reported by Jakub Broz. Correct behaviour according to MIPS Architecture for Programmers Volume II-A: The MIPS32 Instruction Set Manual which describes DIV instruction Format: DIV rs, rt No arithmetic exception occurs under any circumstances. Restrictions: If the divisor in GPR rt is zero, the arithmetic result value is UNPREDICTABLE. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Updated read and write, added open, close, ftruncate syscalls and fs_root ↵Pavel Pisa2019-03-09
| | | | | | | | | | | option. When operating system emulation root directory (fs_root) are selected then open() syscall opens real host system files in this limited subtree. When fs_root is not set then console is mapped to all read, write, open and close calls. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Correct exception setup - break and HW break should cause stop and step over.Pavel Pisa2019-03-06
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Enable configuration of syscalls emulation and stop on exception.Pavel Pisa2019-03-06
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Suppress warning where case fall-through is intentional.Pavel Pisa2019-03-06
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Correct parsing of register + offset operands, i.e., LW and SW.Pavel Pisa2019-03-06
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Try the strict check of encoded instructions and relax break and other.Pavel Pisa2019-03-05
| | | | | | | Some instructions can have fields to be used by operating system or for error reporting by user. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Complete revamp of disassembler and assembler arguments processing.Pavel Pisa2019-03-05
| | | | | | | | | | | | | | | | | | | | | Instructions description in instruction.cpp has been pragmatically augmented by tool based on Python MIPS simulator, hazards analyzer https://github.com/ppisa/apo-simarch That code has been originally distilled from from GNU binutils sources. Implementation is now inline with my original proposal Previous solution gets untenable with more complex instructions and its complexity would grow extremely. MIPS instruction set with coprocessor instructions which use sel field, rd used as index, rt as destination and other peculiarities in newer versions cannot be processed based on basic CPU control signals. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Dock to view coprocessor 0 and cop0 counter/comparator support.Pavel Pisa2019-03-05
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Use irq 3 (HW1) for Rx and irq 2 (HW0) for Tx to be compatible with SPIM.Pavel Pisa2019-03-04
| | | | | | | Jump to address 0x8000180 by default and to EBase + 0x180 when EBase is set to be compatible with real MIPS CPU. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
* Implemented interrupt delivery and processing for serial port.Pavel Pisa2019-03-04
| | | | Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>