Code Monkey home page Code Monkey logo

trivialmips_software's Introduction

Software for TrivialMIPS

Structure

The project contains source code that runs on board and tools/scripts that can be used to convert the source code to proper format:

  • bootrom folder contains programs that will be pre-initialized in bootrom, whose entry point is 0xBFC00000. The output will be a filename.coe file, which can be used in the customization of Block RAM IP.
  • ram folder contains programs that are intened to be written to SRAM, whose entry point is 0x80000000. By design, the final output of a program are two files: filename.base.bin and filename.ext.bin. You should write it to two slies of SRAM respectively by offset 0. The output of bootrom/boot_from_mem.s should be used in bootrom in order to jump to the entry point of SRAM.
  • func_test contains functional tests from Loongson
  • perf_test contains performance tests from Loongson

Endianness

Endianness MATTERS! --Harry

The CPU itself is little-endian, that is, the most significant byte is the one with the highest address. As for initialization files, coe and mem files put MSB on the leftmost side, so 0x12345678 will still be 12345678 in these files. For little-endian binary memory files, it will be 0x78 0x56 0x34 0x12, and xxd will show it as 78563412. The compiler and linker should be set in Big Endian mode (-EL) when compiling from assembly or C/C++ code.

The converter from bin to mem we use does the following work on each line of the given file:

  • read 4 bytes (0x78 0x56 0x34 0x12)
  • write it out in reverse sequence (12345678)

trivialmips_software's People

Contributors

harry-chen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.