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

Subversion Repositories or1k_soc_on_altera_embedded_dev_kit

[/] [or1k_soc_on_altera_embedded_dev_kit/] [trunk/] [soc/] [rtl/] [adv_debug_sys/] [Hardware/] [jtag/] [cells/] [rtl/] [verilog/] [ControlCell.v] - Blame information for rev 21

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 21 xianfeng
/**********************************************************************************
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
*         I/O Control Cell:                                                             *
25
*                                                                                 *
26
*         OutputControl: Output Control from on-chip logic                              *
27
*         FromPreviousBSCell: Value from previous boundary scan cell                    *
28
*         ToNextBSCell: Value for next boundary scan cell                               *
29
*         CaptureDR, ShiftDR, UpdateDR: TAP states                                      *
30
*         extest: Instruction Register Command                                          *
31
*         TCK: Test Clock                                                               *
32
*                                                                                 *
33
*         Output Enable can be generated by running CaptureDR-UpdateDR sequence or      *
34
*         shifting data for the exact number of time                                    *
35
*                                                                                 *
36
**********************************************************************************/
37
 
38
// This is not a top module 
39
module ControlCell( OutputControl, FromPreviousBSCell, CaptureDR, ShiftDR, UpdateDR, extest, TCK, ToNextBSCell, ToOutputEnable);
40
input  OutputControl;
41
input  FromPreviousBSCell;
42
input  CaptureDR;
43
input  ShiftDR;
44
input  UpdateDR;
45
input  extest;
46
input  TCK;
47
 
48
reg Latch;
49
 
50
output ToNextBSCell;
51
output ToOutputEnable;
52
 
53
reg    ToNextBSCell;
54
reg ShiftedControl;
55
 
56
wire SelectedInput = CaptureDR? OutputControl : FromPreviousBSCell;
57
 
58
always @ (posedge TCK)
59
begin
60
        if(CaptureDR | ShiftDR)
61
                Latch<=SelectedInput;
62
end
63
 
64
always @ (negedge TCK)
65
begin
66
        ToNextBSCell<=Latch;
67
end
68
 
69
always @ (negedge TCK)
70
begin
71
        if(UpdateDR)
72
                ShiftedControl<=ToNextBSCell;
73
end
74
 
75
assign ToOutputEnable = extest? ShiftedControl : OutputControl;
76
 
77
endmodule       // ControlCell

powered by: WebSVN 2.1.0

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