Delete everything

This commit is contained in:
Byron Lathi
2024-03-02 20:10:50 -08:00
parent 273484b994
commit 0a0394ae33
293 changed files with 1 additions and 94765 deletions

View File

@@ -1,293 +0,0 @@
<mxfile host="Electron" modified="2023-11-22T16:14:07.032Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.2.8 Chrome/112.0.5615.165 Electron/24.2.0 Safari/537.36" etag="cZrfsaYxYDLctKnBPGYN" version="21.2.8" type="device">
<diagram name="Page-1" id="GhyEJFUGB68-PMfAT87G">
<mxGraphModel dx="2408" dy="1069" 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="NXSZnqqENL-7S4XXd65T-59" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.25;entryY=1;entryDx=0;entryDy=0;shape=flexArrow;fillColor=none;" parent="1" source="NXSZnqqENL-7S4XXd65T-1" target="NXSZnqqENL-7S4XXd65T-58" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-1" value="MM00" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="240" y="400" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-60" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;shape=flexArrow;" parent="1" source="NXSZnqqENL-7S4XXd65T-3" target="NXSZnqqENL-7S4XXd65T-58" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="450" y="460" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-3" value="MM01" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="240" y="440" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-61" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.75;entryY=1;entryDx=0;entryDy=0;shape=flexArrow;" parent="1" source="NXSZnqqENL-7S4XXd65T-4" target="NXSZnqqENL-7S4XXd65T-58" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="420" y="540" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-4" value="MMnn" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="240" y="520" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-15" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;" parent="1" source="NXSZnqqENL-7S4XXd65T-12" target="NXSZnqqENL-7S4XXd65T-14" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-28" value="ADDR[15:0]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-15" vertex="1" connectable="0">
<mxGeometry x="-0.2088" y="-1" relative="1" as="geometry">
<mxPoint x="-8" y="-21" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-12" value="" style="triangle;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="290" y="120" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;shape=flexArrow;" parent="1" source="NXSZnqqENL-7S4XXd65T-14" target="NXSZnqqENL-7S4XXd65T-35" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="585" y="345" as="targetPoint" />
<Array as="points" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-27" value="ADDR[15:12]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-26" vertex="1" connectable="0">
<mxGeometry x="-0.0783" relative="1" as="geometry">
<mxPoint y="-11" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-37" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;" parent="1" source="NXSZnqqENL-7S4XXd65T-14" target="NXSZnqqENL-7S4XXd65T-36" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-38" value="ADDR[11:0" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-37" vertex="1" connectable="0">
<mxGeometry x="0.1934" y="4" relative="1" as="geometry">
<mxPoint x="-18" y="-16" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-48" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;shape=flexArrow;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="NXSZnqqENL-7S4XXd65T-64" target="NXSZnqqENL-7S4XXd65T-47" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="-10" y="630" />
<mxPoint x="-10" y="390" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-14" value="n-4&lt;br&gt;4" style="ellipse;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="490" y="210" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-32" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fillColor=default;" parent="1" source="NXSZnqqENL-7S4XXd65T-1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="480" y="430" as="sourcePoint" />
<mxPoint x="520" y="420" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-33" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fillColor=default;" parent="1" source="NXSZnqqENL-7S4XXd65T-3" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="480" y="430" as="sourcePoint" />
<mxPoint x="520" y="460" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-34" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;fillColor=default;" parent="1" source="NXSZnqqENL-7S4XXd65T-4" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="480" y="430" as="sourcePoint" />
<mxPoint x="520" y="540" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-40" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;shape=flexArrow;" parent="1" source="NXSZnqqENL-7S4XXd65T-35" target="NXSZnqqENL-7S4XXd65T-36" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-42" value="ADDR[24:12]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-40" vertex="1" connectable="0">
<mxGeometry x="-0.5389" y="-2" relative="1" as="geometry">
<mxPoint x="7" y="-17" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-35" value="" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;rotation=90;size=55;" parent="1" vertex="1">
<mxGeometry x="465" y="445" width="170" height="60" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;" parent="1" source="NXSZnqqENL-7S4XXd65T-36" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="890" y="250" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-43" value="ADDR[24:0]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-41" vertex="1" connectable="0">
<mxGeometry x="-0.3158" relative="1" as="geometry">
<mxPoint x="6" y="-20" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-36" value="+" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="690" y="210" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-45" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" parent="1" target="NXSZnqqENL-7S4XXd65T-1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="320" y="320" as="sourcePoint" />
<mxPoint x="310" y="320" as="targetPoint" />
<Array as="points">
<mxPoint x="320" y="360" />
<mxPoint x="280" y="360" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-50" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;shape=arrow;" parent="1" source="NXSZnqqENL-7S4XXd65T-47" target="NXSZnqqENL-7S4XXd65T-49" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-47" value="Decoder" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;rotation=-90;size=30;" parent="1" vertex="1">
<mxGeometry x="-10" y="370" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-55" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="NXSZnqqENL-7S4XXd65T-49" target="NXSZnqqENL-7S4XXd65T-1" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="220" y="360" />
<mxPoint x="220" y="420" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-81" value="we[1:0]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-55" vertex="1" connectable="0">
<mxGeometry x="-0.3218" relative="1" as="geometry">
<mxPoint x="-17" y="-10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-56" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="NXSZnqqENL-7S4XXd65T-49" target="NXSZnqqENL-7S4XXd65T-3" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="210" y="390" />
<mxPoint x="210" y="460" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-82" value="we[1:0]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-56" vertex="1" connectable="0">
<mxGeometry x="-0.7003" relative="1" as="geometry">
<mxPoint x="8" y="-10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-57" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.75;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="NXSZnqqENL-7S4XXd65T-49" target="NXSZnqqENL-7S4XXd65T-4" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="190" y="420" />
<mxPoint x="190" y="540" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-83" value="we[1:0]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-57" vertex="1" connectable="0">
<mxGeometry x="-0.7895" y="1" relative="1" as="geometry">
<mxPoint x="9" y="-9" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-49" value="&amp;amp;" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="120" y="330" width="40" height="120" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-51" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" parent="1" target="NXSZnqqENL-7S4XXd65T-49" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="130" y="300" as="sourcePoint" />
<mxPoint x="210" y="310" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-52" value="CS" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-51" vertex="1" connectable="0">
<mxGeometry x="-0.7662" relative="1" as="geometry">
<mxPoint y="-14" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-53" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;" parent="1" target="NXSZnqqENL-7S4XXd65T-49" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="150" y="300" as="sourcePoint" />
<mxPoint x="210" y="310" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-54" value="WE" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-53" vertex="1" connectable="0">
<mxGeometry x="-0.7143" relative="1" as="geometry">
<mxPoint y="-14" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-63" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;" parent="1" source="NXSZnqqENL-7S4XXd65T-58" target="NXSZnqqENL-7S4XXd65T-62" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-71" value="data[15:0]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;" parent="NXSZnqqENL-7S4XXd65T-63" vertex="1" connectable="0">
<mxGeometry x="-0.258" y="-1" relative="1" as="geometry">
<mxPoint x="31" y="-5" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-58" value="" style="shape=trapezoid;perimeter=trapezoidPerimeter;fixedSize=1;size=20;rotation=-180;html=1;whiteSpace=wrap;horizontal=1;" parent="1" vertex="1">
<mxGeometry x="390" y="610" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-72" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;shape=flexArrow;" parent="1" source="NXSZnqqENL-7S4XXd65T-62" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="450" y="780" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-73" value="DATA_OUT[7:0]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-72" vertex="1" connectable="0">
<mxGeometry x="0.3305" y="-2" relative="1" as="geometry">
<mxPoint x="52" y="-13" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-62" value="" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;size=20;rotation=-180;" parent="1" vertex="1">
<mxGeometry x="390" y="690" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-66" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="NXSZnqqENL-7S4XXd65T-77" target="NXSZnqqENL-7S4XXd65T-62" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="250" y="630" />
<mxPoint x="250" y="710" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-68" value="ADDR[0]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-66" vertex="1" connectable="0">
<mxGeometry x="0.4898" relative="1" as="geometry">
<mxPoint x="3" y="-10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-64" value="" style="triangle;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="-160" y="590" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-65" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;fillColor=default;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="NXSZnqqENL-7S4XXd65T-64" target="NXSZnqqENL-7S4XXd65T-77" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="200" y="630" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-67" value="ADDR[4:0]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;" parent="NXSZnqqENL-7S4XXd65T-65" vertex="1" connectable="0">
<mxGeometry x="0.1394" relative="1" as="geometry">
<mxPoint x="-115" y="-15" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-69" value="WORD MUX" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="410" y="615" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-70" value="BYTE MUX" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
<mxGeometry x="410" y="695" width="80" height="30" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-74" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;fillColor=default;" parent="1" target="NXSZnqqENL-7S4XXd65T-1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="320" y="310" as="sourcePoint" />
<mxPoint x="340" y="380" as="targetPoint" />
<Array as="points">
<mxPoint x="320" y="360" />
<mxPoint x="360" y="360" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-75" value="DATA_IN[7:0]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-74" vertex="1" connectable="0">
<mxGeometry x="-0.5016" y="-1" relative="1" as="geometry">
<mxPoint x="41" y="-2" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-77" value="4&lt;br&gt;1" style="ellipse;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="190" y="590" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-78" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;shape=flexArrow;fillColor=default;" parent="1" source="NXSZnqqENL-7S4XXd65T-77" target="NXSZnqqENL-7S4XXd65T-58" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-79" value="ADDR[4:1]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="NXSZnqqENL-7S4XXd65T-78" vertex="1" connectable="0">
<mxGeometry x="0.1248" relative="1" as="geometry">
<mxPoint x="-11" y="-15" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-85" value="&lt;h1&gt;MM Registers&lt;/h1&gt;&lt;p&gt;MM Registers are 16 bit.&lt;/p&gt;&lt;p&gt;There are 16 MM registers&lt;/p&gt;&lt;p&gt;There are 2 write enables, one for the high byte and one for the low byte.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;For reading, first the register is selected, then the byte in the register is selected&lt;/p&gt;" style="text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;" parent="1" vertex="1">
<mxGeometry x="610" y="570" width="230" height="210" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-86" value="" style="triangle;whiteSpace=wrap;html=1;rotation=90;" parent="1" vertex="1">
<mxGeometry x="290" y="240" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-87" value="" style="triangle;whiteSpace=wrap;html=1;rotation=90;" parent="1" vertex="1">
<mxGeometry x="420" y="770" width="60" height="80" as="geometry" />
</mxCell>
<mxCell id="NXSZnqqENL-7S4XXd65T-88" value="" style="triangle;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="890" y="210" width="60" height="80" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

View File

@@ -1,70 +0,0 @@
# Memory Mapper
## Overview
The memory mapper gives expands the CPU's address space from 16 bits to 25.
It can be expanded to be 28 bits, but only 25 are needed to access all of
sdram.
Its architecture is show below:
![memory_mapper.drawio.png](memory_mapper.drawio.png)
There are 32 16 bit registers: One for each 4k page in the virtual address
space. The memory mapper is always enabled, but at reset it is identity
mapped, i.e. register _n_ will be reset to value _n_.
## Interface
The Memory mapper is composed of 32 identical 16 bit mapping registers
The chip select should be calculated based on the virtual address. If not,
it will be possible for the CPU to map away access to the mapper, at which
point it is impossible to change the mappings without a reset.
## Registers
### Register Map
| Address | Read | Write |
|--------- |-------------- |-------------- |
| 00 | MM0 Low | MM0 Low |
| 01 | MM0 High | MM0 High |
| 02 | MM1 Low | MM1 Low |
| 03 | MM1 High | MM1 High |
| 04 | MM2 Low | MM2 Low |
| 05 | MM2 High | MM2 High |
| 06 | MM3 Low | MM3 Low |
| 07 | MM3 High | MM3 High |
| 08 | MM4 Low | MM4 Low |
| 09 | MM4 High | MM4 High |
| 0A | MM5 Low | MM5 Low |
| 0B | MM5 High | MM5 High |
| 0C | MM6 Low | MM6 Low |
| 0D | MM6 High | MM6 High |
| 0E | MM7 Low | MM7 Low |
| 0F | MM7 High | MM7 High |
| 10 | MM8 Low | MM8 Low |
| 11 | MM8 High | MM8 High |
| 12 | MM9 Low | MM9 Low |
| 13 | MM9 High | MM9 High |
| 14 | MM10 Low | MM10 Low |
| 15 | MM10 High | MM10 High |
| 16 | MM11 Low | MM11 Low |
| 17 | MM11 High | MM11 High |
| 18 | MM12 Low | MM12 Low |
| 19 | MM12 High | MM12 High |
| 1A | MM13 Low | MM13 Low |
| 1B | MM13 High | MM13 High |
| 1C | MM14 Low | MM14 Low |
| 1D | MM14 High | MM14 High |
| 1E | MM15 Low | MM15 Low |
| 1F | MM15 High | MM15 High |
### MMn Low
Low memory map data. Becomes bits [19:12] of physical address.
### MMn High
High memory map data. Becomes bits [27:20] of physical address.

View File

@@ -1,405 +0,0 @@
<mxfile host="Electron" modified="2023-11-01T06:11:06.013Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.2.8 Chrome/112.0.5615.165 Electron/24.2.0 Safari/537.36" etag="4tOil3yPLSnD9o39OaK8" version="21.2.8" type="device">
<diagram name="Page-1" id="aqkBykuImbnj1wh3Ue84">
<mxGraphModel dx="2096" dy="855" 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="3cJaNxErLRnUAumjy6m_-33" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;shape=flexArrow;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-1" target="3cJaNxErLRnUAumjy6m_-32">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-1" value="priority encoder" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="440" y="430" width="80" height="160" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-2" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="3.552713678800501e-15" y="470" as="sourcePoint" />
<mxPoint x="80" y="470" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-7" value="irq[0]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-2">
<mxGeometry x="-0.6683" relative="1" as="geometry">
<mxPoint x="-33" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-3" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.188;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="3.552713678800501e-15" y="490" as="sourcePoint" />
<mxPoint x="80" y="490" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-8" value="irq[1]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-3">
<mxGeometry x="-0.4849" y="-1" relative="1" as="geometry">
<mxPoint x="-41" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-4" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.188;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="3.552713678800501e-15" y="510" as="sourcePoint" />
<mxPoint x="80" y="510" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-9" value="irq[2]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-4">
<mxGeometry x="-0.8014" relative="1" as="geometry">
<mxPoint x="-28" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-5" value="" style="endArrow=classic;html=1;rounded=0;entryX=0;entryY=0.188;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="3.552713678800501e-15" y="560" as="sourcePoint" />
<mxPoint x="80" y="560" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-10" value="irq[n]" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-5">
<mxGeometry x="-0.7326" relative="1" as="geometry">
<mxPoint x="-31" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-6" value="..." style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="20.000000000000004" y="520" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-103" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;shape=flexArrow;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-11" target="3cJaNxErLRnUAumjy6m_-102">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="240" y="660" />
<mxPoint x="710" y="660" />
<mxPoint x="710" y="500" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-11" value="edge/&lt;br&gt;level/&lt;br&gt;trigger" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="200" y="430" width="80" height="160" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-12" value="register" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="320" y="430" width="80" height="160" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-13" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="280" y="470" as="sourcePoint" />
<mxPoint x="320" y="470" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-15" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="280" y="490" as="sourcePoint" />
<mxPoint x="320" y="490" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-16" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="280" y="509.86" as="sourcePoint" />
<mxPoint x="320" y="509.86" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-17" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="280" y="560" as="sourcePoint" />
<mxPoint x="320" y="560" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-18" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="400" y="470" as="sourcePoint" />
<mxPoint x="440" y="470" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-19" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="400" y="490" as="sourcePoint" />
<mxPoint x="440" y="490" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-20" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="400" y="509.86" as="sourcePoint" />
<mxPoint x="440" y="509.86" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-21" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="400" y="560" as="sourcePoint" />
<mxPoint x="440" y="560" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-22" value="..." style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="280" y="520" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-23" value="..." style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="400" y="520" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-24" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" target="3cJaNxErLRnUAumjy6m_-11">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="220" y="400" as="sourcePoint" />
<mxPoint x="260" y="360" as="targetPoint" />
<Array as="points" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-25" value="clk" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-24">
<mxGeometry x="-0.7388" relative="1" as="geometry">
<mxPoint y="-14" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-26" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="340" y="400" as="sourcePoint" />
<mxPoint x="340" y="430" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-27" value="clk" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-26">
<mxGeometry x="-0.7388" relative="1" as="geometry">
<mxPoint y="-14" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-64" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;entryX=0.25;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-32" target="3cJaNxErLRnUAumjy6m_-102">
<mxGeometry relative="1" as="geometry">
<mxPoint x="720" y="470" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-66" value="irq_val_out" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-64">
<mxGeometry x="0.2445" y="5" relative="1" as="geometry">
<mxPoint x="-11" y="-15" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-111" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;shape=flexArrow;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-32" target="3cJaNxErLRnUAumjy6m_-109">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="710" y="470" />
<mxPoint x="710" y="120" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-32" value="irq_val" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="560" y="440" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-34" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.75;exitDx=0;exitDy=0;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="600" y="540" as="sourcePoint" />
<mxPoint x="600" y="550" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-35" value="irq_out" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-34">
<mxGeometry x="0.5991" y="-1" relative="1" as="geometry">
<mxPoint x="52" y="-1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-36" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;exitX=0.75;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-99" target="3cJaNxErLRnUAumjy6m_-11">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="260" y="400" as="sourcePoint" />
<mxPoint x="310" y="350" as="targetPoint" />
<Array as="points">
<mxPoint x="310" y="200" />
<mxPoint x="310" y="340" />
<mxPoint x="260" y="340" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-44" value="trigger_type" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-36">
<mxGeometry x="-0.5646" y="-2" relative="1" as="geometry">
<mxPoint x="-28" y="107" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-104" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.75;entryY=1;entryDx=0;entryDy=0;shape=flexArrow;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-38" target="3cJaNxErLRnUAumjy6m_-102">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="120" y="700" />
<mxPoint x="760" y="700" />
<mxPoint x="760" y="530" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-38" value="enable" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="80" y="430" width="80" height="160" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-39" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="470" as="sourcePoint" />
<mxPoint x="200" y="470" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-40" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="490" as="sourcePoint" />
<mxPoint x="200" y="490" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-41" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="509.86" as="sourcePoint" />
<mxPoint x="200" y="509.86" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-42" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="160" y="560" as="sourcePoint" />
<mxPoint x="200" y="560" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-43" value="..." style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
<mxGeometry x="160" y="520" width="30" height="30" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-45" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="99.88999999999999" y="400" as="sourcePoint" />
<mxPoint x="99.88999999999999" y="430" as="targetPoint" />
<Array as="points" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-46" value="clk" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-45">
<mxGeometry x="-0.7388" relative="1" as="geometry">
<mxPoint y="-14" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-47" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;exitX=0.25;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-99">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="139.89" y="400" as="sourcePoint" />
<mxPoint x="139.89" y="430" as="targetPoint" />
<Array as="points">
<mxPoint x="290" y="260" />
<mxPoint x="290" y="310" />
<mxPoint x="140" y="310" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-48" value="int_en" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-47">
<mxGeometry x="-0.5646" y="-2" relative="1" as="geometry">
<mxPoint x="-147" y="83" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-98" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;shape=flexArrow;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-90" target="3cJaNxErLRnUAumjy6m_-96">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-101" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;shape=flexArrow;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-90" target="3cJaNxErLRnUAumjy6m_-99">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-90" value="data_in mux" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;rotation=-90;" vertex="1" parent="1">
<mxGeometry x="15.030000000000015" y="119.74000000000001" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-91" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" target="3cJaNxErLRnUAumjy6m_-90">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="-34.969999999999985" y="149.74" as="sourcePoint" />
<mxPoint x="-24.969999999999985" y="109.74000000000001" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-92" value="data_in" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-91">
<mxGeometry x="-0.5289" y="-1" relative="1" as="geometry">
<mxPoint x="-49" y="-1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-93" value="" style="endArrow=classic;html=1;rounded=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" target="3cJaNxErLRnUAumjy6m_-90">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="75.03000000000002" y="39.739999999999995" as="sourcePoint" />
<mxPoint x="85.03000000000002" y="-10.260000000000005" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-94" value="addr" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-93">
<mxGeometry x="-0.8263" y="1" relative="1" as="geometry">
<mxPoint x="-1" y="-15" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-100" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-96" target="3cJaNxErLRnUAumjy6m_-99">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-105" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-96" target="3cJaNxErLRnUAumjy6m_-102">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="245" y="160" />
<mxPoint x="840" y="160" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-112" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-96" target="3cJaNxErLRnUAumjy6m_-109">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-118" value="cmd=EOI" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-112">
<mxGeometry x="-0.2899" relative="1" as="geometry">
<mxPoint x="16" y="-20" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-120" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-96" target="3cJaNxErLRnUAumjy6m_-38">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="215" y="160" />
<mxPoint x="120" y="160" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-121" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-96" target="3cJaNxErLRnUAumjy6m_-11">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="215" y="160" />
<mxPoint x="120" y="160" />
<mxPoint x="120" y="370" />
<mxPoint x="240" y="370" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-122" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-96" target="3cJaNxErLRnUAumjy6m_-12">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="215" y="160" />
<mxPoint x="120" y="160" />
<mxPoint x="120" y="370" />
<mxPoint x="360" y="370" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-123" value="byte_en" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-122">
<mxGeometry x="-0.7727" relative="1" as="geometry">
<mxPoint y="-10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-96" value="CMD register" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="185.03000000000003" y="89.74000000000001" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-99" value="data_sel_mux" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;rotation=-90;" vertex="1" parent="1">
<mxGeometry x="185.03" y="200" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-106" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;shape=flexArrow;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-102">
<mxGeometry relative="1" as="geometry">
<mxPoint x="920" y="499.85185185185173" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-107" value="data_out" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="3cJaNxErLRnUAumjy6m_-106">
<mxGeometry x="0.3413" y="-9" relative="1" as="geometry">
<mxPoint y="-39" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-102" value="" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;rotation=90;" vertex="1" parent="1">
<mxGeometry x="780" y="470" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-114" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-109" target="3cJaNxErLRnUAumjy6m_-113">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-109" value="EOI shifter" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="360" y="90" width="90" height="59.74" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-115" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.75;entryY=0;entryDx=0;entryDy=0;shape=flexArrow;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-113" target="3cJaNxErLRnUAumjy6m_-12">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="365" y="360" />
<mxPoint x="380" y="360" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-113" value="&amp;amp;" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
<mxGeometry x="340" y="280" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-116" value="" style="shape=flexArrow;endArrow=classic;html=1;rounded=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.138;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="3cJaNxErLRnUAumjy6m_-12" target="3cJaNxErLRnUAumjy6m_-113">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="410" y="452" as="sourcePoint" />
<mxPoint x="460" y="330" as="targetPoint" />
<Array as="points">
<mxPoint x="420" y="452" />
<mxPoint x="420" y="305" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-117" value="&lt;h1&gt;EOI shifter&lt;/h1&gt;&lt;p&gt;EOI shifter will do 1 &amp;lt;&amp;lt; IRQN&amp;nbsp;&lt;span style=&quot;background-color: initial;&quot;&gt;and then clear that interrupt in the register&lt;/span&gt;&lt;/p&gt;" style="text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;" vertex="1" parent="1">
<mxGeometry x="420" y="170" width="190" height="120" as="geometry" />
</mxCell>
<mxCell id="3cJaNxErLRnUAumjy6m_-119" value="&lt;h1&gt;data_sel_mux&lt;/h1&gt;&lt;p&gt;The upper 3 bits of CMD determine where data goes. The lower 5 bits of cmd determine which of the 32 8 bit registers gets updated. The registers below all of byte enable signals that this is passed to.&lt;/p&gt;" style="text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;" vertex="1" parent="1">
<mxGeometry x="-160" y="210" width="220" height="150.26" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

View File

@@ -1,60 +0,0 @@
# PIC
## Overview
The PIC (Programmable Interrupt Controller) supports 256 edge or level
triggered interrupts.
Interrupts can only be rising edge or positive level trigger. Negative edge or
low level trigger can be accomplished by inverting the input to this module.
When an interrupt is triggered, it remains triggered until cleared with an
`EOI`. Currently, only the highest priority interrupt can be cleared. This
is bad design and will be fixed soon(tm).
![pic.drawio.png](pic.drawio.png)
## Interface
The PIC is controlled through two 8-bit registers, `CMD` and `DAT`.
The upepr 3 bits of `CMD` control which register is accessed, and the lower 5
bits control the byte select.
`EOI` is a special case: when `CMD` is 0xFF, the highest priority interrupt is
cleared.
### CMD
| [7:5] | [4:0] |
|------------------ |------------- |
| Register Address | Byte Select |
### DAT
| [7:0] |
|----------------------- |
| Data[8*Byte_sel +: 8] |
## Registers
### Register Map
| Address | Read | Write |
|--------- |------------ |-------- |
| 0 | IRQ Number | ~ |
| 1 | Enable | Enable |
| 2 | Type | Type |
### IRQ Number
8 bit register outputs the highest priority interrupt currently active. When
no interrupt is active, it will output 255.
### Enable
256 bit enable register. When bit _n_ is set to 1, the corresponding interrupt
_n_.
### Type
256 bit type register. When bit _n_ is set to 0, the corresponding interrupt
_n_ will be edge triggered. If the bit is set to 1, the interrupt will be level
triggered.

View File

@@ -1,159 +0,0 @@
<mxfile host="Electron" modified="2023-11-18T04:11:39.306Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.2.8 Chrome/112.0.5615.165 Electron/24.2.0 Safari/537.36" etag="eYrFa9NU5guZXVUdtYRa" version="21.2.8" type="device">
<diagram name="Page-1" id="63FCqJR16r1iN9e5nhDj">
<mxGraphModel dx="916" dy="629" 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="k1zQWelyq6vxBJ3jjw4w-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.007;entryY=0.57;entryDx=0;entryDy=0;entryPerimeter=0;shape=flexArrow;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-1" target="k1zQWelyq6vxBJ3jjw4w-3">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="60" y="380" />
<mxPoint x="60" y="463" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.065;entryY=0.493;entryDx=0;entryDy=0;entryPerimeter=0;shape=flexArrow;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-1" target="k1zQWelyq6vxBJ3jjw4w-11">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-1" value="counter" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="80" y="360" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-3" target="k1zQWelyq6vxBJ3jjw4w-1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-3" value="+" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
<mxGeometry x="120" y="440" width="40" height="40" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-6" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-4" target="k1zQWelyq6vxBJ3jjw4w-3">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-4" value="increment" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="200" y="440" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-8" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" target="k1zQWelyq6vxBJ3jjw4w-1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="140" y="320" as="sourcePoint" />
<mxPoint x="180" y="320" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-9" value="CLK" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="k1zQWelyq6vxBJ3jjw4w-8">
<mxGeometry x="-0.4884" y="1" relative="1" as="geometry">
<mxPoint x="-1" y="-30" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;shape=flexArrow;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-10" target="k1zQWelyq6vxBJ3jjw4w-11">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-43" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.75;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-10" target="k1zQWelyq6vxBJ3jjw4w-1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="170" y="300" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-44" value="reset" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="k1zQWelyq6vxBJ3jjw4w-43">
<mxGeometry x="-0.4039" y="-1" relative="1" as="geometry">
<mxPoint y="-9" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-10" value="threshold" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="200" y="280" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-17" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-11" target="k1zQWelyq6vxBJ3jjw4w-15">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-24" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-11" target="k1zQWelyq6vxBJ3jjw4w-23">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-38" value="tick" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="k1zQWelyq6vxBJ3jjw4w-24">
<mxGeometry x="-0.3931" y="2" relative="1" as="geometry">
<mxPoint x="-11" y="-8" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-11" value="&amp;gt;=" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
<mxGeometry x="240" y="360" width="40" height="40" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.919;exitY=0.977;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;shape=flexArrow;exitPerimeter=0;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-15" target="k1zQWelyq6vxBJ3jjw4w-16">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="630" y="460" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;shape=flexArrow;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-15">
<mxGeometry relative="1" as="geometry">
<mxPoint x="680" y="380.0567375886525" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-42" value="time" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="k1zQWelyq6vxBJ3jjw4w-41">
<mxGeometry x="0.562" y="2" relative="1" as="geometry">
<mxPoint x="-11" y="-28" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-15" value="output" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="520" y="360" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-19" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.25;entryY=1;entryDx=0;entryDy=0;shape=flexArrow;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-16" target="k1zQWelyq6vxBJ3jjw4w-15">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="550" y="460" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-16" value="+1" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
<mxGeometry x="560" y="440" width="40" height="40" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-35" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.75;exitDx=0;exitDy=0;entryX=1;entryY=0.75;entryDx=0;entryDy=0;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-22" target="k1zQWelyq6vxBJ3jjw4w-23">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-37" value="reset" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="k1zQWelyq6vxBJ3jjw4w-35">
<mxGeometry x="0.1138" relative="1" as="geometry">
<mxPoint y="10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-22" value="irq_threshold" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="520" y="280" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.083;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;shape=flexArrow;exitPerimeter=0;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-23" target="k1zQWelyq6vxBJ3jjw4w-26">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="370" y="220" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-34" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;shape=flexArrow;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-23" target="k1zQWelyq6vxBJ3jjw4w-22">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-36" value="val" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="k1zQWelyq6vxBJ3jjw4w-34">
<mxGeometry x="-0.1015" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-23" value="irq_counter" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="360" y="280" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-32" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;shape=flexArrow;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-26" target="k1zQWelyq6vxBJ3jjw4w-23">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="450" y="220" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-26" value="+1" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
<mxGeometry x="400" y="200" width="40" height="40" as="geometry" />
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-39" value="" style="endArrow=classic;html=1;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="k1zQWelyq6vxBJ3jjw4w-22">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="610" y="350" as="sourcePoint" />
<mxPoint x="680" y="300" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="k1zQWelyq6vxBJ3jjw4w-40" value="irq" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="k1zQWelyq6vxBJ3jjw4w-39">
<mxGeometry x="-0.3025" y="-1" relative="1" as="geometry">
<mxPoint y="-11" as="offset" />
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -1,82 +0,0 @@
# RTC
## Overview
The RTC is capable of keeping track of elapsed time as well as generating
periodic interrupts. Its input frequency is (currently) the same as the CPU
frequency. The architecture is shown below:
![rtc.drawio.png](rtc.drawio.png)
The `counter` register is a 32 bit register which increments by `increment`
every clock tick. When this value reaches `threshold`, both `output` and
`irq_counter` are incremented by 1. When `irq_counter` reaches `irq_threshold`,
an interrupt is generated.
The interrupt frequency can be calculated with the following equations:
$$ F_{out}=\frac{F_{in}\cdot{increment}}{threshold} $$
$$ F_{irq}=\frac{F_{out}}{irq\_threshold} $$
Where $ F_{out} $ is the frequency at which the output changes and $ F_{irq} $
is the frequency at which interrupts occur.
## Interface
The RTC is controlled through two 8-bit registers, `CMD` and `DAT`.
The upepr 4 bits of `CMD` control which register is accessed, and the lower 4
bits control the byte select. The RTC uses 32 bit registers, so only values of
0-3 are supported.
### CMD
| [7:4] | [3:2 | [1:0] |
|------------------ |---------- |------------- |
| Register Address | Reserved | Byte Select |
### DAT
| [7:0] |
|----------------------- |
| Data[8*Byte_sel +: 8] |
## Registers
### Register Map
| Address | Read | Write |
|--------- |--------------- |--------------- |
| 0 | Threshold | Threshold |
| 1 | Increment | Increment |
| 2 | IRQ Threshold | IRQ Threshold |
| 3 | Output | Control |
### Threshold
32 bit threshold register. When `counter` reaches this value, `output` and
`irq_counter` are incremented by 1, and `counter` is reset back to 0.
### Increment
32 bit increment register. Every clock cycle, `counter` is incremented by
`increment`
### IRQ Threshold
32 bit IRQ threshold register. When `irq_counter` reaches this value, and IRQ
is generated and `irq_counter` is reset back to 0.
### Output
32 bit output register. This value ticks up.
### Control
| [7:2] | [1] | [0] |
|---------- |------------ |-------- |
| Reserved | IRQ Enable | Enable |
8 bit Control register. Regardless of Byte Select, any write to address 3 will
write to this register. `IRQ Enable` controls interrupt generation. `Enable` is
a global enable. When 0, all counter registers are set to 0.

View File

@@ -1,107 +0,0 @@
<mxfile host="Electron" modified="2023-09-08T06:35:22.343Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.2.8 Chrome/112.0.5615.165 Electron/24.2.0 Safari/537.36" etag="Vup8A8Ew0YNgsrP0aR2d" version="21.2.8" type="device">
<diagram name="Page-1" id="W38x1XGtULFemG_pfs-W">
<mxGraphModel dx="528" dy="362" 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="qp9JQkSkVBdRz7zZg5ij-1" value="65C02" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="400" y="470" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-2" value="" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=#000000;" vertex="1" parent="1">
<mxGeometry x="560" y="400" width="410" height="300" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-3" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="560" y="440" width="130" height="120" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-4" value="Control Registers" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="595" y="450" width="60" height="40" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-8" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;endFill=0;strokeColor=#FF0000;" edge="1" parent="1" source="qp9JQkSkVBdRz7zZg5ij-5" target="qp9JQkSkVBdRz7zZg5ij-7">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-5" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;M&lt;/font&gt;" style="whiteSpace=wrap;html=1;aspect=fixed;strokeColor=#FF0000;" vertex="1" parent="1">
<mxGeometry x="510" y="495" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;strokeColor=#FF0000;" edge="1" parent="1" source="qp9JQkSkVBdRz7zZg5ij-7" target="qp9JQkSkVBdRz7zZg5ij-4">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="580" y="500" />
<mxPoint x="580" y="470" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;strokeColor=#FF0000;" edge="1" parent="1" source="qp9JQkSkVBdRz7zZg5ij-7" target="qp9JQkSkVBdRz7zZg5ij-9">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="580" y="500" />
<mxPoint x="580" y="530" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-7" value="&lt;font color=&quot;#ffffff&quot; style=&quot;font-size: 8px;&quot;&gt;S&lt;/font&gt;" style="whiteSpace=wrap;html=1;aspect=fixed;strokeColor=#FF0000;fillColor=#000000;" vertex="1" parent="1">
<mxGeometry x="560" y="495" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#FF0000;endArrow=none;endFill=0;" edge="1" parent="1" source="qp9JQkSkVBdRz7zZg5ij-9" target="qp9JQkSkVBdRz7zZg5ij-40">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-9" value="MMU" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="595" y="510" width="60" height="40" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-18" value="Boot Rom" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="600" y="610" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-33" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="qp9JQkSkVBdRz7zZg5ij-19" target="qp9JQkSkVBdRz7zZg5ij-32">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-19" value="SDRAM" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="850" y="427.5" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-26" value="UART" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="850" y="520" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-28" value="&lt;font color=&quot;#ffffff&quot; style=&quot;font-size: 8px;&quot;&gt;S&lt;/font&gt;" style="whiteSpace=wrap;html=1;aspect=fixed;strokeColor=#FF0000;fillColor=#000000;" vertex="1" parent="1">
<mxGeometry x="710" y="635" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-29" value="&lt;font color=&quot;#ffffff&quot; style=&quot;font-size: 8px;&quot;&gt;S&lt;/font&gt;" style="whiteSpace=wrap;html=1;aspect=fixed;strokeColor=#FF0000;fillColor=#000000;" vertex="1" parent="1">
<mxGeometry x="850" y="545" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-30" value="&lt;font color=&quot;#ffffff&quot; style=&quot;font-size: 8px;&quot;&gt;S&lt;/font&gt;" style="whiteSpace=wrap;html=1;aspect=fixed;strokeColor=#FF0000;fillColor=#000000;" vertex="1" parent="1">
<mxGeometry x="850" y="452.5" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-32" value="SDRAM" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="1000" y="427.5" width="80" height="60" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-35" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="770" y="427.5" width="30" height="242.5" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-45" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;strokeColor=#FF0000;" edge="1" parent="1" source="qp9JQkSkVBdRz7zZg5ij-36" target="qp9JQkSkVBdRz7zZg5ij-28">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-36" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;M&lt;/font&gt;" style="whiteSpace=wrap;html=1;aspect=fixed;strokeColor=#FF0000;" vertex="1" parent="1">
<mxGeometry x="770" y="635" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;strokeColor=#FF0000;" edge="1" parent="1" source="qp9JQkSkVBdRz7zZg5ij-37" target="qp9JQkSkVBdRz7zZg5ij-29">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-37" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;M&lt;/font&gt;" style="whiteSpace=wrap;html=1;aspect=fixed;strokeColor=#FF0000;" vertex="1" parent="1">
<mxGeometry x="790" y="545" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-43" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;strokeColor=#FF0000;" edge="1" parent="1" source="qp9JQkSkVBdRz7zZg5ij-38" target="qp9JQkSkVBdRz7zZg5ij-30">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-38" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;M&lt;/font&gt;" style="whiteSpace=wrap;html=1;aspect=fixed;strokeColor=#FF0000;" vertex="1" parent="1">
<mxGeometry x="790" y="452.5" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-39" value="&lt;font color=&quot;#ffffff&quot; style=&quot;font-size: 8px;&quot;&gt;S&lt;/font&gt;" style="whiteSpace=wrap;html=1;aspect=fixed;strokeColor=#FF0000;fillColor=#000000;" vertex="1" parent="1">
<mxGeometry x="770" y="525" width="10" height="10" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-42" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;strokeColor=#FF0000;" edge="1" parent="1" source="qp9JQkSkVBdRz7zZg5ij-40" target="qp9JQkSkVBdRz7zZg5ij-39">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="qp9JQkSkVBdRz7zZg5ij-40" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;M&lt;/font&gt;" style="whiteSpace=wrap;html=1;aspect=fixed;strokeColor=#FF0000;" vertex="1" parent="1">
<mxGeometry x="680" y="525" width="10" height="10" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>