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

Subversion Repositories dbg_interface

[/] [dbg_interface/] [tags/] [sdram_test_working/] [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 46 mohor
// Revision 1.4  2002/04/22 12:54:11  mohor
49
// Signal names changed to lower case.
50
//
51 44 mohor
// Revision 1.3  2001/11/26 10:47:09  mohor
52
// Crc generation is different for read or write commands. Small synthesys fixes.
53
//
54 20 mohor
// Revision 1.2  2001/10/19 11:40:02  mohor
55
// dbg_timescale.v changed to timescale.v This is done for the simulation of
56
// few different cores in a single project.
57
//
58 17 mohor
// Revision 1.1.1.1  2001/09/13 13:49:19  mohor
59
// Initial official release.
60 2 mohor
//
61
//
62
//
63
//
64 17 mohor
//
65 2 mohor
 
66 20 mohor
// synopsys translate_off
67 17 mohor
`include "timescale.v"
68 20 mohor
// synopsys translate_on
69 2 mohor
 
70 44 mohor
module dbg_register(data_in, data_out, write, clk, reset, defaulty);
71 2 mohor
 
72
parameter WIDTH = 8; // default parameter of the register width
73
 
74 44 mohor
input [WIDTH-1:0] data_in;
75 2 mohor
 
76 44 mohor
input write;
77
input clk;
78
input reset;
79
input [WIDTH-1:0] defaulty;
80 2 mohor
 
81 44 mohor
output [WIDTH-1:0] data_out;
82
reg    [WIDTH-1:0] data_out;
83 2 mohor
 
84 46 mohor
always @ (posedge clk or posedge reset)
85
//always @ (posedge clk)
86 2 mohor
begin
87 44 mohor
  if(reset)
88
    data_out[WIDTH-1:0]<=#1 defaulty;
89 2 mohor
  else
90
    begin
91 44 mohor
      if(write)                         // write
92
        data_out[WIDTH-1:0]<=#1 data_in[WIDTH-1:0];
93 2 mohor
    end
94
end
95
 
96
 
97
endmodule   // Register
98
 

powered by: WebSVN 2.1.0

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