mipssim | A simplified MIPS simulator

 by   iurisilvio Python Version: Current License: No License

kandi X-RAY | mipssim Summary

kandi X-RAY | mipssim Summary

mipssim is a Python library. mipssim has no bugs, it has no vulnerabilities and it has low support. However mipssim build file is not available. You can download it from GitHub.

Para utilizar o simulador MIPS, é necessário o Python 2.x instalado.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              mipssim has a low active ecosystem.
              It has 10 star(s) with 0 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 0 open issues and 1 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of mipssim is current.

            kandi-Quality Quality

              mipssim has no bugs reported.

            kandi-Security Security

              mipssim has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              mipssim does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              mipssim releases are not available. You will need to build from source code and install.
              mipssim has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed mipssim and discovered the below as its top functions. This is intended to give you an instant insight into mipssim implemented functionality, and help decide if they suit your requirements.
            • Execute MIP
            • Run the pipeline
            • Go through the pipeline
            • Execute the pipeline
            • Return the current state of the simulation
            • Jump to the given PC instruction
            • Unlock the lock
            • Execute the MIP instruction
            • Create a new instruction
            • Write back to memory
            • Write the instruction back to the memory
            • Write the rd value to the memory
            • Execute the instruction
            • This method is used to process the instruction
            • Execute instruction
            • Performs the instruction
            • Decodes the instruction
            • This method decodes the instruction
            • Decodes the memory into memory
            • Write the instruction to memory
            Get all kandi verified functions for this library.

            mipssim Key Features

            No Key Features are available at this moment for mipssim.

            mipssim Examples and Code Snippets

            No Code Snippets are available at this moment for mipssim.

            Community Discussions

            QUESTION

            QEMU MIPS32 - 16550 Uart Implementation on a Custom Board
            Asked 2019-Nov-01 at 20:35

            I’m trying to use QEMU to emulate a piece of firmware, but I’m having trouble getting the UART device to properly update the Line Status Register and display the input character.

            Details:

            Target device: Qualcomm QCA9533 (Documentation here if you're curious)

            Target firmware: VxWorks 6.6 with U-Boot bootload

            CPU: MIPS 24Kc

            Board: mipssim (modified)

            Memory: 512MB

            Command used: qemu-system-mips -S -s -cpu 24Kc -M mipssim –nographic -device loader,addr=0xBF000000,cpu-num=0 -serial /dev/ttyS0 -bios target_image.bin

            I have to apologize here, but I am unable to share my source. However, as I am attempting to retool the mipssim board, I have only made minor changes to the code, which are as follows:

            • Rebased bios memory region to 0x1F000000

            • Changed load_image_targphys() target address to 0x1F000000

            • Changed $pc initial value to 0xBF000000 (TLB remap of 0x1F000000)

            • Replaced the mipssim serial_init() ¬call with serial_mm_init(isa, 0x20000, env->irq[0], 115200, serial_hd(0), DEVICE_NATIVE_ENDIAN).

            While it seems like serial_init() is probably the currently accepted standard, I wasn’t having any luck with remapping it. I noticed the malta board had no issues outputting on a MIPS test kernel I gave it, so I tried to mimic what was done there. However, I still cannot understand how QEMU works and I am unable to find many good resources that explain it. My slog through the source and included docs is ongoing, but in the meantime I was hoping someone might have some insight into what I’m doing wrong.

            The binary loads and executes correctly from address 0xBF000000, but hangs when it hits the first UART polling loop. A look at mtree in the QEMU monitor shows that the I/O device is mapped correctly to address range 0x18020000-0x1802003F, and when the firmware writes to the Tx buffer, gdb shows the character successfully is written to memory. There’s just no further action from the serial device to pull that character and display it, so the firmware endlessly polls on the LSR waiting for an update.

            Is there something I’m missing when it comes to serial/hardware interaction in QEMU? I would have assumed that remapping all of the existing functional components of the mipssim board would be enough to at least get serial communication working, especially since the target uses the same 16550 UART that mipssim does. Please let me know if you have any insights. It would be helpful if I could find a way to debug QEMU itself with symbols, but at the same time I’m not totally sure what I’d be looking for. Even advice on how to scope down the issue would be useful.

            Thank you!

            ...

            ANSWER

            Answered 2019-Nov-01 at 20:35

            Well after a lot of hard work I got the UART working. The answer to the question lies within the serial_ioport_read() and serial_ioport_write() functions. These two methods are assigned as the callbacks QEMU invokes when data is read or written to the MemoryRegion for the serial device (which is initialized in serial_init() or serial_mm_init()). These functions do a bit of masking on the address (passed into the functions as addr) to determine which register is being referenced, then return the value from the SerialState struct corresponding to that register. It's surprisingly simple, but I guess everything seems simple once you've figured it out. The big turning point was the realization that QEMU effectively implements the serial device as a MemoryRegion with special functionality that is triggered on a memory operation.

            Anyway, hope this helps someone in the future avoid the nightmare I went through. Cheers!

            Source https://stackoverflow.com/questions/58510586

            QUESTION

            serial.c - How do register variables in SerialState get mapped to guest memory?
            Asked 2019-Nov-01 at 20:33

            I'm currently diagnosing an issue where my guest is attempting to poll the LSR for the THRE to clear so that it can output to a UART device. However, the LSR is never updated and therefore it polls indefinitely. I'm using serial_mm_init() on my lightly-customized mipssim board.

            I'm trying to trace through the source to find where the LSR is supposed to be updated, but all I see pertaining to that register is uint8_t lsr in the SerialState struct; I can't find anything that maps that variable to guest memory.

            Could someone explain how SerialState's values are mapped to guest memory?

            ...

            ANSWER

            Answered 2019-Nov-01 at 20:33

            Well after a lot of hard work I got the UART working. The answer to the question lies within the serial_ioport_read() and serial_ioport_write() functions. These two methods are assigned as the callbacks QEMU invokes when data is read or written to the MemoryRegion for the serial device (which is initialized in serial_init() or serial_mm_init()). These functions do a bit of masking on the address (passed into the functions as addr) to determine which register is being referenced, then return the value from the SerialState struct corresponding to that register. It's surprisingly simple, but I guess everything seems simple once you've figured it out. The big turning point was the realization that QEMU effectively implements the serial device as a MemoryRegion with special functionality that is triggered on a memory operation.

            Anyway, hope this helps someone in the future avoid the nightmare I went through. Cheers!

            Source https://stackoverflow.com/questions/58609363

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install mipssim

            You can download it from GitHub.
            You can use mipssim like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/iurisilvio/mipssim.git

          • CLI

            gh repo clone iurisilvio/mipssim

          • sshUrl

            git@github.com:iurisilvio/mipssim.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link