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

Subversion Repositories dbg_interface

[/] [dbg_interface/] [trunk/] [rtl/] [verilog/] [dbg_register.v] - Blame information for rev 158

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 100 mohor
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  dbg_register.v                                              ////
4
////                                                              ////
5
////                                                              ////
6 139 igorm
////  This file is part of the SoC Debug Interface.               ////
7 100 mohor
////  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: not supported by cvs2svn $
46 139 igorm
// Revision 1.9  2004/01/25 14:04:18  mohor
47
// All flipflops are reset.
48
//
49 123 mohor
// Revision 1.8  2004/01/16 14:53:33  mohor
50
// *** empty log message ***
51 100 mohor
//
52
//
53 123 mohor
//
54 100 mohor
 
55
// synopsys translate_off
56
`include "timescale.v"
57
// synopsys translate_on
58
 
59
module dbg_register (
60
                      data_in,
61
                      data_out,
62
                      write,
63
                      clk,
64
                      reset
65
                    );
66
 
67
 
68
parameter WIDTH = 8; // default parameter of the register width
69
parameter RESET_VALUE = 0;
70
 
71
 
72
input   [WIDTH-1:0] data_in;
73
input               write;
74
input               clk;
75
input               reset;
76
 
77
output  [WIDTH-1:0] data_out;
78
reg     [WIDTH-1:0] data_out;
79
 
80
 
81
 
82
always @ (posedge clk or posedge reset)
83
begin
84
  if(reset)
85
    data_out[WIDTH-1:0] <= #1 RESET_VALUE;
86
  else if(write)
87
    data_out[WIDTH-1:0] <= #1 data_in[WIDTH-1:0];
88
end
89
 
90
 
91
endmodule   // Register
92
 

powered by: WebSVN 2.1.0

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