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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [rtl/] [verilog/] [jtag/] [cells/] [rtl/] [verilog/] [InputCell.v] - Blame information for rev 1327

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

Line No. Rev Author Line
1 1327 jcastillo
/**********************************************************************************
2
*                                                                                 *
3
*  This verilog file is a part of the Boundary Scan Implementation and comes in   *
4
*  a pack with several other files. It is fully IEEE 1149.1 compliant.            *
5
*  For details check www.opencores.org (pdf files, bsdl file, etc.)               *
6
*                                                                                 *
7
*  Copyright (C) 2000 Igor Mohor (igorm@opencores.org) and OPENCORES.ORG          *
8
*                                                                                 *
9
*  This program is free software; you can redistribute it and/or modify           *
10
*  it under the terms of the GNU General Public License as published by           *
11
*  the Free Software Foundation; either version 2 of the License, or              *
12
*  (at your option) any later version.                                            *
13
*                                                                                 *
14
*  See the file COPYING for the full details of the license.                      *
15
*                                                                                 *
16
*  OPENCORES.ORG is looking for new open source IP cores and developers that      *
17
*  would like to help in our mission.                                             *
18
*                                                                                 *
19
**********************************************************************************/
20
 
21
 
22
 
23
/**********************************************************************************
24
*                                                                                 *
25
*         Input Cell:                                                                   *
26
*                                                                                 *
27
*         InputPin: Value that comes from on-chip logic and goes to pin                 *
28
*         FromPreviousBSCell: Value from previous boundary scan cell                    *
29
*         ToNextBSCell: Value for next boundary scan cell                               *
30
*         CaptureDR, ShiftDR: TAP states                                                *
31
*         TCK: Test Clock                                                               *
32
*                                                                                 *
33
**********************************************************************************/
34
 
35
// This is not a top module 
36
module InputCell( InputPin, FromPreviousBSCell, CaptureDR, ShiftDR, TCK, ToNextBSCell);
37
input  InputPin;
38
input  FromPreviousBSCell;
39
input  CaptureDR;
40
input  ShiftDR;
41
input  TCK;
42
 
43
reg Latch;
44
 
45
output ToNextBSCell;
46
reg    ToNextBSCell;
47
 
48
wire SelectedInput = CaptureDR? InputPin : FromPreviousBSCell;
49
 
50
always @ (posedge TCK)
51
begin
52
        if(CaptureDR | ShiftDR)
53
                Latch<=SelectedInput;
54
end
55
 
56
always @ (negedge TCK)
57
begin
58
        ToNextBSCell<=Latch;
59
end
60
 
61
 
62
endmodule       // InputCell

powered by: WebSVN 2.1.0

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