Skip to content

Commit 5d4aef4

Browse files
committed
dm wip
1 parent 01eaeee commit 5d4aef4

File tree

4 files changed

+226
-132
lines changed

4 files changed

+226
-132
lines changed

README.md

Lines changed: 51 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,20 @@ You can also run the test directly from within vscode by pressing the `Run Test`
101101

102102
## Vips registers
103103

104-
| Number | Name |
105-
| :----: | :------: |
106-
| 0 | zero |
107-
| 1 | at |
108-
| 2..3 | v0..v1 |
109-
| 4..7 | a0..a2 |
110-
| 8..15 | t0..t7 |
111-
| 16..23 | s0..s7 |
112-
| 24..25 | t8..t9 |
113-
| 26..27 | k0..k1 |
114-
| 28 | gp |
115-
| 29 | sp |
116-
| 30 | fp |
117-
| 31 | ra |
104+
| Number | Name |
105+
| :----: | :----: |
106+
| 0 | zero |
107+
| 1 | at |
108+
| 2..3 | v0..v1 |
109+
| 4..7 | a0..a2 |
110+
| 8..15 | t0..t7 |
111+
| 16..23 | s0..s7 |
112+
| 24..25 | t8..t9 |
113+
| 26..27 | k0..k1 |
114+
| 28 | gp |
115+
| 29 | sp |
116+
| 30 | fp |
117+
| 31 | ra |
118118

119119
## Modules
120120

@@ -126,29 +126,29 @@ The Alu module, configured for 4 bit wide inputs:
126126

127127
The Alu has the `sub` and `op` inputs defined as follows:
128128

129-
| Operation | `sub` | `op` |
130-
| --------- | :---: | :--: |
131-
| and | 0 | 00 |
132-
| or | 0 | 01 |
133-
| add | 0 | 10 |
134-
| sub | 1 | 10 |
135-
| slt | 1 | 11 |
129+
| Operation | `sub` | `op` |
130+
| --------- | :---: | :---: |
131+
| and | 0 | 00 |
132+
| or | 0 | 01 |
133+
| add | 0 | 10 |
134+
| sub | 1 | 10 |
135+
| slt | 1 | 11 |
136136

137137
### Decoder
138138

139139
The VIPS support a subset of the MIPS32 ISA:
140140

141-
| Operation | `rf_we` | `wb_reg` | `sub` | `op` | `alu_src` | `sign_ext` |
142-
| --------- | :-----: | :------: | :---: | :--: | :------: | :--------: |
143-
| and | 1 | 1 | 0 | 00 | 0 | x |
144-
| or | 1 | 1 | 0 | 01 | 0 | x |
145-
| add | 1 | 1 | 0 | 10 | 0 | x |
146-
| sub | 1 | 1 | 1 | 10 | 0 | x |
147-
| slt | 1 | 1 | 1 | 11 | 0 | x |
148-
| andi | 1 | 0 | 0 | 00 | 1 | 0 |
149-
| ori | 1 | 0 | 0 | 01 | 1 | 0 |
150-
| addi | 1 | 0 | 0 | 10 | 1 | 1 |
151-
| slti | 1 | 0 | 1 | 11 | 1 | 1 |
141+
| Operation | `rf_we` | `wb_reg` | `sub` | `op` | `alu_src` | `sign_ext` |
142+
| --------- | :-----: | :------: | :---: | :---: | :-------: | :--------: |
143+
| and | 1 | 1 | 0 | 00 | 0 | x |
144+
| or | 1 | 1 | 0 | 01 | 0 | x |
145+
| add | 1 | 1 | 0 | 10 | 0 | x |
146+
| sub | 1 | 1 | 1 | 10 | 0 | x |
147+
| slt | 1 | 1 | 1 | 11 | 0 | x |
148+
| andi | 1 | 0 | 0 | 00 | 1 | 0 |
149+
| ori | 1 | 0 | 0 | 01 | 1 | 0 |
150+
| addi | 1 | 0 | 0 | 10 | 1 | 1 |
151+
| slti | 1 | 0 | 1 | 11 | 1 | 1 |
152152

153153
![image](images/decoder.svg)
154154

@@ -157,16 +157,27 @@ The VIPS support a subset of the MIPS32 ISA:
157157
For now using the explicit syntax for declaring dependencies.
158158

159159
```shell
160-
veryl test src/mux.veryl --wave
160+
# simple components
161+
veryl test src/mux2.veryl --wave
162+
veryl test src/mux4.veryl --wave
161163
veryl test src/half_adder.veryl --wave
162-
veryl test src/pc_plus4.veryl src/adder.veryl src/full_adder.veryl --wave
164+
veryl test src/decoder1.veryl --wave
163165
veryl test src/decoder.veryl --wave
164166
veryl test src/zero_extend.veryl --wave
165-
veryl test src/regfile.veryl --wave
166-
veryl test src/arith.veryl src/full_adder.veryl --wave
167-
veryl test src/alu.veryl src/mux.veryl src/zero_extend.veryl src/arith.veryl src/full_adder.veryl
168-
veryl test src/alu4.veryl src/alu.veryl src/mux.veryl src/zero_extend.veryl src/arith.veryl src/full_adder.veryl
169-
veryl test src/alu32.veryl src/alu.veryl src/mux.veryl src/zero_extend.veryl src/arith.veryl src/full_adder.veryl
167+
veryl test src/extend16to32.veryl --wave
168+
veryl test src/regfile.veryl --wave
169+
veryl test src/data_memory.veryl --wave
170+
# composite components, alu
171+
veryl test src/pc_plus4.veryl src/adder.veryl src/full_adder.veryl --wave
172+
veryl test src/arith_test.veryl src/arith.veryl src/full_adder.veryl --wave
173+
veryl test src/alu.veryl src/mux4.veryl src/zero_extend.veryl src/arith.veryl src/full_adder.veryl --wave
174+
veryl test src/alu4.veryl src/alu.veryl src/mux4.veryl src/zero_extend.veryl src/arith.veryl src/full_adder.veryl --wave
175+
veryl test src/alu32.veryl src/alu.veryl src/mux4.veryl src/zero_extend.veryl src/arith.veryl src/full_adder.veryl --wave
176+
# top level Vips1
177+
veryl test src/alu.veryl src/vips1.veryl src/mux2.veryl src/extend16to32.veryl src/regfile.veryl src/decoder1.veryl src/instr_mem.veryl src/pc_plus4.veryl src/adder.veryl src/full_adder.veryl src/mux4.veryl src/zero_extend.veryl src/arith.veryl --wave
178+
# top level Vips
179+
veryl test src/alu.veryl src/vips.veryl src/mux2.veryl src/extend16to32.veryl src/regfile.veryl src/decoder.veryl src/instr_mem.veryl src/pc_plus4.veryl src/adder.veryl src/full_adder.veryl src/mux4.veryl src/zero_extend.veryl src/arith.veryl --wave
180+
170181
```
171182

172-
Notice, the `--wave` option for `alu` test does not currently work.
183+

0 commit comments

Comments
 (0)