Skip to content

Commit

Permalink
Add a bunch of pictures for my slides
Browse files Browse the repository at this point in the history
  • Loading branch information
VonTum committed Jul 30, 2024
1 parent fa30084 commit daaf064
Show file tree
Hide file tree
Showing 15 changed files with 808 additions and 35 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ To use the accompanying VSCode Extension for Syntax Highlighting and Code Sugges
ext install LennartVanHirtum.sus-lsp
```

For an example project to tinker with, see [VonTum/BitSerialMatrixMultiply](https://github.com/VonTum/BitSerialMatrixMultiply).

## Core philosophy

SUS is meant to be a direct competitor to Synthesizeable Verilog and VHDL. Its main goal is to be an intuitive and thin syntax for building netlists, such that traditional synthesis tools can still be used to analyze the resulting hardware. SUS shall impose no paradigm on the hardware designer, such as requiring specific communication protocols or iteration constructs. In other words, SUS is not there to abstract away complexity, but rather to make the inherent complexity of hardware design more manageable.
Expand Down
5 changes: 2 additions & 3 deletions bitSerialMatrixMultiply.sus
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ module BitSerialMatrixMultiply {
module BitSerialMatrixMultiplyTemplate {
input gen int WIDTH
input gen int HEIGHT
input gen int[WIDTH][HEIGHT] MATRIX

// 32 right now, because ints are't sized yet.
gen int INT_BITWIDTH = 32

input gen int[WIDTH][HEIGHT] MATRIX

BitSerialMatrixMultiplyState::<WIDTH, HEIGHT, MATRIX;> bsm_state

interface BitSerialMatrixMultiplyTemplate : bool start, int[WIDTH] values -> int[HEIGHT] result
Expand All @@ -59,7 +58,7 @@ module BitSerialMatrixMultiplyTemplate {
// Explicitly not use value
int _ = iter.value

// This is above start, so start has write priority on split_into_bits. TODO shift down once we have `overwrite`
// This is above start, so start has write priority on split_into_bits.
if iter.valid {
// It's a shift register
for int BIT in 1..INT_BITWIDTH {
Expand Down
390 changes: 390 additions & 0 deletions philosophy/images/bitSerialMatMul.drawio

Large diffs are not rendered by default.

Binary file added philosophy/images/bitSerialMatMul.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
164 changes: 164 additions & 0 deletions philosophy/images/bitSerialRow.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
<mxfile host="Electron" modified="2024-07-29T16:05:57.969Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.6.5 Chrome/114.0.5735.243 Electron/25.3.1 Safari/537.36" etag="5A6COVGTuc7hs33etZcQ" version="21.6.5" type="device">
<diagram name="Page-1" id="riMp933NS3saDvO-RRD6">
<mxGraphModel dx="669" dy="693" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="89CZNOWMrDxlZQmOXzGU-1" value="* 0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=21;dashed=1;fontColor=#333333;" vertex="1" parent="1">
<mxGeometry x="80" y="180" width="60" height="60" as="geometry" />
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-3" value="* 25" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=21;" vertex="1" parent="1">
<mxGeometry x="160" y="180" width="60" height="60" as="geometry" />
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-4" value="* -3" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=21;" vertex="1" parent="1">
<mxGeometry x="240" y="180" width="60" height="60" as="geometry" />
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-5" value="* 0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=21;dashed=1;fontColor=#333333;" vertex="1" parent="1">
<mxGeometry x="320" y="180" width="60" height="60" as="geometry" />
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-6" value="* 0" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=21;dashed=1;fontColor=#333333;" vertex="1" parent="1">
<mxGeometry x="400" y="180" width="60" height="60" as="geometry" />
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-7" value="* 5" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=21;" vertex="1" parent="1">
<mxGeometry x="480" y="180" width="60" height="60" as="geometry" />
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-8" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=8;rounded=0;fontSize=16;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="630" y="209.71000000000004" as="sourcePoint" />
<mxPoint x="550" y="209.71000000000004" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-9" value="+" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=21;" vertex="1" parent="1">
<mxGeometry x="210" y="320" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-10" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="89CZNOWMrDxlZQmOXzGU-3" target="89CZNOWMrDxlZQmOXzGU-9">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="235" y="280" as="sourcePoint" />
<mxPoint x="360" y="510" as="targetPoint" />
<Array as="points">
<mxPoint x="190" y="280" />
<mxPoint x="240" y="280" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-33" value="32" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="89CZNOWMrDxlZQmOXzGU-10">
<mxGeometry x="0.6264" y="2" relative="1" as="geometry">
<mxPoint x="-2" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-11" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="89CZNOWMrDxlZQmOXzGU-4" target="89CZNOWMrDxlZQmOXzGU-9">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="290" y="440" as="sourcePoint" />
<mxPoint x="340" y="390" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-32" value="32" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="89CZNOWMrDxlZQmOXzGU-11">
<mxGeometry x="0.3929" y="-2" relative="1" as="geometry">
<mxPoint x="2" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-12" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="89CZNOWMrDxlZQmOXzGU-7" target="89CZNOWMrDxlZQmOXzGU-9">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="280" y="250" as="sourcePoint" />
<mxPoint x="280" y="330" as="targetPoint" />
<Array as="points">
<mxPoint x="510" y="280" />
<mxPoint x="300" y="280" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-34" value="32" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="89CZNOWMrDxlZQmOXzGU-12">
<mxGeometry x="0.8286" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-13" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="269.71" y="360" as="sourcePoint" />
<mxPoint x="380" y="400" as="targetPoint" />
<Array as="points">
<mxPoint x="270" y="400" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-35" value="32" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="89CZNOWMrDxlZQmOXzGU-13">
<mxGeometry x="-0.8903" y="2" relative="1" as="geometry">
<mxPoint x="-2" y="12" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-14" 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="110" y="120" as="sourcePoint" />
<mxPoint x="109.71000000000001" y="180" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-15" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="89CZNOWMrDxlZQmOXzGU-14">
<mxGeometry x="0.3786" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-16" 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="190" y="120" as="sourcePoint" />
<mxPoint x="189.71" y="180" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-17" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="89CZNOWMrDxlZQmOXzGU-16">
<mxGeometry x="0.3786" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-18" 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="270" y="120" as="sourcePoint" />
<mxPoint x="269.71000000000004" y="180" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-19" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="89CZNOWMrDxlZQmOXzGU-18">
<mxGeometry x="0.3786" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-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="350" y="120" as="sourcePoint" />
<mxPoint x="349.71000000000004" y="180" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-27" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="89CZNOWMrDxlZQmOXzGU-26">
<mxGeometry x="0.3786" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-28" 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="430" y="120" as="sourcePoint" />
<mxPoint x="429.71000000000004" y="180" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-29" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="89CZNOWMrDxlZQmOXzGU-28">
<mxGeometry x="0.3786" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-30" 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="510" y="120" as="sourcePoint" />
<mxPoint x="509.71000000000004" y="180" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-31" value="1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="89CZNOWMrDxlZQmOXzGU-30">
<mxGeometry x="0.3786" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-36" value="Bits" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=21;" vertex="1" parent="1">
<mxGeometry x="280" y="90" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="89CZNOWMrDxlZQmOXzGU-37" value="Row Value" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=21;" vertex="1" parent="1">
<mxGeometry x="400" y="380" width="120" height="40" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Binary file added philosophy/images/bitSerialRow.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions philosophy/images/multipleInterfaces.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<mxfile host="Electron" modified="2024-07-30T18:40:42.213Z" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.6.5 Chrome/114.0.5735.243 Electron/25.3.1 Safari/537.36" etag="zBV2Yft-veOoMGTWMfuA" version="21.6.5" type="device">
<diagram name="Page-1" id="lTKXGvPjV29dHkk9vSpu">
<mxGraphModel dx="576" dy="390" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="7nd8d7u_mbpoJ85qQ8lB-1" value="Iterator&lt;br&gt;state" style="ellipse;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="360" y="520" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="7nd8d7u_mbpoJ85qQ8lB-2" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" target="7nd8d7u_mbpoJ85qQ8lB-1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="320" y="490" as="sourcePoint" />
<mxPoint x="320" y="460" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="7nd8d7u_mbpoJ85qQ8lB-3" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1" source="7nd8d7u_mbpoJ85qQ8lB-1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="320" y="490" as="sourcePoint" />
<mxPoint x="490" y="520" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="7nd8d7u_mbpoJ85qQ8lB-4" value="start" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="330" y="480" width="60" height="30" as="geometry" />
</mxCell>
<mxCell id="7nd8d7u_mbpoJ85qQ8lB-5" value="iter" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
<mxGeometry x="430" y="500" width="60" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Binary file added philosophy/images/multipleInterfaces.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit daaf064

Please sign in to comment.