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

Subversion Repositories or1k

[/] [or1k/] [tags/] [first/] [mp3/] [rtl/] [verilog/] [dbg_interface/] [dbg_register.v] - Blame information for rev 1780

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

Line No. Rev Author Line
1 266 lampret
//////////////////////////////////////////////////////////////////////
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
// Revision 1.1.1.1  2001/10/06 10:19:09  igorm
49
// no message
50
//
51
// Revision 1.1.1.1  2001/09/13 13:49:19  mohor
52
// Initial official release.
53
//
54
//
55
//
56
//
57
//
58
 
59
`include "dbg_timescale.v"
60
 
61
module dbg_register(DataIn, DataOut, Write, Clk, Reset, Default);
62
 
63
parameter WIDTH = 8; // default parameter of the register width
64
 
65
input [WIDTH-1:0] DataIn;
66
 
67
input Write;
68
input Clk;
69
input Reset;
70
input [WIDTH-1:0] Default;
71
 
72
output [WIDTH-1:0] DataOut;
73
reg    [WIDTH-1:0] DataOut;
74
 
75
//always @ (posedge Clk or posedge Reset)
76
always @ (posedge Clk)
77
begin
78
  if(Reset)
79
    DataOut[WIDTH-1:0]<=#1 Default;
80
  else
81
    begin
82
      if(Write)                         // write
83
        DataOut[WIDTH-1:0]<=#1 DataIn[WIDTH-1:0];
84
    end
85
end
86
 
87
 
88
endmodule   // Register
89
 

powered by: WebSVN 2.1.0

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