aboutsummaryrefslogtreecommitdiff
path: root/single-cycle
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--single-cycle/Hardware Arch.drawio204
-rw-r--r--single-cycle/mem/program.hex0
-rw-r--r--single-cycle/rtl/regfile.sv0
-rw-r--r--single-cycle/tb/rv32e_model.py5
-rw-r--r--single-cycle/tb/test.sv0
5 files changed, 209 insertions, 0 deletions
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&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;512 Kbit (64 KB)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;SPI RAM Emulation&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;" 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="&lt;div&gt;&lt;br&gt;&lt;/div&gt;" 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