Skip to content

Commit bb6e370

Browse files
Comment out the propagated IR/PC wires
These should be handled by set_dont_touch in SDC but that is what we are testing here. The theory is that all of the signals should show the **exact** same results.
1 parent 9966cef commit bb6e370

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

CPU.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// module CPU(output [31:0] data_out, output[15:0] address, output we, input[31:0] data_in, input reset, clock);
2-
module CPU(output reg [15:0] PC, output reg [31:0] IR, AC, output [31:0] data_out, output[15:0] address, output we, input[31:0] data_in, input reset, clock);
2+
module CPU(/*output reg [15:0] PC, output reg [31:0] IR, */output reg [31:0] AC, output [31:0] data_out, output[15:0] address, output we, input[31:0] data_in, input reset, clock);
33
// Define 16-bit program counter (PC), 32-bit instruction register (IR) and 32-bit ACcumulator (AC)
4-
// reg [15:0] PC;
5-
// reg [31:0] IR;
4+
reg [15:0] PC;
5+
reg [31:0] IR;
66
// reg [31:0] AC;
77

88
// 1'b0 = Fetching next instruction

ROM.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ module ROM(output reg [31:0] data_out, input [4:0] address, input chip_select);
5454
5'h12: data_out <= 32'h4000_00f0; // LI 00f0
5555
5'h13: data_out <= 32'h9000_005f; // AND 005f
5656
// Result (AC) should be 00000
57-
5857

59-
5'h14: data_out <= 32'h5000_0016; // LD 0017
58+
5'h14: data_out <= 32'h5000_0017; // LD 0017
6059
5'h15: data_out <= 32'h5000_005f; // LD 005f
6160
5'h16: data_out <= 32'h8000_0000; // BR 0
6261

SCIC.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// module SCIC(output [3:0] LEDs, input [3:0] switches, input reset, clock);
2-
module SCIC(output [15:0] PC, output [31:0] IR, AC, output [3:0] LEDs, input [3:0] switches, input reset, clock);
2+
module SCIC(/*output [15:0] PC, output [31:0] IR, */output [31:0] AC, output [3:0] LEDs, input [3:0] switches, input reset, clock);
33
wire [15:0] address;
44
wire [31:0] data_toCPU;
55
wire [31:0] data_fromCPU;
@@ -8,5 +8,5 @@ module SCIC(output [15:0] PC, output [31:0] IR, AC, output [3:0] LEDs, input [3:
88
// Note: reset is active HIGH
99
memory_controller memory_controller_inst(data_toCPU, LEDs, data_fromCPU, address, switches, we, clock);
1010
// CPU cpu_inst(data_fromCPU, address, we, data_toCPU, reset, clock);
11-
CPU cpu_inst(PC, IR, AC, data_fromCPU, address, we, data_toCPU, reset, clock);
11+
CPU cpu_inst(/*PC, IR, */AC, data_fromCPU, address, we, data_toCPU, reset, clock);
1212
endmodule

SCIC_tb.v

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
module SCIC_tb();
44
wire [3:0] LEDs;
5-
wire [15:0] PC;
6-
wire [31:0] IR, AC;
5+
// wire [15:0] PC;
6+
// wire [31:0] IR, AC;
7+
wire [31:0] AC;
78

89
reg reset, clock;
910
reg [3:0] switches;
1011

1112
// UUT = Unit Under Test
1213
// SCIC UUT(LEDs, switches, reset, clock);
13-
SCIC UUT(PC, IR, AC, LEDs, switches, reset, clock);
14+
SCIC UUT(/*PC, IR, */AC, LEDs, switches, reset, clock);
1415

1516
initial begin
1617
reset <= 1'b1;

0 commit comments

Comments
 (0)