Skip to content

This is a integrated project using as development tools for Serenity Computer System

Notifications You must be signed in to change notification settings

Nebula1084/SerenityTool

Repository files navigation

SerenityVM

##Build## windows:
build.bat
##Instruction## currently, our VM only could execute following instructions:
ADD $rd,$rs,$rt
SUB $rd,$rs,$rt
SLL $rd,$rs,$rt
SRL $rd,$rs,$rt
SRA $rd,$rs,$rt
JR $rs
JALR $rs,$rd
LW $rt,data($rs)
SW $rt,data($rs)
LH $rt,data($rs)
SH $rt,data($rs)
BEQ $rs,$rt,data
BNE $rs,$rt,data
J address
JAL address
ADDI $rt,$rs,data

up 172
down 180
left 175
right 177

##Error Hint When virtual machine execute a instruction which is illegal, the virtual machine would pause and prompt the code that would be executed.

##Usage## The Virtual machine could be used in following way.
SerenityVM.exe file
For instance, insrtuction SerenityVM.exe boot.bit would execute the binary file boot.bit. And the using option -d could specify the debug mode, like SerenityVM.exe -d boot.bit. ###Command m m address would display memroy content from specified address. ###Command g g address virtual machine would execute continuously until PC attains specified address. ###Command b b In debug mode and execute continuously, the virtual machine would stop when you hit key b. ##Display## the Serenity VM support simple text mode, which support all Zhe standard code. The memory whose address is after 0x3000 is video memory, where we could write code and the screen would display correspondent character. By the way, the program could not exit but could be halted by ctrl+c. ##Virtual Disk Now, Serenity VM support virtual disk functionality, which allow users access file. ###Memory Layout

50FC offset
50FD 
50FE command
50FF ready
5100 block buffer
51FF

###Command Pass number of sector to 0x50FC which is the address of offset. Send command to 0x50FE and the ready whose adress is 50FF would indicate the status of current disk access

D_COMM_NONE 0
D_COMM_READ 1
D_COMM_WRITE 2

BUSY 0
READY 1

###Tips use sw and lw instruction to access offset and use sh and lh access command. And ready could only be accessed by lh.

SerenityASM

##Usage## The Assembler could be used in following way.
SerenityASM.exe file
For instance, insrtuction SerenityASM.exe boot.txt would compile codes in text file boot.txt into binary format boot.bit. ##Instruction## Most standard instruction is supported currently, including add, addu, and, jalr, jr, mfhi, mflo, nor, or, sll, sllv, slt, sltu, sra, srav, xor, bne, beq, andi, ori, xori, mfc0, mtc0, lui
##Pseudo instruction## Currently, we support a little bit pseudo instruction, which are move, push, pop

SerenityTest

After build, SerenityASM.exe and SerenityVM.exe would be under the directory SerenityTool/SerrentiyTest. And user could them it to develop MIPS project.1

About

This is a integrated project using as development tools for Serenity Computer System

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published