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

Subversion Repositories raptor64

[/] [raptor64/] [trunk/] [rtl/] [verilog/] [Raptor64_regfile.v] - Blame information for rev 48

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 robfinch
`timescale 1ns / 1ps
2
//=============================================================================
3
//        __
4
//   \\__/ o\    (C) 2011,2012  Robert Finch
5
//    \  __ /    All rights reserved.
6
//     \/_//     robfinch<remove>@opencores.org
7
//       ||
8
//  
9
//      Raptor64_regfile.v
10
//  - register file and bypass muxes
11
//  
12
// This source file is free software: you can redistribute it and/or modify 
13
// it under the terms of the GNU Lesser General Public License as published 
14
// by the Free Software Foundation, either version 3 of the License, or     
15
// (at your option) any later version.                                      
16
//                                                                          
17
// This source file is distributed in the hope that it will be useful,      
18
// but WITHOUT ANY WARRANTY; without even the implied warranty of           
19
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            
20
// GNU General Public License for more details.                             
21
//                                                                          
22
// You should have received a copy of the GNU General Public License        
23
// along with this program.  If not, see <http://www.gnu.org/licenses/>.    
24
//                                                                          
25
//
26
//=============================================================================
27
 
28 45 robfinch
module Raptor64_regfile(clk, advanceR, advanceW, wIRvalid, dRa, dRb, dRc, dpc,
29 30 robfinch
        xRt, m1Rt, m2Rt, wRt, tRt, xData, m1Data, m2Data, wData, tData, nxt_a, nxt_b, nxt_c);
30
input clk;
31
input advanceR;
32
input advanceW;
33 45 robfinch
input wIRvalid;
34 30 robfinch
input [8:0] dRa;
35
input [8:0] dRb;
36
input [8:0] dRc;
37
input [63:0] dpc;
38
input [8:0] xRt;
39
input [8:0] m1Rt;
40
input [8:0] m2Rt;
41
input [8:0] wRt;
42
input [8:0] tRt;
43
input [63:0] xData;
44
input [63:0] m1Data;
45
input [63:0] m2Data;
46
input [63:0] wData;
47
input [63:0] tData;
48
output [63:0] nxt_a;
49
output [63:0] nxt_b;
50
output [63:0] nxt_c;
51
 
52
wire [63:0] rfoa, rfob, rfoc;
53
 
54
syncRam512x64_1rw3r u1
55
(
56
        .wrst(1'b0),
57
        .wclk(clk),
58
        .wce(advanceW),
59 45 robfinch
        .we(wIRvalid),
60 30 robfinch
        .wadr(wRt),
61
        .i(wData),
62
        .wo(),
63
 
64
        .rrsta(1'b0),
65
        .rclka(~clk),
66
        .rcea(advanceR),
67
        .radra(dRa),
68
        .roa(rfoa),
69
 
70
        .rrstb(1'b0),
71
        .rclkb(~clk),
72
        .rceb(advanceR),
73
        .radrb(dRb),
74
        .rob(rfob),
75
 
76
        .rrstc(1'b0),
77
        .rclkc(~clk),
78
        .rcec(advanceR),
79
        .radrc(dRc),
80
        .roc(rfoc)
81
);
82
 
83
 
84 48 robfinch
//      casex(dRa)
85
//      9'bxxxx00000:   nxt_a <= 64'd0;
86
//      9'bxxxx11101:   nxt_a <= dpc;
87
//      xRt:    nxt_a <= xData;
88
//      m1Rt:   nxt_a <= m1Data;
89
//      m2Rt:   nxt_a <= m2Data;
90
//      wRt:    nxt_a <= wData;
91
//      tRt:    nxt_a <= tData;
92
//      default:        nxt_a <= rfoa;
93
//      endcase
94 30 robfinch
 
95 48 robfinch
//reg [63:0] nxt_b;
96
//always @(dRb or xData or m1Data or m2Data or wData or tData or rfob or dpc or xRt or m1Rt or m2Rt or wRt or tRt)
97
//      casex(dRb)
98
//      9'bxxxx00000:   nxt_b <= 64'd0;
99
//      9'bxxxx11101:   nxt_b <= dpc;
100
//      xRt:    nxt_b <= xData;
101
//      m1Rt:   nxt_b <= m1Data;
102
//      m2Rt:   nxt_b <= m2Data;
103
//      wRt:    nxt_b <= wData;
104
//      tRt:    nxt_b <= tData;
105
//      default:        nxt_b <= rfob;
106
//      endcase
107
//
108
//reg [63:0] nxt_c;
109
//always @(dRc or xData or m1Data or m2Data or wData or tData or rfoc or dpc or xRt or m1Rt or m2Rt or wRt or tRt)
110
//      casex(dRc)
111
//      9'bxxxx00000:   nxt_c <= 64'd0;
112
//      9'bxxxx11101:   nxt_c <= dpc;
113
//      xRt:    nxt_c <= xData;
114
//      m1Rt:   nxt_c <= m1Data;
115
//      m2Rt:   nxt_c <= m2Data;
116
//      wRt:    nxt_c <= wData;
117
//      tRt:    nxt_c <= tData;
118
//      default:        nxt_c <= rfoc;
119
//      endcase
120 30 robfinch
 
121
 
122
endmodule

powered by: WebSVN 2.1.0

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