diff options
Diffstat (limited to '')
28 files changed, 336 insertions, 1 deletions
@@ -1 +1,61 @@ -# superscalar-summer
\ No newline at end of file +# superscalar-summer + +## [RV32E](https://docs.riscv.org/reference/isa/unpriv/unpriv-index.html) + +Reduces number of integer registers to 16 general-purpose registers (x0-x15). Upper 16 registers consume around one quarter of the total area of the core excluding memories, thus their removal saves around 25% core area with a corresponding core power reduction. + +Each register is 32 bits wide. + +| Register | Description | Purpose | +| -------- | ----------- | ------- | +| x0 | dedicated zero | Source operand for value 0. | +| x1 | return address | Written by JAL/JALR. Holds address to be returned to once a function returns. Must be saved to stack before calling another function. | +| x2 | stack pointer | Always points to top of the stack in RAM. Decremented to allocate space, incremented to free it. CALLEE must restore it BEFORE returning. | +| x3 | global pointer | | +| x4 | thread pointer | | +| x5 | alternate link reg | Second link register for nested JAL sequences. Caller must save if needed across a call. | +| x6 | general scratch reg | | +| x7 | general scratch reg | | +| x8 | frame pointer | | +| x9 | saved register | | +| x10 | first function argument | Also used to return integer results from function. | +| x11 | second function argument | | +| x12 | third function argument | | +| x13 | fourth function argument | | +| x14 | fifth function argument | | +| x15 | sixth function argument | | +| pc | program counter | Address of current instruction | + +## INSTRUCTION SET +### R-Type (Register-to-register) + +| Instruction | Description | Encoding (`funct7` \| `funct3` \| `opcode`) | +| ----------- | ----------- | ------------------------------------------ | +| ADD | Add two registers and store the result in rd. | `0000000` \| `000` \| `0110011` | +| SUB | Subtract rs2 from rs1 and store the result in rd. | `0100000` \| `000` \| `0110011` | +| SLL | Shift rs1 left by the amount in rs2 (logical), store result in rd. | `0000000` \| `001` \| `0110011` | +| SLT | Set rd to 1 if rs1 < rs2 (signed), otherwise 0. | `0000000` \| `010` \| `0110011` | +| SLTU | Set rd to 1 if rs1 < rs2 (unsigned), otherwise 0. | `0000000` \| `011` \| `0110011` | +| XOR | Bitwise XOR of rs1 and rs2, result in rd. | `0000000` \| `100` \| `0110011` | +| SRL | Shift rs1 right by the amount in rs2 (logical), store result in rd. | `0000000` \| `101` \| `0110011` | +| SRA | Shift rs1 right by the amount in rs2 (arithmetic), sign-extend result into rd. | `0100000` \| `101` \| `0110011` | +| OR | Bitwise OR of rs1 and rs2, result in rd. | `0000000` \| `110` \| `0110011` | +| AND | Bitwise AND of rs1 and rs2, result in rd. | `0000000` \| `111` \| `0110011` | + +### I-Type (Immediate) + +`—` in `imm[11:5]` means those bits carry data (the immediate value), not an encoding discriminator. + +#### OP-IMM — Integer immediate ops (opcode `0010011`) + +| Instruction | Description | Encoding (`imm[11:5]` \| `funct3` \| `opcode`) | +| ----------- | ----------- | ----------------------------------------------- | +| ADDI | Add sign-extended 12-bit immediate to rs1, store in rd. | — \| `000` \| `0010011` | +| SLTI | Set rd to 1 if rs1 < sign-extended imm (signed), else 0. | — \| `010` \| `0010011` | +| SLTIU | Set rd to 1 if rs1 < sign-extended imm (unsigned), else 0. | — \| `011` \| `0010011` | +| XORI | Bitwise XOR of rs1 and sign-extended imm, result in rd. | — \| `100` \| `0010011` | +| ORI | Bitwise OR of rs1 and sign-extended imm, result in rd. | — \| `110` \| `0010011` | +| ANDI | Bitwise AND of rs1 and sign-extended imm, result in rd. | — \| `111` \| `0010011` | +| SLLI | Shift rs1 left by shamt (`imm[4:0]`), logical, store in rd. | `0000000` \| `001` \| `0010011` | +| SRLI | Shift rs1 right by shamt (`imm[4:0]`), logical, store in rd. | `0000000` \| `101` \| `0010011` | +| SRAI | Shift rs1 right by shamt (`imm[4:0]`), arithmetic, store in rd. | `0100000` \| `101` \| `0010011` | diff --git a/resources/cpen411/lectures/CPEN411-SlideSet10-Parallel.pptx b/resources/cpen411/lectures/CPEN411-SlideSet10-Parallel.pptx new file mode 100644 index 0000000..a4162ef --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet10-Parallel.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7120fec74459e06a355fa73e0c44f3779d42ff954ccd8eae8fbb7aa72555fb1e +size 851254 diff --git a/resources/cpen411/lectures/CPEN411-SlideSet11-CUDA.pptx b/resources/cpen411/lectures/CPEN411-SlideSet11-CUDA.pptx new file mode 100644 index 0000000..6515414 --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet11-CUDA.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70d2e3e204d033e8a2b113f331161f5727e787d5e58abffbc092a55ebfab8b7c +size 21905872 diff --git a/resources/cpen411/lectures/CPEN411-SlideSet12-GPUs.pptx b/resources/cpen411/lectures/CPEN411-SlideSet12-GPUs.pptx new file mode 100644 index 0000000..ac3c3e6 --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet12-GPUs.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db6ce125263a3a9c322165508eb969a1ed6fad95eb7f6b0f94be7c4827f09061 +size 6014506 diff --git a/resources/cpen411/lectures/CPEN411-SlideSet13-Tomasulo.pptx b/resources/cpen411/lectures/CPEN411-SlideSet13-Tomasulo.pptx new file mode 100644 index 0000000..544cd4c --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet13-Tomasulo.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e4ad1334984eb2a134e9eb06eb30b1e40a52cf735c578c947a36a939e0825d9 +size 1667139 diff --git a/resources/cpen411/lectures/CPEN411-SlideSet14-ReorderBuffer.pptx b/resources/cpen411/lectures/CPEN411-SlideSet14-ReorderBuffer.pptx new file mode 100644 index 0000000..4138f48 --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet14-ReorderBuffer.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4199403f0f8bf3451eb3b3396df33ab21ab4cf2b43089dc746e585c3fd205dfc +size 2706825 diff --git a/resources/cpen411/lectures/CPEN411-SlideSet15-LoadStoreProcessing.pptx b/resources/cpen411/lectures/CPEN411-SlideSet15-LoadStoreProcessing.pptx new file mode 100644 index 0000000..2571c0f --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet15-LoadStoreProcessing.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a80759485b04845f22f7631cc9778da08604a4e4e29a74e497735c2310d8bba +size 2247206 diff --git a/resources/cpen411/lectures/CPEN411-SlideSet16-BranchPredicton.pptx b/resources/cpen411/lectures/CPEN411-SlideSet16-BranchPredicton.pptx new file mode 100644 index 0000000..27d28ec --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet16-BranchPredicton.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:705a4b4c7383fcbd65a08dca02e67240ea10b1d7e37b4d114568a5d87ffb6b0b +size 2757655 diff --git a/resources/cpen411/lectures/CPEN411-SlideSet4-ISA.pptx b/resources/cpen411/lectures/CPEN411-SlideSet4-ISA.pptx new file mode 100644 index 0000000..5bb5668 --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet4-ISA.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b81f585dc63f987739cd1f41c6cf61feb61cb40a0574962ba16bf05a67180fa +size 1103186 diff --git a/resources/cpen411/lectures/CPEN411-SlideSet5-Memory.pptx b/resources/cpen411/lectures/CPEN411-SlideSet5-Memory.pptx new file mode 100644 index 0000000..63555fd --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet5-Memory.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd4cb5b8310edbe66e5d60849290dd407c86023a835e4c966152bc5d43f7652d +size 4390223 diff --git a/resources/cpen411/lectures/CPEN411-SlideSet6-Caches.pptx b/resources/cpen411/lectures/CPEN411-SlideSet6-Caches.pptx new file mode 100644 index 0000000..aea5dff --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet6-Caches.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:694e773f147f744d1bd4444e469478ed83417b9874f0fd55a20d6b300626e147 +size 2930495 diff --git a/resources/cpen411/lectures/CPEN411-SlideSet7-Virtual_Memory.pptx b/resources/cpen411/lectures/CPEN411-SlideSet7-Virtual_Memory.pptx new file mode 100644 index 0000000..2b2725b --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet7-Virtual_Memory.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fd82b6d329edbccbd1de2a91734d0b0e86c7023f7d740b891abdfa0ab9301e4 +size 2527821 diff --git a/resources/cpen411/lectures/CPEN411-SlideSet8-Pipelining.pptx b/resources/cpen411/lectures/CPEN411-SlideSet8-Pipelining.pptx new file mode 100644 index 0000000..9cb811b --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet8-Pipelining.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f34fdf8513208b57ba25074d9f22ce311f335e1e68c9fa66f5fb987b99af12f5 +size 3687223 diff --git a/resources/cpen411/lectures/CPEN411-SlideSet9-MulticycleOps.pptx b/resources/cpen411/lectures/CPEN411-SlideSet9-MulticycleOps.pptx new file mode 100644 index 0000000..bcfb965 --- /dev/null +++ b/resources/cpen411/lectures/CPEN411-SlideSet9-MulticycleOps.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a343cd2c57159eab0b861d267cc4064889516d51f859b199849a01591e2329d +size 14750527 diff --git a/resources/cpen411/lectures/CPEN411_SlideSet1-Intro.pptx b/resources/cpen411/lectures/CPEN411_SlideSet1-Intro.pptx new file mode 100644 index 0000000..a63505a --- /dev/null +++ b/resources/cpen411/lectures/CPEN411_SlideSet1-Intro.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:361b79e3875a206c1bc92e8a4fd93e4a4b09fc3fdb12b1d47cf9fa6bc7216272 +size 19785395 diff --git a/resources/cpen411/lectures/CPEN411_SlideSet2-Fundamentals-1.pptx b/resources/cpen411/lectures/CPEN411_SlideSet2-Fundamentals-1.pptx new file mode 100644 index 0000000..a4b3b80 --- /dev/null +++ b/resources/cpen411/lectures/CPEN411_SlideSet2-Fundamentals-1.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bcd8679b2146b60e7dbb89f4fec9ffca19c29dd6b70a5baf7833c2d6f25a25a +size 19197079 diff --git a/resources/cpen411/lectures/CPEN411_SlideSet3-Fundamentals-2.pptx b/resources/cpen411/lectures/CPEN411_SlideSet3-Fundamentals-2.pptx new file mode 100644 index 0000000..ef00262 --- /dev/null +++ b/resources/cpen411/lectures/CPEN411_SlideSet3-Fundamentals-2.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:400169daabd6c7958ff296a27bc6749b4531aedf98cf3eb71f9a03294492df0a +size 10441910 diff --git a/resources/cpen411/lectures/Slide_Set_17_Memory_Consistency.pptx b/resources/cpen411/lectures/Slide_Set_17_Memory_Consistency.pptx new file mode 100644 index 0000000..036c1a9 --- /dev/null +++ b/resources/cpen411/lectures/Slide_Set_17_Memory_Consistency.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e97410f9295ba48f9f6b271058852df12c1777fc00de84c329a3c768ec24cc63 +size 235731 diff --git a/resources/cpen411/lectures/Slide_Set_18_Cache_Coherence_Part_1.pptx b/resources/cpen411/lectures/Slide_Set_18_Cache_Coherence_Part_1.pptx new file mode 100644 index 0000000..a5b465c --- /dev/null +++ b/resources/cpen411/lectures/Slide_Set_18_Cache_Coherence_Part_1.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05b8bb50808afff0e1a57a1430bdd12aada556935264bcbd46393dfbe4350f16 +size 318545 diff --git a/resources/cpen411/lectures/Slide_Set_19_Directory_Coherence_Synchronization.pptx b/resources/cpen411/lectures/Slide_Set_19_Directory_Coherence_Synchronization.pptx new file mode 100644 index 0000000..60d417e --- /dev/null +++ b/resources/cpen411/lectures/Slide_Set_19_Directory_Coherence_Synchronization.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03ff4ce0d55f7c6793917ecb46680b6e5544f0612269ac07b912f611c8c699da +size 593798 diff --git a/resources/cpen411/lectures/~$CPEN411-SlideSet16-BranchPredicton.pptx b/resources/cpen411/lectures/~$CPEN411-SlideSet16-BranchPredicton.pptx new file mode 100644 index 0000000..0c88b4c --- /dev/null +++ b/resources/cpen411/lectures/~$CPEN411-SlideSet16-BranchPredicton.pptx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99ab6d75ee1ad64bbd721dbdd84e777206558d36b09bfbb012642f17b4894ebb +size 165 diff --git a/resources/textbooks/computer-architecture-sixth-edition-a-quantitative-approach.pdf b/resources/textbooks/computer-architecture-sixth-edition-a-quantitative-approach.pdf new file mode 100644 index 0000000..876c294 --- /dev/null +++ b/resources/textbooks/computer-architecture-sixth-edition-a-quantitative-approach.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8a85afe55c3874802c3b9f98f97028b17e8da415067a0252c4800d61a5d6400 +size 36643471 diff --git a/resources/textbooks/digital-design-and-computer-architecture-risc-v-edition.pdf b/resources/textbooks/digital-design-and-computer-architecture-risc-v-edition.pdf new file mode 100644 index 0000000..e616bed --- /dev/null +++ b/resources/textbooks/digital-design-and-computer-architecture-risc-v-edition.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f567f8abcd8518fc1d54d7bf33f460de160f9ecfbf31a7f6fe98c60b9deb3dc +size 24460160 diff --git a/single-cycle/Hardware Arch.drawio b/single-cycle/Hardware Arch.drawio new file mode 100644 index 0000000..d535a1e --- /dev/null +++ b/single-cycle/Hardware Arch.drawio @@ -0,0 +1,204 @@ +<mxfile host="app.diagrams.net" pages="2"> + <diagram name="HWSPEC" id="p3Q1rwKWQDNKqCjt-_EU"> + <mxGraphModel dx="2078" dy="678" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> + <root> + <mxCell id="0" /> + <mxCell id="1" parent="0" /> + <mxCell id="MvClO44kt9W8xLhhUr_F-1" parent="1" style="whiteSpace=wrap;html=1;" value="RP 2040<div><br></div><div>512 Kbit (64 KB)</div><div><br></div><div>SPI RAM Emulation</div><div><br></div>" vertex="1"> + <mxGeometry height="200" width="120" x="680" y="200" as="geometry" /> + </mxCell> + <mxCell id="MvClO44kt9W8xLhhUr_F-3" parent="1" style="whiteSpace=wrap;html=1;" value="<div><br></div>" vertex="1"> + <mxGeometry height="270" width="580" x="-50" y="190" as="geometry" /> + </mxCell> + <mxCell id="MvClO44kt9W8xLhhUr_F-4" parent="1" style="whiteSpace=wrap;html=1;" value="Reg File" vertex="1"> + <mxGeometry height="79" width="200" x="-10" y="200" as="geometry" /> + </mxCell> + <mxCell id="MvClO44kt9W8xLhhUr_F-5" parent="1" style="whiteSpace=wrap;html=1;" value="SPI MEM CTRLR" vertex="1"> + <mxGeometry height="230" width="80" x="435" y="200" as="geometry" /> + </mxCell> + <mxCell id="MvClO44kt9W8xLhhUr_F-6" parent="1" style="whiteSpace=wrap;html=1;" value="DATAPATH-0" vertex="1"> + <mxGeometry height="80" width="420" x="-10" y="350" as="geometry" /> + </mxCell> + <mxCell id="MvClO44kt9W8xLhhUr_F-7" parent="1" style="whiteSpace=wrap;html=1;" value="IMEM" vertex="1"> + <mxGeometry height="80" width="100" x="200" y="199.5" as="geometry" /> + </mxCell> + <mxCell id="MvClO44kt9W8xLhhUr_F-8" parent="1" style="whiteSpace=wrap;html=1;aspect=fixed;" value="CTRL UNIT" vertex="1"> + <mxGeometry height="80" width="80" x="320" y="199" as="geometry" /> + </mxCell> + <mxCell id="MvClO44kt9W8xLhhUr_F-9" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="CS" vertex="1"> + <mxGeometry height="30" width="60" x="631" y="199" as="geometry" /> + </mxCell> + <mxCell id="MvClO44kt9W8xLhhUr_F-10" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="SCK" vertex="1"> + <mxGeometry height="30" width="60" x="626" y="229" as="geometry" /> + </mxCell> + <mxCell id="MvClO44kt9W8xLhhUr_F-11" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="MOSI" vertex="1"> + <mxGeometry height="30" width="60" x="624" y="259" as="geometry" /> + </mxCell> + <mxCell id="MvClO44kt9W8xLhhUr_F-12" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="MISO" vertex="1"> + <mxGeometry height="30" width="60" x="632" y="287" as="geometry" /> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-1" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="515" y="220" as="sourcePoint" /> + <mxPoint x="680" y="220" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-2" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="515" y="250" as="sourcePoint" /> + <mxPoint x="680" y="250" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-3" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="515" y="279.81" as="sourcePoint" /> + <mxPoint x="680" y="279.81" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-4" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="680" y="309" as="sourcePoint" /> + <mxPoint x="515" y="309" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-5" edge="1" parent="1" style="endArrow=none;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="-160" y="400" as="sourcePoint" /> + <mxPoint x="-40" y="400" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-6" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="CLK" vertex="1"> + <mxGeometry height="30" width="60" x="-206" y="385" as="geometry" /> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-7" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint y="350" as="sourcePoint" /> + <mxPoint x="1" y="280" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-8" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="A1" vertex="1"> + <mxGeometry height="30" width="60" x="-27" y="257" as="geometry" /> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-9" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="A2" vertex="1"> + <mxGeometry height="30" width="60" y="257" as="geometry" /> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-10" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="A3" vertex="1"> + <mxGeometry height="30" width="60" x="30" y="257" as="geometry" /> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-11" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="WD3" vertex="1"> + <mxGeometry height="30" width="60" x="60" y="257" as="geometry" /> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-12" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="29" y="349" as="sourcePoint" /> + <mxPoint x="30" y="279" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-13" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="59" y="350" as="sourcePoint" /> + <mxPoint x="60" y="280" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-14" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="89.5" y="350" as="sourcePoint" /> + <mxPoint x="90.5" y="280" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-15" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="130.5" y="279" as="sourcePoint" /> + <mxPoint x="129.5" y="349" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-16" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="SrcA" vertex="1"> + <mxGeometry height="30" width="60" x="100" y="257" as="geometry" /> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-17" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="SrcB" vertex="1"> + <mxGeometry height="30" width="60" x="140" y="257" as="geometry" /> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-18" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="170.5" y="279" as="sourcePoint" /> + <mxPoint x="169.5" y="349" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-19" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="CLK" vertex="1"> + <mxGeometry height="30" width="60" x="-20" y="224" as="geometry" /> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-20" edge="1" parent="1" style="endArrow=none;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="-40" y="400" as="sourcePoint" /> + <mxPoint x="-40" y="240" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-21" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;entryX=0.167;entryY=0.533;entryDx=0;entryDy=0;entryPerimeter=0;" target="krT5A7EfSYrz_LK7-eJD-19" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="-40" y="240" as="sourcePoint" /> + <mxPoint x="10" y="190" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-22" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;entryX=0.002;entryY=0.63;entryDx=0;entryDy=0;entryPerimeter=0;" target="MvClO44kt9W8xLhhUr_F-6" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="-40" y="400" as="sourcePoint" /> + <mxPoint x="10" y="350" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-23" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="PC" vertex="1"> + <mxGeometry height="30" width="60" x="190" y="257" as="geometry" /> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-24" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="INSTR" vertex="1"> + <mxGeometry height="30" width="60" x="240" y="257" as="geometry" /> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-25" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="219.5" y="349" as="sourcePoint" /> + <mxPoint x="220.5" y="279" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-26" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="270.5" y="279" as="sourcePoint" /> + <mxPoint x="269.5" y="349" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-27" edge="1" parent="1" style="endArrow=none;html=1;rounded=0;entryX=0.017;entryY=0.963;entryDx=0;entryDy=0;entryPerimeter=0;" target="MvClO44kt9W8xLhhUr_F-3" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="-40" y="400" as="sourcePoint" /> + <mxPoint x="10" y="350" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-29" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="CLK" vertex="1"> + <mxGeometry height="30" width="60" x="420" y="408" as="geometry" /> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-30" edge="1" parent="1" style="endArrow=none;html=1;rounded=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="-40" y="450" as="sourcePoint" /> + <mxPoint x="450" y="450" as="targetPoint" /> + </mxGeometry> + </mxCell> + <mxCell id="krT5A7EfSYrz_LK7-eJD-31" edge="1" parent="1" style="endArrow=classic;html=1;rounded=0;entryX=0.316;entryY=1.003;entryDx=0;entryDy=0;entryPerimeter=0;" value=""> + <mxGeometry height="50" relative="1" width="50" as="geometry"> + <mxPoint x="449.86" y="449.31" as="sourcePoint" /> + <mxPoint x="450.14" y="430.00000000000006" as="targetPoint" /> + </mxGeometry> + </mxCell> + </root> + </mxGraphModel> + </diagram> + <diagram id="n4mFYgyufcZCSZr-gAFP" name="MICROARCHSPEC"> + <mxGraphModel dx="1017" dy="561" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> + <root> + <mxCell id="0" /> + <mxCell id="1" parent="0" /> + <mxCell id="nWiOjpOiOi4GWV8O7ytf-1" parent="1" style="rounded=0;whiteSpace=wrap;html=1;" value="" vertex="1"> + <mxGeometry height="280" width="680" x="80" y="240" as="geometry" /> + </mxCell> + <mxCell id="nWiOjpOiOi4GWV8O7ytf-2" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="DATAPATH-0" vertex="1"> + <mxGeometry height="30" width="90" x="80" y="240" as="geometry" /> + </mxCell> + </root> + </mxGraphModel> + </diagram> +</mxfile> diff --git a/single-cycle/mem/program.hex b/single-cycle/mem/program.hex new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/single-cycle/mem/program.hex diff --git a/single-cycle/rtl/regfile.sv b/single-cycle/rtl/regfile.sv new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/single-cycle/rtl/regfile.sv diff --git a/single-cycle/tb/rv32e_model.py b/single-cycle/tb/rv32e_model.py new file mode 100644 index 0000000..eda163e --- /dev/null +++ b/single-cycle/tb/rv32e_model.py @@ -0,0 +1,5 @@ +#Golden Reference model for RV32E Processor + +#Constants + +XLEN = 32
\ No newline at end of file diff --git a/single-cycle/tb/test.sv b/single-cycle/tb/test.sv new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/single-cycle/tb/test.sv |