-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathData_RAM.v
43 lines (37 loc) · 867 Bytes
/
Data_RAM.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
41
42
43
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 2015/07/09 09:08:31
// Design Name:
// Module Name: Data_RAM
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module Data_RAM(
input clk,
input en_A,
input wr_A,
input [4:0] adrs_A,
input [7:0] data_in,
input [4:0] adrs_B,
output [7:0] data_out
);
reg [7:0] data_ram [31:7];
always @(posedge clk) begin
if (en_A)
if (wr_A)
data_ram[adrs_A] <= data_in;
end
assign data_out = data_ram[adrs_B];
endmodule