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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [altera_de0_nano_soc/] [doc/] [Terasic/] [DE0_NANO_SOC/] [Demonstrations/] [FPGA/] [DE0_NANO_SOC_ADC/] [DE0_NANO_SOC_QSYS/] [synthesis/] [submodules/] [DE0_NANO_SOC_QSYS_nios2_qsys_jtag_debug_module_sysclk.v] - Blame information for rev 221

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 221 olivier.gi
//Legal Notice: (C)2014 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 DE0_NANO_SOC_QSYS_nios2_qsys_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_resetxx3;
89
  wire             unxunused_resetxx4;
90
  reg              update_jdo_strobe /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103\""  */;
91
  assign unxunused_resetxx3 = 1'b1;
92
  altera_std_synchronizer the_altera_std_synchronizer3
93
    (
94
      .clk (clk),
95
      .din (vs_udr),
96
      .dout (sync_udr),
97
      .reset_n (unxunused_resetxx3)
98
    );
99
 
100
  defparam the_altera_std_synchronizer3.depth = 2;
101
 
102
  assign unxunused_resetxx4 = 1'b1;
103
  altera_std_synchronizer the_altera_std_synchronizer4
104
    (
105
      .clk (clk),
106
      .din (vs_uir),
107
      .dout (sync_uir),
108
      .reset_n (unxunused_resetxx4)
109
    );
110
 
111
  defparam the_altera_std_synchronizer4.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
    ~jdo[35] && jdo[34];
125
 
126
  assign take_no_action_ocimem_a = enable_action_strobe && (ir == 2'b00) &&
127
    ~jdo[35] && ~jdo[34];
128
 
129
  assign take_action_ocimem_b = enable_action_strobe && (ir == 2'b00) &&
130
    jdo[35];
131
 
132
  assign take_action_tracemem_a = enable_action_strobe && (ir == 2'b01) &&
133
    ~jdo[37] &&
134
    jdo[36];
135
 
136
  assign take_no_action_tracemem_a = enable_action_strobe && (ir == 2'b01) &&
137
    ~jdo[37] &&
138
    ~jdo[36];
139
 
140
  assign take_action_tracemem_b = enable_action_strobe && (ir == 2'b01) &&
141
    jdo[37];
142
 
143
  assign take_action_break_a = enable_action_strobe && (ir == 2'b10) &&
144
    ~jdo[36] &&
145
    jdo[37];
146
 
147
  assign take_no_action_break_a = enable_action_strobe && (ir == 2'b10) &&
148
    ~jdo[36] &&
149
    ~jdo[37];
150
 
151
  assign take_action_break_b = enable_action_strobe && (ir == 2'b10) &&
152
    jdo[36] && ~jdo[35] &&
153
    jdo[37];
154
 
155
  assign take_no_action_break_b = enable_action_strobe && (ir == 2'b10) &&
156
    jdo[36] && ~jdo[35] &&
157
    ~jdo[37];
158
 
159
  assign take_action_break_c = enable_action_strobe && (ir == 2'b10) &&
160
    jdo[36] &&  jdo[35] &&
161
    jdo[37];
162
 
163
  assign take_no_action_break_c = enable_action_strobe && (ir == 2'b10) &&
164
    jdo[36] &&  jdo[35] &&
165
    ~jdo[37];
166
 
167
  assign take_action_tracectrl = enable_action_strobe && (ir == 2'b11) &&
168
    jdo[15];
169
 
170
  always @(posedge clk)
171
    begin
172
      if (jxuir)
173
          ir <= ir_in;
174
      if (update_jdo_strobe)
175
          jdo <= sr;
176
    end
177
 
178
 
179
 
180
endmodule
181
 

powered by: WebSVN 2.1.0

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