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

Subversion Repositories edge

[/] [edge/] [trunk/] [HW/] [Verilog/] [if_id_pipereg.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 heshamelma
//////////////////////////////////////////////////////////////////
2
//                                                              //
3
//  IF/ID pipeline register                                    //
4
//                                                              //
5
//  This file is part of the Edge project                       //
6
//  http://www.opencores.org/project,edge                       //
7
//                                                              //
8
//  Description                                                 //
9
//  Pipeline register lies between fetch and decode stages      //
10
//                                                              //
11
//  Author(s):                                                  //
12
//      - Hesham AL-Matary, heshamelmatary@gmail.com            //
13
//                                                              //
14
//////////////////////////////////////////////////////////////////
15
//                                                              //
16
// Copyright (C) 2014 Authors and OPENCORES.ORG                 //
17
//                                                              //
18
// This source file may be used and distributed without         //
19
// restriction provided that this copyright statement is not    //
20
// removed from the file and that any derivative work contains  //
21
// the original copyright notice and the associated disclaimer. //
22
//                                                              //
23
// This source file is free software; you can redistribute it   //
24
// and/or modify it under the terms of the GNU Lesser General   //
25
// Public License as published by the Free Software Foundation; //
26
// either version 2.1 of the License, or (at your option) any   //
27
// later version.                                               //
28
//                                                              //
29
// This source is distributed in the hope that it will be       //
30
// useful, but WITHOUT ANY WARRANTY; without even the implied   //
31
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
32
// PURPOSE.  See the GNU Lesser General Public License for more //
33
// details.                                                     //
34
//                                                              //
35
// You should have received a copy of the GNU Lesser General    //
36
// Public License along with this source; if not, download it   //
37
// from http://www.opencores.org/lgpl.shtml                     //
38
//                                                              //
39
//////////////////////////////////////////////////////////////////
40
 
41
module if_id_pipereg
42
#
43
(
44
  parameter N=32, /* most registers sizes */
45
  parameter M=5
46
) /* regfile address */
47
(
48
  input clk,
49
  input reset,
50
  input en,
51
  input [N-1:0] IR_in,
52
  input [N-1:0] PCplus4_in,
53
  input [N-1:0] PC_in,
54
  output [N-1:0] IR_out,
55
 
56
  output [N-1:0] PC_out,
57
  output [N-1:0] PCplus4_out
58
);
59
 
60
register IR
61
(
62
  .clk(clk), .reset(reset), .en(en),
63
  .d(IR_in),
64
  .q(IR_out)
65
);
66
 
67
register PC_4
68
(
69
  .clk(clk), .reset(reset), .en(en),
70
  .d(PCplus4_in),
71
  .q(PCplus4_out)
72
);
73
 
74
register PC
75
(
76
  .clk(clk), .reset(reset), .en(en),
77
  .d(PC_in),
78
  .q(PC_out)
79
);
80
 
81
endmodule

powered by: WebSVN 2.1.0

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