-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathINSTR_MEM_tb.v
40 lines (33 loc) · 948 Bytes
/
INSTR_MEM_tb.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
`timescale 1ns / 1ps
////////////////////////////////////////////////////////////////////////////////
// Company: California State University San Bernardino
// Engineer: Bogdan Kravtsov
//
// Create Date: 14:28:09 10/03/2016
// Module Name: INSTR_MEM_tb
// Project Name: MIPS
// Description: Testing MIPS Instruction Memory implementation in verilog.
//
// Dependencies: INSTR_MEM.v
//
////////////////////////////////////////////////////////////////////////////////
module INSTR_MEM_tb;
// Declare inputs.
reg [31:0] addr;
// Declare outputs.
wire [31:0] data;
// Instantiate the EX_MEM module.
INSTR_MEM mem (.addr(addr), .data(data));
initial begin
// Initialize inputs.
addr = 0;
// Increment address ten times to obtain the initialized memory block.
repeat(10) begin
#10;
$display ("Address=%8h\tData=%0h", addr, data);
addr = addr + 1;
end
// Terminate.
$finish;
end
endmodule