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

Subversion Repositories socgen

[/] [socgen/] [trunk/] [common/] [opencores.org/] [cde/] [ip/] [jtag/] [rtl/] [verilog/] [jtag_rpc_in_reg.v] - Blame information for rev 131

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 131 jt_eaton
/**********************************************************************/
2
/*                                                                    */
3
/*                                                                    */
4
/*   Copyright (c) 2012 Ouabache Design Works                         */
5
/*                                                                    */
6
/*          All Rights Reserved Worldwide                             */
7
/*                                                                    */
8
/*   Licensed under the Apache License,Version2.0 (the'License');     */
9
/*   you may not use this file except in compliance with the License. */
10
/*   You may obtain a copy of the License at                          */
11
/*                                                                    */
12
/*       http://www.apache.org/licenses/LICENSE-2.0                   */
13
/*                                                                    */
14
/*   Unless required by applicable law or agreed to in                */
15
/*   writing, software distributed under the License is               */
16
/*   distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES              */
17
/*   OR CONDITIONS OF ANY KIND, either express or implied.            */
18
/*   See the License for the specific language governing              */
19
/*   permissions and limitations under the License.                   */
20
/**********************************************************************/
21
module
22
cde_jtag_rpc_in_reg
23
#(parameter BITS        = 16,   // number of bits in the register (2 or more)
24
  parameter RESET_VALUE = 'h0   // reset value of register
25
  )
26
 
27
(
28
 
29
 
30
input  wire   clk,              // clock
31
input  wire   reset,            // async reset
32
input  wire   tdi,              // scan-in of jtag_register
33
input  wire   select,           // '1' when jtag accessing this register 
34
output wire   tdo,              // scan-out of jtag register
35
input  wire   capture_dr,
36
input  wire   shift_dr,
37
input  wire  [BITS-1:0] capture_value   // value to latch on a capture_dr
38
 
39
 
40
 
41
);
42
 
43
 
44
 
45
 
46
 
47
// shift  buffer and shadow
48
reg [BITS-1:0]  buffer;
49
 
50
always @(posedge clk or posedge reset)
51
  if (reset)                            buffer <= RESET_VALUE;
52
  else
53
  if (select && capture_dr)             buffer <= capture_value;
54
  else
55
  if (select && shift_dr)               buffer <= { tdi, buffer[BITS-1:1] };
56
  else                                  buffer <= buffer;
57
 
58
 
59
 
60
 
61
 assign tdo = buffer[0];
62
 
63
 
64
 
65
endmodule

powered by: WebSVN 2.1.0

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