-
Notifications
You must be signed in to change notification settings - Fork 6
/
sw_pe_array_sw_extend_eh_arr.v
85 lines (64 loc) · 1.54 KB
/
sw_pe_array_sw_extend_eh_arr.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// ==============================================================
// File generated by Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC
// Version: 2014.4
// Copyright (C) 2014 Xilinx Inc. All rights reserved.
//
// ==============================================================
`timescale 1 ns / 1 ps
module sw_pe_array_sw_extend_eh_arr_ram (clk, addr0, q0, addr1, d1, we1);
parameter DWIDTH = 16;
parameter AWIDTH = 8;
parameter MEM_SIZE = 256;
input[AWIDTH-1:0] addr0;
output reg[DWIDTH-1:0] q0;
input[AWIDTH-1:0] addr1;
input[DWIDTH-1:0] d1;
input we1;
input clk;
(* `GRAM_STYLE = `GRAM_BLCK *)
reg [DWIDTH-1:0] ram[MEM_SIZE-1:0];
always @(posedge clk)
begin
q0 <= ram[addr0];
end
always @(posedge clk)
begin
if (we1)
begin
ram[addr1] <= d1;
end
end
endmodule
`timescale 1 ns / 1 ps
module sw_pe_array_sw_extend_eh_arr(
reset,
clk,
address0,
ce0,
q0,
address1,
ce1,
we1,
d1,
q1);
parameter DataWidth = 32'd16;
parameter AddressRange = 32'd256;
parameter AddressWidth = 32'd8;
input reset;
input clk;
input[AddressWidth - 1:0] address0;
input ce0;
output[DataWidth - 1:0] q0;
input[AddressWidth - 1:0] address1;
input ce1;
input we1;
input[DataWidth - 1:0] d1;
output[DataWidth - 1:0] q1;
sw_pe_array_sw_extend_eh_arr_ram sw_pe_array_sw_extend_eh_arr_ram_U(
.clk( clk ),
.addr0( address0 ),
.q0( q0 ),
.addr1( address1 ),
.d1( d1 ),
.we1( we1 ));
endmodule