仿真平台内核初版 -tlib库 包含<sparc arm riscv powerPC>

This commit is contained in:
liuwb
2026-02-07 20:43:43 +08:00
parent de61f9e2b0
commit b3117648be
9748 changed files with 4309137 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
addrmap Device {
mem {
mementries = 4;
memwidth = 64;
sw = rw;
reg {
regwidth = 32;
field {
name = "FLAG1";
sw = rw;
} flag1 [0:0];
field {
name = "FLAG2";
sw = rw;
} flag2 [1:1];
field {
name = "VALUE1";
sw = rw;
} value1 [5:2];
field {
name = "VALUE2";
sw = rw;
} value2 [30:6];
} structure [4];
} external mem1 @ 0x10;
};

View File

@@ -0,0 +1,31 @@
addrmap Peripheral {
regfile {
default regwidth = 32;
reg {
name = "Fields";
field {
name = "FIRST";
sw = r;
hw = w;
} first [7:0];
field {
name = "SECOND";
sw = w;
hw = r;
} second [15:8];
field {
name = "THIRD";
sw = rw;
hw = rw;
onwrite = woclr;
} third [23:16];
field {
name = "FOURTH";
sw = rw;
hw = rw;
onread = rclr;
} fourth [31:24];
} fields @ 0x0;
} registers @ 0x0;
};

View File

@@ -0,0 +1,20 @@
addrmap Peripheral {
regfile {
default regwidth = 32;
reg {
name = "BitFields";
field {
name = "FIRST";
sw = r;
hw = w;
} first [0:0];
field {
name = "SECOND";
sw = rw;
hw = rw;
onwrite = wzc;
} second [1:1];
} bit_fields @ 0x0;
} registers @ 0x100;
};

View File

@@ -0,0 +1,25 @@
addrmap Peripheral {
regfile {
default regwidth = 32;
reg {
name = "COOL_REGISTER";
field {
name = "COOL_FIELD";
sw = w;
hw = rw;
woset = true;
} cool_field [31:0];
} cool_register @ 0x0;
reg {
name = "UNCOOL_REGISTER";
field {
name = "UNCOOL_FIELD";
sw = rw;
hw = rw;
onwrite = wzt;
reset = 1;
} uncool_field [31:0];
} uncool_register @ 0x4;
} registers @ 0x100;
};

View File

@@ -0,0 +1,17 @@
addrmap Peripheral {
default regwidth = 32;
reg {
field {
name = "FIRST";
sw = r;
} first [7:0];
} reg1 @ 0x0;
reg {
field {
name = "SECOND";
sw = w;
} second [7:0];
} reg2 @ 0x0;
};