spec and shit

This commit is contained in:
Benjamin Kyd
2023-05-12 16:54:12 +01:00
commit da5ca15973
8 changed files with 247 additions and 0 deletions

29
src/main.rs Normal file
View File

@@ -0,0 +1,29 @@
const XLEN: usize = 32;
// define words as byte fraction
const QUADWORD: usize = 16;
const DOUBLEWORD: usize = 8;
const WORD: usize = 4;
const HALFWORD: usize = 2;
const BYTE: usize = 1;
type QuadWord = u128;
type DoubleWord = u64;
type Word = u32;
type HalfWord = u16;
type Byte = u8;
struct VMRV32I {
// 32 registers
x: [Word; 32],
// 32-bit program counter
pc: Word,
}
struct VMChunk {
}
fn main() {
println!("Hello, world!");
}