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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [rtl/] [verilog/] [dbg_if/] [dbg_register.v] - Blame information for rev 831

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 julius
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  dbg_register.v                                              ////
4
////                                                              ////
5
////                                                              ////
6
////  This file is part of the SoC Debug Interface.               ////
7
////  http://www.opencores.org/projects/DebugInterface/           ////
8
////                                                              ////
9
////  Author(s):                                                  ////
10
////       Igor Mohor (igorm@opencores.org)                       ////
11
////                                                              ////
12
////                                                              ////
13
////  All additional information is avaliable in the README.txt   ////
14
////  file.                                                       ////
15
////                                                              ////
16
//////////////////////////////////////////////////////////////////////
17
////                                                              ////
18
//// Copyright (C) 2000 - 2004 Authors                            ////
19
////                                                              ////
20
//// This source file may be used and distributed without         ////
21
//// restriction provided that this copyright statement is not    ////
22
//// removed from the file and that any derivative work contains  ////
23
//// the original copyright notice and the associated disclaimer. ////
24
////                                                              ////
25
//// This source file is free software; you can redistribute it   ////
26
//// and/or modify it under the terms of the GNU Lesser General   ////
27
//// Public License as published by the Free Software Foundation; ////
28
//// either version 2.1 of the License, or (at your option) any   ////
29
//// later version.                                               ////
30
////                                                              ////
31
//// This source is distributed in the hope that it will be       ////
32
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
33
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
34
//// PURPOSE.  See the GNU Lesser General Public License for more ////
35
//// details.                                                     ////
36
////                                                              ////
37
//// You should have received a copy of the GNU Lesser General    ////
38
//// Public License along with this source; if not, download it   ////
39
//// from http://www.opencores.org/lgpl.shtml                     ////
40
////                                                              ////
41
//////////////////////////////////////////////////////////////////////
42
//
43
// CVS Revision History
44
//
45
// $Log: dbg_register.v,v $
46
// Revision 1.10  2004/03/28 20:27:02  igorm
47
// New release of the debug interface (3rd. release).
48
//
49
// Revision 1.9  2004/01/25 14:04:18  mohor
50
// All flipflops are reset.
51
//
52
// Revision 1.8  2004/01/16 14:53:33  mohor
53
// *** empty log message ***
54
//
55
//
56
//
57
 
58
// synopsys translate_off
59
`include "timescale.v"
60
// synopsys translate_on
61
 
62
module dbg_register (
63
                      data_in,
64
                      data_out,
65
                      write,
66
                      clk,
67
                      reset
68
                    );
69
 
70
 
71
parameter WIDTH = 8; // default parameter of the register width
72
parameter RESET_VALUE = 0;
73
 
74
 
75
input   [WIDTH-1:0] data_in;
76
input               write;
77
input               clk;
78
input               reset;
79
 
80
output  [WIDTH-1:0] data_out;
81
reg     [WIDTH-1:0] data_out;
82
 
83
 
84
 
85
always @ (posedge clk or posedge reset)
86
begin
87
  if(reset)
88 360 julius
    data_out[WIDTH-1:0] <=  RESET_VALUE;
89 6 julius
  else if(write)
90 360 julius
    data_out[WIDTH-1:0] <=  data_in[WIDTH-1:0];
91 6 julius
end
92
 
93
 
94
endmodule   // Register
95
 

powered by: WebSVN 2.1.0

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