diff --git a/src/Core/Gadgets.sv b/src/Core/Gadgets.sv index 69acbca..610d24c 100644 --- a/src/Core/Gadgets.sv +++ b/src/Core/Gadgets.sv @@ -82,7 +82,9 @@ module instr_valid ( 32'b100110??????????????????????????: valid = 1'b1; // LWR 32'b101000??????????????????????????: valid = 1'b1; // SB 32'b101001??????????????????????????: valid = 1'b1; // SH + 32'b101010??????????????????????????: valid = 1'b1; // SWL 32'b101011??????????????????????????: valid = 1'b1; // SW + 32'b101110??????????????????????????: valid = 1'b1; // SWR // 32'b101111?????00000????????????????: valid = 1'b1; // I-Cache Index Invalid // 32'b101111?????01000????????????????: valid = 1'b1; // I-Cache Index Store Tag // 32'b101111?????10000????????????????: valid = 1'b1; // I-Cache Hit Invalid diff --git a/tools/decoder.py b/tools/decoder.py index b30a8a9..b6d03d9 100644 --- a/tools/decoder.py +++ b/tools/decoder.py @@ -62,7 +62,9 @@ table = [ ('100110??????????????????????????', 'LWR'), ('101000??????????????????????????', 'SB'), ('101001??????????????????????????', 'SH'), + ('101010??????????????????????????', 'SWL'), ('101011??????????????????????????', 'SW'), + ('101110??????????????????????????', 'SWR'), ] class Boolean: @@ -83,7 +85,7 @@ class Boolean: for inst, name in table: inst = list(Boolean(x) for x in inst[::-1]) - # print('=====', name, '=====') + print('=====', name, '=====') ctrl = {} ctrl['BJRJ'] = (~inst[27] & (~inst[31] & ~inst[30] & ~inst[29] & ~inst[28] & ~inst[5] & ~inst[4] & inst[3] & ~inst[2] | ~inst[31] & ~inst[29] & inst[28]) | inst[27] & ~inst[31] & ~inst[29]) & ~inst[26] | ~inst[31] & ~inst[29] & inst[26] diff --git a/tools/ectrl.txt b/tools/ectrl.txt index acdb3b0..a5e0ac7 100644 --- a/tools/ectrl.txt +++ b/tools/ectrl.txt @@ -62,4 +62,6 @@ 32'h100110?????????????????????????? ADD 0 RS 1 1 IMM 1 ? IX 0 1 // LWR 32'b101000?????????????????????????? ADD 0 RS 1 1 IMM 1 ? IX 0 1 // SB 32'b101001?????????????????????????? ADD 0 RS 1 1 IMM 1 ? IX 0 1 // SH -32'b101011?????????????????????????? ADD 0 RS 1 1 IMM 1 ? IX 0 1 // SW \ No newline at end of file +32'b101010?????????????????????????? ADD 0 RS 1 1 IMM 1 ? IX 0 1 // SWL +32'b101011?????????????????????????? ADD 0 RS 1 1 IMM 1 ? IX 0 1 // SW +32'b101110?????????????????????????? ADD 0 RS 1 1 IMM 1 ? IX 0 1 // SWR \ No newline at end of file diff --git a/tools/global.txt b/tools/global.txt index 297136a..78a93e7 100644 --- a/tools/global.txt +++ b/tools/global.txt @@ -62,4 +62,6 @@ 32'h100110?????????????????????????? 0 0 0 0 1 0 0 0 0 1 // LWR 32'b101000?????????????????????????? 0 0 0 0 1 0 0 0 0 1 // SB 32'b101001?????????????????????????? 0 0 0 0 1 0 0 0 0 1 // SH -32'b101011?????????????????????????? 0 0 0 0 1 0 0 0 0 1 // SW \ No newline at end of file +32'b101010?????????????????????????? 0 0 0 0 1 0 0 0 0 1 // SWL +32'b101011?????????????????????????? 0 0 0 0 1 0 0 0 0 1 // SW +32'b101110?????????????????????????? 0 0 0 0 1 0 0 0 0 1 // SWR \ No newline at end of file diff --git a/tools/mctrl0.txt b/tools/mctrl0.txt index 0707927..b4a4cba 100644 --- a/tools/mctrl0.txt +++ b/tools/mctrl0.txt @@ -62,4 +62,6 @@ 32'h100110?????????????????????????? ? ? ? 0 ? ? 0 ? ? ? ? // LWR 32'b101000?????????????????????????? ? ? ? 0 ? ? 0 ? ? ? ? // SB 32'b101001?????????????????????????? ? ? ? 0 ? ? 0 ? ? ? ? // SH -32'b101011?????????????????????????? ? ? ? 0 ? ? 0 ? ? ? ? // SW \ No newline at end of file +32'b101010?????????????????????????? ? ? ? 0 ? ? 0 ? ? ? ? // SWL +32'b101011?????????????????????????? ? ? ? 0 ? ? 0 ? ? ? ? // SW +32'b101110?????????????????????????? ? ? ? 0 ? ? 0 ? ? ? ? // SWR \ No newline at end of file diff --git a/tools/mctrl1.txt b/tools/mctrl1.txt index 1ef8cc9..12cf383 100644 --- a/tools/mctrl1.txt +++ b/tools/mctrl1.txt @@ -60,6 +60,8 @@ 32'b100100?????????????????????????? 0 0 0 0 1 0 0 ALIGN 0 0 // LBU 32'b100101?????????????????????????? 0 0 0 0 1 0 0 ALIGN 0 0 // LHU 32'h100110?????????????????????????? 0 0 0 0 1 0 ? URIGHT 1 0 // LWR -32'b101000?????????????????????????? 0 0 0 0 1 1 ? ? ? ? // SB -32'b101001?????????????????????????? 0 0 0 0 1 1 ? ? ? ? // SH -32'b101011?????????????????????????? 0 0 0 0 1 1 ? ? ? ? // SW \ No newline at end of file +32'b101000?????????????????????????? 0 0 0 0 1 1 ? ALIGN ? ? // SB +32'b101001?????????????????????????? 0 0 0 0 1 1 ? ALIGN ? ? // SH +32'b101010?????????????????????????? 0 0 0 0 1 1 ? ULEFT ? ? // SWL +32'b101011?????????????????????????? 0 0 0 0 1 1 ? ALIGN ? ? // SW +32'b101110?????????????????????????? 0 0 0 0 1 1 ? URIGHT ? ? // SWR \ No newline at end of file diff --git a/tools/pcs.txt b/tools/pcs.txt index 0841b8f..a668c6d 100644 --- a/tools/pcs.txt +++ b/tools/pcs.txt @@ -62,4 +62,6 @@ 32'h100110?????????????????????????? 0 0 0 0 // LWR 32'b101000?????????????????????????? 0 0 0 0 // SB 32'b101001?????????????????????????? 0 0 0 0 // SH -32'b101011?????????????????????????? 0 0 0 0 // SW \ No newline at end of file +32'b101010?????????????????????????? 0 0 0 0 // SWL +32'b101011?????????????????????????? 0 0 0 0 // SW +32'b101110?????????????????????????? 0 0 0 0 // SWR \ No newline at end of file diff --git a/tools/privilege.txt b/tools/privilege.txt index e760b42..846fafc 100644 --- a/tools/privilege.txt +++ b/tools/privilege.txt @@ -62,4 +62,6 @@ 32'h100110?????????????????????????? 0 // LWR 32'b101000?????????????????????????? 0 // SB 32'b101001?????????????????????????? 0 // SH -32'b101011?????????????????????????? 0 // SW \ No newline at end of file +32'b101010?????????????????????????? 0 // SWL +32'b101011?????????????????????????? 0 // SW +32'b101110?????????????????????????? 0 // SWR \ No newline at end of file diff --git a/tools/wctrl.txt b/tools/wctrl.txt index 024214c..d61bce8 100644 --- a/tools/wctrl.txt +++ b/tools/wctrl.txt @@ -62,4 +62,6 @@ 32'h100110?????????????????????????? 1 RT 1 ? // LWR 32'b101000?????????????????????????? 0 ? ? ? // SB 32'b101001?????????????????????????? 0 ? ? ? // SH -32'b101011?????????????????????????? 0 ? ? ? // SW \ No newline at end of file +32'b101010?????????????????????????? 0 ? ? ? // SWL +32'b101011?????????????????????????? 0 ? ? ? // SW +32'b101110?????????????????????????? 0 ? ? ? // SWR \ No newline at end of file