OpenCores
URL https://opencores.org/ocsvn/sparc64soc/sparc64soc/trunk

Subversion Repositories sparc64soc

[/] [sparc64soc/] [trunk/] [T1-common/] [srams/] [regfile_1w_4r.v] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 dmitryr
module regfile_1w_4r(
2
   input clk,
3
 
4
   input  [71:0] din,
5
   input  [ 7:0] wraddr,
6
   input         wren,
7
   input  [ 7:0] rdaddr0,
8
   input  [ 7:0] rdaddr1,
9
   input  [ 7:0] rdaddr2,
10
   input  [ 7:0] rdaddr3,
11
   input         rd0,
12
   input         rd1,
13
   input         rd2,
14
   input         rd3,
15
 
16
   output [71:0] dout0,
17
   output [71:0] dout1,
18
   output [71:0] dout2,
19
   output [71:0] dout3
20
);
21
 
22
reg [7:0] rdaddr0_d;
23
reg [7:0] rdaddr1_d;
24
reg [7:0] rdaddr2_d;
25
reg [7:0] rdaddr3_d;
26
reg       rd0_d;
27
reg       rd1_d;
28
reg       rd2_d;
29
reg       rd3_d;
30
 
31
always @(posedge clk)
32
   begin
33
      rdaddr0_d<=rdaddr0;
34
      rdaddr1_d<=rdaddr1;
35
      rdaddr2_d<=rdaddr2;
36
      rdaddr3_d<=rdaddr3;
37
      rd0_d<=rd0;
38
      rd1_d<=rd1;
39
      rd2_d<=rd2;
40
      rd3_d<=rd3;
41
   end
42
 
43
regfile1 regfile_inst0(
44
   .wrclock(clk),
45
   .rdclock(~clk),
46
 
47
   .data(din),
48
   .rdaddress(rdaddr0_d),
49
   .rden(rd0_d),
50
   .wraddress(wraddr),
51
   .wren(wren),
52
   .q(dout0)
53
);
54
 
55
regfile1 regfile_inst1(
56
   .wrclock(clk),
57
   .rdclock(~clk),
58
 
59
   .data(din),
60
   .rdaddress(rdaddr1_d),
61
   .rden(rd1_d),
62
   .wraddress(wraddr),
63
   .wren(wren),
64
   .q(dout1)
65
);
66
 
67
regfile1 regfile_inst2(
68
   .wrclock(clk),
69
   .rdclock(~clk),
70
 
71
   .data(din),
72
   .rdaddress(rdaddr2_d),
73
   .rden(rd2_d),
74
   .wraddress(wraddr),
75
   .wren(wren),
76
   .q(dout2)
77
);
78
 
79
regfile1 regfile_inst3(
80
   .wrclock(clk),
81
   .rdclock(~clk),
82
 
83
   .data(din),
84
   .rdaddress(rdaddr3_d),
85
   .rden(rd3_d),
86
   .wraddress(wraddr),
87
   .wren(wren),
88
   .q(dout3)
89
);
90
 
91
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.