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

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [Altera/] [ip.hwp.cpu/] [nios_ii_sram/] [1.0/] [hdl/] [cpu_0_jtag_debug_module_sysclk.v] - Blame information for rev 147

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 147 lanttu
//Legal Notice: (C)2012 Altera Corporation. All rights reserved.  Your
2
//use of Altera Corporation's design tools, logic functions and other
3
//software and tools, and its AMPP partner logic functions, and any
4
//output files any of the foregoing (including device programming or
5
//simulation files), and any associated documentation or information are
6
//expressly subject to the terms and conditions of the Altera Program
7
//License Subscription Agreement or other applicable license agreement,
8
//including, without limitation, that your use is for the sole purpose
9
//of programming logic devices manufactured by Altera and sold by Altera
10
//or its authorized distributors.  Please refer to the applicable
11
//agreement for further details.
12
 
13
// synthesis translate_off
14
`timescale 1ns / 1ps
15
// synthesis translate_on
16
 
17
// turn off superfluous verilog processor warnings 
18
// altera message_level Level1 
19
// altera message_off 10034 10035 10036 10037 10230 10240 10030 
20
 
21
module cpu_0_jtag_debug_module_sysclk (
22
                                        // inputs:
23
                                         clk,
24
                                         ir_in,
25
                                         sr,
26
                                         vs_udr,
27
                                         vs_uir,
28
 
29
                                        // outputs:
30
                                         jdo,
31
                                         take_action_break_a,
32
                                         take_action_break_b,
33
                                         take_action_break_c,
34
                                         take_action_ocimem_a,
35
                                         take_action_ocimem_b,
36
                                         take_action_tracectrl,
37
                                         take_action_tracemem_a,
38
                                         take_action_tracemem_b,
39
                                         take_no_action_break_a,
40
                                         take_no_action_break_b,
41
                                         take_no_action_break_c,
42
                                         take_no_action_ocimem_a,
43
                                         take_no_action_tracemem_a
44
                                      )
45
;
46
 
47
  output  [ 37: 0] jdo;
48
  output           take_action_break_a;
49
  output           take_action_break_b;
50
  output           take_action_break_c;
51
  output           take_action_ocimem_a;
52
  output           take_action_ocimem_b;
53
  output           take_action_tracectrl;
54
  output           take_action_tracemem_a;
55
  output           take_action_tracemem_b;
56
  output           take_no_action_break_a;
57
  output           take_no_action_break_b;
58
  output           take_no_action_break_c;
59
  output           take_no_action_ocimem_a;
60
  output           take_no_action_tracemem_a;
61
  input            clk;
62
  input   [  1: 0] ir_in;
63
  input   [ 37: 0] sr;
64
  input            vs_udr;
65
  input            vs_uir;
66
 
67
  reg              enable_action_strobe /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103\""  */;
68
  reg     [  1: 0] ir /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,R101\""  */;
69
  reg     [ 37: 0] jdo /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,R101\""  */;
70
  reg              jxuir /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103\""  */;
71
  reg              sync2_udr /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103\""  */;
72
  reg              sync2_uir /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103\""  */;
73
  wire             sync_udr;
74
  wire             sync_uir;
75
  wire             take_action_break_a;
76
  wire             take_action_break_b;
77
  wire             take_action_break_c;
78
  wire             take_action_ocimem_a;
79
  wire             take_action_ocimem_b;
80
  wire             take_action_tracectrl;
81
  wire             take_action_tracemem_a;
82
  wire             take_action_tracemem_b;
83
  wire             take_no_action_break_a;
84
  wire             take_no_action_break_b;
85
  wire             take_no_action_break_c;
86
  wire             take_no_action_ocimem_a;
87
  wire             take_no_action_tracemem_a;
88
  wire             unxunused_resetxx2;
89
  wire             unxunused_resetxx3;
90
  reg              update_jdo_strobe /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103\""  */;
91
  assign unxunused_resetxx2 = 1'b1;
92
  altera_std_synchronizer the_altera_std_synchronizer2
93
    (
94
      .clk (clk),
95
      .din (vs_udr),
96
      .dout (sync_udr),
97
      .reset_n (unxunused_resetxx2)
98
    );
99
 
100
  defparam the_altera_std_synchronizer2.depth = 2;
101
 
102
  assign unxunused_resetxx3 = 1'b1;
103
  altera_std_synchronizer the_altera_std_synchronizer3
104
    (
105
      .clk (clk),
106
      .din (vs_uir),
107
      .dout (sync_uir),
108
      .reset_n (unxunused_resetxx3)
109
    );
110
 
111
  defparam the_altera_std_synchronizer3.depth = 2;
112
 
113
  always @(posedge clk)
114
    begin
115
      sync2_udr <= sync_udr;
116
      update_jdo_strobe <= sync_udr & ~sync2_udr;
117
      enable_action_strobe <= update_jdo_strobe;
118
      sync2_uir <= sync_uir;
119
      jxuir <= sync_uir & ~sync2_uir;
120
    end
121
 
122
 
123
  assign take_action_ocimem_a = enable_action_strobe && (ir == 2'b00) &&
124
 
125
    ~jdo[35] && jdo[34];
126
 
127
  assign take_no_action_ocimem_a = enable_action_strobe && (ir == 2'b00) &&
128
 
129
    ~jdo[35] && ~jdo[34];
130
 
131
  assign take_action_ocimem_b = enable_action_strobe && (ir == 2'b00) &&
132
 
133
    jdo[35];
134
 
135
  assign take_action_tracemem_a = enable_action_strobe && (ir == 2'b01) &&
136
 
137
    ~jdo[37] &&
138
 
139
    jdo[36];
140
 
141
  assign take_no_action_tracemem_a = enable_action_strobe && (ir == 2'b01) &&
142
 
143
    ~jdo[37] &&
144
 
145
    ~jdo[36];
146
 
147
  assign take_action_tracemem_b = enable_action_strobe && (ir == 2'b01) &&
148
 
149
    jdo[37];
150
 
151
  assign take_action_break_a = enable_action_strobe && (ir == 2'b10) &&
152
 
153
    ~jdo[36] &&
154
 
155
    jdo[37];
156
 
157
  assign take_no_action_break_a = enable_action_strobe && (ir == 2'b10) &&
158
 
159
    ~jdo[36] &&
160
 
161
    ~jdo[37];
162
 
163
  assign take_action_break_b = enable_action_strobe && (ir == 2'b10) &&
164
 
165
    jdo[36] && ~jdo[35] &&
166
 
167
    jdo[37];
168
 
169
  assign take_no_action_break_b = enable_action_strobe && (ir == 2'b10) &&
170
 
171
    jdo[36] && ~jdo[35] &&
172
 
173
    ~jdo[37];
174
 
175
  assign take_action_break_c = enable_action_strobe && (ir == 2'b10) &&
176
 
177
    jdo[36] &&  jdo[35] &&
178
 
179
    jdo[37];
180
 
181
  assign take_no_action_break_c = enable_action_strobe && (ir == 2'b10) &&
182
 
183
    jdo[36] &&  jdo[35] &&
184
 
185
    ~jdo[37];
186
 
187
  assign take_action_tracectrl = enable_action_strobe && (ir == 2'b11) &&
188
 
189
    jdo[15];
190
 
191
  always @(posedge clk)
192
    begin
193
      if (jxuir)
194
          ir <= ir_in;
195
      if (update_jdo_strobe)
196
          jdo <= sr;
197
    end
198
 
199
 
200
 
201
endmodule
202
 

powered by: WebSVN 2.1.0

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