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

Subversion Repositories dbg_interface

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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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