Skip to content
This repository was archived by the owner on May 8, 2024. It is now read-only.

Commit 62349f0

Browse files
committed
Closed vivado
1 parent f20757b commit 62349f0

File tree

25 files changed

+4006
-255
lines changed

25 files changed

+4006
-255
lines changed

ARM-Lab/code/division.sv

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ module division;
5151
wire clk;
5252
reg reset;
5353
reg pc_src;
54+
5455
reg [`WORD-1:0] branch_target;
5556
wire [`WORD-1:0] cur_pc;
5657
wire [`INSTR_LEN-1:0] instruction;
@@ -149,12 +150,12 @@ module division;
149150
.alu_result(alu_result),
150151
.zero(zero)
151152
);
152-
153-
153+
154+
154155
// iMemory
155156
wire data_clk;
156157
wire [`WORD-1:0] mem_read_data;
157-
158+
158159
reg [`WORD - 1:0] er_mem_read_data;
159160
reg er_pc_src;
160161

@@ -170,11 +171,11 @@ module division;
170171
.mem_read_data(mem_read_data),
171172
.pc_src(pc_src)
172173
);
173-
174-
174+
175+
175176
// iWriteBack
176177
reg [`WORD:1-0] er_write_data;
177-
178+
178179
iWriteBack myWriteBack(
179180
.mem_to_reg(mem_to_reg),
180181
.read_data(mem_read_data),
@@ -198,7 +199,7 @@ module division;
198199
.a(clk),
199200
.a_delayed(write_clk)
200201
);
201-
202+
202203
delay #(3) clk_delay_data(
203204
.a(clk),
204205
.a_delayed(data_clk)
@@ -220,24 +221,25 @@ module division;
220221
initial
221222
begin
222223

223-
begin_test();
224-
225-
// set reset to 1 to make sure that the PC doesn't increment on the first positive clock edge,
226-
// then set it back to 0 after that first positive clock edge
227-
reset = 1;
228-
#`CYCLE;
229-
reset = 0;
230-
231-
// DIVIDE TEST
232-
$display("Test Case %0d: | DIVIDE 57/8", tc++);
233-
ts = 1;
234-
235-
er_read_data2 = 7;
236-
237-
#335;
238-
verify(ts++, read_data2_string, er_read_data2, $bits(er_read_data2), read_data2, $bits(read_data2), `S_DEC);
239-
240-
final_result();
224+
begin_test();
225+
226+
227+
// set reset to 1 to make sure that the PC doesn't increment on the first positive clock edge,
228+
// then set it back to 0 after that first positive clock edge
229+
reset = 1;
230+
#`CYCLE;
231+
reset = 0;
232+
233+
// DIVIDE TEST
234+
$display("Test Case %0d: | DIVIDE 56/8", tc++);
235+
ts = 1;
236+
237+
er_read_data2 = 7;
238+
239+
#335;
240+
verify(ts++, read_data2_string, er_read_data2, $bits(er_read_data2), read_data2, $bits(read_data2), `S_DEC);
241+
242+
final_result();
241243

242244
$finish;
243245
end

ARM-Project/ARM-Project.sim/sim_1/behav/xsim/compile.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ REM Filename : compile.bat
66
REM Simulator : Xilinx Vivado Simulator
77
REM Description : Script for compiling the simulation design source files
88
REM
9-
REM Generated by Vivado on Tue Apr 23 16:26:26 -0500 2024
9+
REM Generated by Vivado on Tue Apr 23 16:29:42 -0500 2024
1010
REM SW Build 3367213 on Tue Oct 19 02:48:09 MDT 2021
1111
REM
1212
REM IP Build 3369179 on Thu Oct 21 08:25:16 MDT 2021
Binary file not shown.

ARM-Project/ARM-Project.sim/sim_1/behav/xsim/elaborate.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ REM Filename : elaborate.bat
66
REM Simulator : Xilinx Vivado Simulator
77
REM Description : Script for elaborating the compiled design
88
REM
9-
REM Generated by Vivado on Tue Apr 23 16:26:28 -0500 2024
9+
REM Generated by Vivado on Tue Apr 23 16:29:44 -0500 2024
1010
REM SW Build 3367213 on Tue Oct 19 02:48:09 MDT 2021
1111
REM
1212
REM IP Build 3369179 on Thu Oct 21 08:25:16 MDT 2021
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Time resolution is 1 ps
2+
3+
******* BEGIN TEST RESULTS *******
4+
5+
Test Case 1: | DIVIDE 56/8
6+
+++ Step 1: Pass: |read_data2| time = 345 ns | er = 7 | ar = 7 | er_bits = 64 | ar_bits = 64 +++
7+
8+
Pass Count = 1
9+
Fail Count = 0
10+
11+
******* END TEST RESULTS *******
12+
13+
$finish called at time : 345 ns : File "C:/Users/reese_ford1/Documents/GitHub/ARM-Lab/ARM-Lab/code/division.sv" Line 244
Binary file not shown.

ARM-Project/ARM-Project.sim/sim_1/behav/xsim/xsim.dir/division_behav/obj/xsim_1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void sensitize(char *dp)
148148

149149
void simulate(char *dp)
150150
{
151-
iki_register_root_pointers(22, 22552, -5,0,22736, -5,0,22920, -5,0,15872, -5,0,16792, -5,0,15320, -5,0,16240, -5,0,16424, -5,0,16976, -5,0,17160, -5,0,15688, -5,0,15504, -5,0,17344, -5,0,17528, -5,0,13832, -5,0,17712, -5,0,17896, -5,0,16056, -5,0,18080, -5,0,18264, -5,0,16608, -5,0,18448, -5,0) ;
151+
iki_register_root_pointers(22, 22736, -5,0,22552, -5,0,22920, -5,0,16240, -5,0,16976, -5,0,18264, -5,0,17896, -5,0,17528, -5,0,18448, -5,0,16792, -5,0,18080, -5,0,16608, -5,0,16424, -5,0,17344, -5,0,17160, -5,0,17712, -5,0,15504, -5,0,15688, -5,0,15320, -5,0,15872, -5,0,16056, -5,0,13832, -5,0) ;
152152
iki_schedule_processes_at_time_zero(dp, "xsim.dir/division_behav/xsim.reloc");
153153
// Initialize Verilog nets in mixed simulation, for the cases when the value at time 0 should be propagated from the mixed language Vhdl net
154154
iki_execute_processes();
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)