Skip to content

Commit 6acf0eb

Browse files
author
Sharukh Hasan
committed
added inputs & outputs to sisc_tb.v ***ctrl outputs not finished
1 parent 7bc584b commit 6acf0eb

File tree

2 files changed

+44
-17
lines changed

2 files changed

+44
-17
lines changed

sisc.v

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,46 @@ module sisc (clk, rst_f, ir);
3030
// components
3131

3232
// mux4
33-
mux4 _mux4(
34-
35-
);
33+
mux4 _mux4(.in_a (ir[15:12]),
34+
.in_b (ir[19:16]),
35+
.sel (rd_sel),
36+
.out (mux4_result));
3637

3738
// rf
38-
rf _rf(
39-
40-
);
39+
rf _rf(.read_rega (ir[23:20]),
40+
.read_regb (ir[19:16]),
41+
.write_reg (mux4_result[3:0]),
42+
.write_data (mux32_out[31:0]),
43+
.rf_we (rf_we),
44+
.rsa (rsa),
45+
.rsb (rsb));
4146

4247
// alu
43-
alu _alu(
44-
45-
);
48+
alu _alu(.rsa (rsa[31:0]),
49+
.rsb (rsb[31:0]),
50+
.alu_op (alu_op[1:0]),
51+
.alu_result (alu_result),
52+
.stat (cc),
53+
.stat_en (cc_en));
4654

4755
// mux32
48-
mux32 _mux32(
49-
50-
);
56+
mux32 _mux32(.in_a (32'h00000000),
57+
.in_b (alu_result[31:0]),
58+
.sel (wb_sel),
59+
.out (mux32_out));
5160

5261
// statreg
53-
statreg _statreg(
54-
55-
);
62+
statreg _statreg(.in (cc[3:0]),
63+
.enable (cc_en),
64+
.out (stat_out));
5665

5766
// ctrl
58-
ctrl _ctrl(
59-
67+
ctrl _ctrl(.clk (clk),
68+
.rst_f (rst_f),
69+
.opcode (ir[31:28]),
70+
.mm (ir[27:24]),
71+
.stat (stat_out)
72+
// outputs left to do
6073
);
6174

6275

sisc_tb.v

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// ECE:3350 SISC computer project
2+
// sisc testbench
3+
// Sharukh Hasan & Mark Parise
4+
5+
`timescale 1ns/100ps
6+
7+
module sisc_tb;
8+
wire clk;
9+
wire rst_f;
10+
wire [31:0] ir;
11+
12+
sisc(clk, rst_f, ir);
13+
14+
endmodule

0 commit comments

Comments
 (0)