All Projects → suquark → Ustc Tmips

suquark / Ustc Tmips

Licence: other

Projects that are alternatives of or similar to Ustc Tmips

TinyMIPS
The Project TinyMIPS is dedicated to enabling undergraduates to build a complete computer system from scratch.
Stars: ✭ 29 (+383.33%)
Mutual labels:  cpu, mips, operating-system
mrisc32-a1
A pipelined, in-order, scalar VHDL implementation of the MRISC32 ISA
Stars: ✭ 21 (+250%)
Mutual labels:  cpu, vhdl
BenEaterVHDL
VHDL project to run a simple 8-bit computer very similar to the one built by Ben Eater (see https://eater.net)
Stars: ✭ 30 (+400%)
Mutual labels:  cpu, vhdl
l4re-core
The core components of the L4Re operating system.
Stars: ✭ 39 (+550%)
Mutual labels:  mips, operating-system
COExperiment Repo
支持 45 条 MIPS 指令的单周期处理器 -- 计算机组成原理实验 NUAA Spring 2017
Stars: ✭ 23 (+283.33%)
Mutual labels:  cpu, mips
Advanced-xv6
Modern improvements for MIT's xv6 OS
Stars: ✭ 26 (+333.33%)
Mutual labels:  cpu, operating-system
xinu-avr
the Xinu OS for AVR atmega328p devices (e.g. Arduino)
Stars: ✭ 18 (+200%)
Mutual labels:  embedded-systems, operating-system
Xboot
The extensible bootloader for embedded system with application engine, write once, run everywhere.
Stars: ✭ 405 (+6650%)
Mutual labels:  embedded-systems, operating-system
Riscv vhdl
Portable RISC-V System-on-Chip implementation: RTL, debugger and simulators
Stars: ✭ 356 (+5833.33%)
Mutual labels:  cpu, vhdl
F32c
A 32-bit RISC-V / MIPS ISA retargetable CPU core & SoC, 1.63 DMIPS/MHz
Stars: ✭ 338 (+5533.33%)
Mutual labels:  vhdl, mips
Mipt Mips
Cycle-accurate pre-silicon simulator of RISC-V and MIPS CPUs
Stars: ✭ 250 (+4066.67%)
Mutual labels:  cpu, mips
Unicorn
Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, X86)
Stars: ✭ 4,934 (+82133.33%)
Mutual labels:  cpu, mips
Forth Cpu
A Forth CPU and System on a Chip, based on the J1, written in VHDL
Stars: ✭ 244 (+3966.67%)
Mutual labels:  cpu, vhdl
register-rs
Unified interface for type-safe MMIO and CPU register access in Rust
Stars: ✭ 48 (+700%)
Mutual labels:  cpu, operating-system
Neorv32
A small and customizable full-scale 32-bit RISC-V soft-core CPU and SoC written in platform-independent VHDL.
Stars: ✭ 106 (+1666.67%)
Mutual labels:  cpu, vhdl
J1sc
A reimplementation of a tiny stack CPU
Stars: ✭ 64 (+966.67%)
Mutual labels:  cpu, vhdl
The Hack General Purpose Computer
Using HDL, from Boolean algebra and elementary logic gates to building a Central Processing Unit, a memory system, and a hardware platform, leading up to a 16-bit general-purpose computer. Then, implementing the modern software hierarchy designed to enable the translation and execution of object-based, high-level languages on a bare-bone computer hardware platform; Including Virtual machine,Compiler and Operating system.
Stars: ✭ 39 (+550%)
Mutual labels:  cpu, operating-system
Vexriscv
A FPGA friendly 32 bit RISC-V CPU implementation
Stars: ✭ 1,041 (+17250%)
Mutual labels:  cpu, vhdl
QNICE-FPGA
QNICE-FPGA is a 16-bit computer system for recreational programming built as a fully-fledged System-on-a-Chip in portable VHDL.
Stars: ✭ 51 (+750%)
Mutual labels:  cpu, vhdl
Nontrivial Mips
NonTrivial-MIPS is a synthesizable superscalar MIPS processor with branch prediction and FPU support, and it is capable of booting linux.
Stars: ✭ 417 (+6850%)
Mutual labels:  cpu, mips

TINY MIPS

We implement a tiny MIPS CPU with a tiny OS running on it.

The OS only need the following instructions:

  • addu & addiu
  • slt
  • beq & bne
  • j & jr

USTC tMIPS Memory Mapping Documentation

Overview

While no bus existing in the CPU, the port to data_mem act as a bus in fact. The address is used to switch between devices, including I/O, interrupt, and the 0x2000 started data RAM. All the special devices act as a register, writing to the writable ones will so cause some effects wanted.

The mapping is as following.

Address Space Content
0x00002000 ~ 0x00003FFC Data Memory
0xFFFF0000 ~ 0xFFFF007C I/O
0xFFFF0080 ~ 0xFFFF00FC Interrupt Register Map
0xFFFF0100 Interrupt Enabled
0xFFFF0104 Interrupt Mask

I/O

For every I/O device, there is a 32-bit-wide buffer for it to do the I/O work. For input devices, this register is read only; for output ones, it's write only. Every such register is placed at the I/O memory map space, and takes 4 bytes.

All I/O mappings is as following.

Address Content
0xFFFF0000 Led Output
0xFFFF0004 Switch Input

Interrupt

For every interrupt source, there is a 1-bit register representing if this interrupt exists and needs to be processed. If any of these registers is set high by I/O devices, the interrupt unit will trigger a interrupt and send a request to the processor. Interrupt service routine needs to reset these bit to tell the interrupt unit that "I served this interrupt."

For every register described as above, it is spared a full double word memory mapping space, thus they can be addressed directly with a normal address, and read and write with lw and sw.

All interrupt register mappings is as following.

Address Interrupt Source
0xFFFF0080 Switch
0xFFFF0084 Time Tick Counter
0xFFFF0088 Software-Triggered

Caution: No interrupt register is able to be written with a 1, expect the Software-Triggered interrupt; if not so, every interrupt will be able to be used as a soft interrupt, which is not what we expect.

Also, there is a interrupt_enabled 1-bit register representing if a interrupt should be triggered currently. Interrupt request is possible to be sent only when this bit is high. Once an interrupt is triggered, this bit will be set low to prevent replicated triggering the same interrupt. So, interrupt service routine should turn this bit high right before the Return-From-Interrupt jr instruction, with a sw instruction. Also, this register is spared a double word space, to be visited easily; and writing any non-zero value will set the register high, or low if zero.

The interrupt_enabled register is mapped to 0xFFFF0100.

Also, there is a 32-bit register named interrupt_mask representing if one interrupt is available. Set one of these bits will cause corresponding interrupt to be ignored.

The interrupt_mask register is mapped to 0xFFFF0104.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].