OpenCores
URL https://opencores.org/ocsvn/sdhc-sc-core/sdhc-sc-core/trunk

Subversion Repositories sdhc-sc-core

[/] [sdhc-sc-core/] [trunk/] [libaltera_mf/] [src/] [altera_mf_components.vhd] - Blame information for rev 185

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 123 rkastl
-- Copyright (C) 1991-2010 Altera Corporation
2
-- Your use of Altera Corporation's design tools, logic functions 
3
-- and other software and tools, and its AMPP partner logic 
4
-- functions, and any output files from any of the foregoing 
5
-- (including device programming or simulation files), and any 
6
-- associated documentation or information are expressly subject 
7
-- to the terms and conditions of the Altera Program License 
8
-- Subscription Agreement, Altera MegaCore Function License 
9
-- Agreement, or other applicable license agreement, including, 
10
-- without limitation, that your use is for the sole purpose of 
11
-- programming logic devices manufactured by Altera and sold by 
12
-- Altera or its authorized distributors.  Please refer to the 
13
-- applicable agreement for further details.
14
-- Quartus II 9.1 Build 350 10/07/2009
15
----------------------------------------------------------------------------
16
-- ALtera Megafunction Component Declaration File
17
----------------------------------------------------------------------------
18
 
19
library ieee;
20
use ieee.std_logic_1164.all;
21
 
22
package altera_mf_components is
23
type altera_mf_logic_2D is array (NATURAL RANGE <>, NATURAL RANGE <>) of STD_LOGIC;
24
 
25
component lcell
26
    port (
27
        a_in : in std_logic;
28
        a_out : out std_logic);
29
end component;
30
 
31
 
32
component altclklock
33
    generic (
34
        inclock_period          : natural := 10000;   -- units in ps
35
        inclock_settings        : string := "UNUSED";
36
        valid_lock_cycles       : natural := 5;
37
        invalid_lock_cycles     : natural := 5;
38
        valid_lock_multiplier   : natural := 5;
39
        invalid_lock_multiplier : natural := 5;
40
        operation_mode          : string := "NORMAL";
41
        clock0_boost            : natural := 1;
42
        clock0_divide           : natural := 1;
43
        clock0_settings         : string := "UNUSED";
44
        clock0_time_delay       : string := "0";
45
        clock1_boost            : natural := 1;
46
        clock1_divide           : natural := 1;
47
        clock1_settings         : string := "UNUSED";
48
        clock1_time_delay       : string := "0";
49
        clock2_boost            : natural := 1;
50
        clock2_divide           : natural := 1;
51
        clock2_settings         : string := "UNUSED";
52
        clock2_time_delay       : string := "0";
53
        clock_ext_boost         : natural := 1;
54
        clock_ext_divide        : natural := 1;
55
        clock_ext_settings      : string := "UNUSED";
56
        clock_ext_time_delay    : string := "0";
57
        outclock_phase_shift    : natural := 0;   -- units in ps
58
        intended_device_family  : string := "Stratix" ;
59
        lpm_hint                : string  := "UNUSED";
60
        lpm_type                : string := "altclklock" );
61
    port(
62
        inclock   : in std_logic;  -- required port, input reference clock
63
        inclocken : in std_logic := '1';  -- PLL enable signal
64
        fbin      : in std_logic := '1';  -- feedback input for the PLL
65
        clock0    : out std_logic;  -- clock0 output
66
        clock1    : out std_logic;  -- clock1 output
67
        clock2    : out std_logic;  -- clock2 output
68
        clock_ext : out std_logic;  -- external clock output
69
        locked    : out std_logic );  -- PLL lock signal
70
end component;
71
 
72
component altlvds_rx
73
    generic (
74
        number_of_channels          : natural;
75
        deserialization_factor      : natural;
76
        inclock_boost               : natural:= 0;
77
        registered_output           : string := "ON";
78
        inclock_period              : natural;
79
        cds_mode                    : string := "UNUSED";
80
        intended_device_family      : string := "Stratix";
81
        input_data_rate             : natural:= 0;
82
        inclock_data_alignment      : string := "UNUSED";
83
        registered_data_align_input : string :="ON";
84
        common_rx_tx_pll            : string :="ON";
85
        enable_dpa_mode             : string := "OFF";
86
        enable_dpa_pll_calibration  : string  := "OFF";
87
        enable_dpa_calibration      : string := "ON";
88
        enable_dpa_fifo             : string := "ON";
89
        use_dpll_rawperror          : string := "OFF";
90
        use_coreclock_input         : string := "OFF";
91
        dpll_lock_count             : natural:= 0;
92
        dpll_lock_window            : natural:= 0;
93
        outclock_resource           : string := "AUTO";
94
        data_align_rollover         : natural := 10;
95
        lose_lock_on_one_change     : string  := "OFF";
96
        reset_fifo_at_first_lock    : string  := "ON";
97
        use_external_pll            : string  := "OFF";
98
        implement_in_les            : string  := "OFF";
99
        buffer_implementation       : string  := "RAM";
100
        port_rx_data_align          : string  := "PORT_CONNECTIVITY";
101
        port_rx_channel_data_align  : string  := "PORT_CONNECTIVITY";
102
        pll_operation_mode          : string  := "NORMAL";
103
        x_on_bitslip                : string  := "ON";
104
        use_no_phase_shift          : string  := "ON";
105
        rx_align_data_reg           : string  := "RISING_EDGE";
106
        inclock_phase_shift         : integer := 0;
107
        enable_soft_cdr_mode        : string  := "OFF";
108
        sim_dpa_output_clock_phase_shift : integer := 0;
109
        sim_dpa_is_negative_ppm_drift    : string  := "OFF";
110
        sim_dpa_net_ppm_variation        : natural := 0;
111
        enable_dpa_align_to_rising_edge_only  : string  := "OFF";
112
        enable_dpa_initial_phase_selection    : string  := "OFF";
113
        dpa_initial_phase_value     :natural  := 0;
114
        pll_self_reset_on_loss_lock : string  := "OFF";
115
        lpm_hint                    : string := "UNUSED";
116
        lpm_type                    : string := "altlvds_rx";
117
        clk_src_is_pll              : string := "off" );
118
    port (
119
        rx_in                 : in std_logic_vector(number_of_channels-1 downto 0);
120
        rx_inclock            : in std_logic := '0';
121
        rx_syncclock          : in std_logic := '0';
122
        rx_readclock          : in std_logic := '0';
123
        rx_enable             : in std_logic := '1';
124
        rx_deskew             : in std_logic := '0';
125
        rx_pll_enable         : in std_logic := '1';
126
        rx_data_align         : in std_logic := '0';
127
        rx_data_align_reset   : in std_logic := '0';
128
        rx_reset              : in std_logic_vector(number_of_channels-1 downto 0) := (others => '0');
129
        rx_dpll_reset         : in std_logic_vector(number_of_channels-1 downto 0) := (others => '0');
130
        rx_dpll_hold          : in std_logic_vector(number_of_channels-1 downto 0) := (others => '0');
131
        rx_dpll_enable        : in std_logic_vector(number_of_channels-1 downto 0) := (others => '1');
132
        rx_fifo_reset         : in std_logic_vector(number_of_channels-1 downto 0) := (others => '0');
133
        rx_channel_data_align : in std_logic_vector(number_of_channels-1 downto 0) := (others => '0');
134
        rx_cda_reset          : in std_logic_vector(number_of_channels-1 downto 0) := (others => '0');
135
        rx_coreclk            : in std_logic_vector(number_of_channels-1 downto 0) := (others => '0');
136
        pll_areset            : in std_logic := '0';
137
        rx_data_reset         : in std_logic := '0';
138
        dpa_pll_recal         : in std_logic := '0';
139
        pll_phasedone         : in std_logic := '1';
140
        rx_dpa_lock_reset     : in std_logic_vector(number_of_channels-1 downto 0) := (others => '0');
141
        rx_out                : out std_logic_vector(deserialization_factor*number_of_channels -1 downto 0);
142
        rx_outclock           : out std_logic;
143
        rx_locked             : out std_logic;
144
        rx_dpa_locked         : out std_logic_vector(number_of_channels-1 downto 0);
145
        rx_cda_max            : out std_logic_vector(number_of_channels-1 downto 0);
146
        rx_divfwdclk          : out std_logic_vector(number_of_channels-1 downto 0);
147
        dpa_pll_cal_busy      : out std_logic;
148
        pll_phasestep         : out std_logic;
149
        pll_phaseupdown       : out std_logic;
150
        pll_phasecounterselect: out std_logic_Vector(3 downto 0);
151
        pll_scanclk           : out std_logic);
152
end component;
153
 
154
component altlvds_tx
155
    generic (
156
        number_of_channels     : natural;
157
        deserialization_factor : natural:= 4;
158
        inclock_boost          : natural := 0;
159
        outclock_divide_by     : positive:= 1;
160
        registered_input       : string := "ON";
161
        multi_clock            : string := "OFF";
162
        inclock_period         : natural;
163
        center_align_msb       : string := "UNUSED";
164
        intended_device_family : string := "Stratix";
165
        output_data_rate       : natural:= 0;
166
        outclock_resource      : string := "AUTO";
167
        common_rx_tx_pll       : string := "ON";
168
        inclock_data_alignment : string := "EDGE_ALIGNED";
169
        outclock_alignment     : string := "EDGE_ALIGNED";
170
        use_external_pll       : string := "OFF";
171
        implement_in_les       : STRING  := "OFF";
172
        preemphasis_setting    : natural := 0;
173
        vod_setting            : natural := 0;
174
        differential_drive     : natural := 0;
175
        outclock_multiply_by   : natural := 1;
176
        coreclock_divide_by    : natural := 2;
177
        outclock_duty_cycle    : natural := 50;
178
        inclock_phase_shift    : integer := 0;
179
        outclock_phase_shift   : integer := 0;
180
        use_no_phase_shift     : string  := "ON";
181
        pll_self_reset_on_loss_lock : string  := "OFF";
182
        lpm_hint               : string  := "UNUSED";
183
        lpm_type               : string := "altlvds_tx";
184
        clk_src_is_pll         : string := "off" );
185
    port (
186
        tx_in           : in std_logic_vector(deserialization_factor*number_of_channels -1 downto 0);
187
        tx_inclock      : in std_logic := '0';
188
        tx_syncclock    : in std_logic := '0';
189
        tx_enable       : in std_logic := '1';
190
        sync_inclock    : in std_logic := '0';
191
        tx_pll_enable   : in std_logic := '1';
192
        pll_areset      : in std_logic := '0';
193
        tx_data_reset   : in std_logic := '0';
194
        tx_out          : out std_logic_vector(number_of_channels-1 downto 0);
195
        tx_outclock     : out std_logic;
196
        tx_coreclock    : out std_logic;
197
        tx_locked       : out std_logic );
198
end component;
199
 
200
component altdpram
201
    generic (
202
        width                               : natural;
203
        widthad                             : natural;
204
        numwords                            : natural := 0;
205
        lpm_file                            : string := "UNUSED";
206
        lpm_hint                            : string := "USE_EAB=ON";
207
        use_eab                             : string := "ON";
208
        indata_reg                          : string := "INCLOCK";
209
        indata_aclr                         : string := "ON";
210
        wraddress_reg                       : string := "INCLOCK";
211
        wraddress_aclr                      : string := "ON";
212
        wrcontrol_reg                       : string := "INCLOCK";
213
        wrcontrol_aclr                      : string := "ON";
214
        rdaddress_reg                       : string := "OUTCLOCK";
215
        rdaddress_aclr                      : string := "ON";
216
        rdcontrol_reg                       : string := "OUTCLOCK";
217
        rdcontrol_aclr                      : string := "ON";
218
        outdata_reg                         : string := "UNREGISTERED";
219
        outdata_aclr                        : string := "ON";
220
        ram_block_type                      : string := "AUTO";
221
        width_byteena                       : natural := 1;
222
        byte_size                           : natural := 5;
223
        read_during_write_mode_mixed_ports  : string := "DONT_CARE";
224
        intended_device_family              : string := "Stratix";
225
        lpm_type                            : string := "altdpram" );
226
    port(
227
        wren            : in std_logic := '0';
228
        data            : in std_logic_vector(width-1 downto 0);
229
        wraddress       : in std_logic_vector(widthad-1 downto 0);
230
        wraddressstall  : in std_logic := '0';
231
        inclock         : in std_logic := '1';
232
        inclocken       : in std_logic := '1';
233
        rden            : in std_logic := '1';
234
        rdaddress       : in std_logic_vector(widthad-1 downto 0);
235
        rdaddressstall  : in std_logic := '0';
236
        byteena         : in std_logic_vector(width_byteena-1 downto 0) := (others => '1');
237
        outclock        : in std_logic := '1';
238
        outclocken      : in std_logic := '1';
239
        aclr            : in std_logic := '0';
240
        q               : out std_logic_vector(width-1 downto 0) );
241
end component;
242
 
243
 
244
component alt3pram
245
    generic (
246
        width                  : natural;
247
        widthad                : natural;
248
        numwords               : natural := 0;
249
        lpm_file               : string := "UNUSED";
250
        lpm_hint               : string := "USE_EAB=ON";
251
        indata_reg             : string := "UNREGISTERED";
252
        indata_aclr            : string := "OFF";
253
        write_reg              : string := "UNREGISTERED";
254
        write_aclr             : string := "OFF";
255
        rdaddress_reg_a        : string := "UNREGISTERED";
256
        rdaddress_aclr_a       : string := "OFF";
257
        rdaddress_reg_b        : string := "UNREGISTERED";
258
        rdaddress_aclr_b       : string := "OFF";
259
        rdcontrol_reg_a        : string := "UNREGISTERED";
260
        rdcontrol_aclr_a       : string := "OFF";
261
        rdcontrol_reg_b        : string := "UNREGISTERED";
262
        rdcontrol_aclr_b       : string := "OFF";
263
        outdata_reg_a          : string := "UNREGISTERED";
264
        outdata_aclr_a         : string := "OFF";
265
        outdata_reg_b          : string := "UNREGISTERED";
266
        outdata_aclr_b         : string := "OFF";
267
        intended_device_family : string := "Stratix";
268
        ram_block_type         : string  := "AUTO";
269
        maximum_depth          : integer := 0;
270
        lpm_type : string      := "alt3pram" );
271
    port (
272
        wren        : in std_logic := '0';
273
        data        : in std_logic_vector(width-1 downto 0);
274
        wraddress   : in std_logic_vector(widthad-1 downto 0);
275
        inclock     : in std_logic := '0';
276
        inclocken   : in std_logic := '1';
277
        rden_a      : in std_logic := '1';
278
        rden_b      : in std_logic := '1';
279
        rdaddress_a : in std_logic_vector(widthad-1 downto 0);
280
        rdaddress_b : in std_logic_vector(widthad-1 downto 0);
281
        outclock    : in std_logic := '0';
282
        outclocken  : in std_logic := '1';
283
        aclr        : in std_logic := '0';
284
        qa          : out std_logic_vector(width-1 downto 0);
285
        qb          : out std_logic_vector(width-1 downto 0) );
286
end component;
287
 
288
 
289
component scfifo
290
    generic (
291
        lpm_width               : natural;
292
        lpm_widthu              : natural;
293
        lpm_numwords            : natural;
294
        lpm_showahead           : string := "OFF";
295
        lpm_hint                : string := "USE_EAB=ON";
296
        intended_device_family  : string := "NON_STRATIX";
297
        almost_full_value       : natural := 0;
298
        almost_empty_value      : natural := 0;
299
        overflow_checking       : string := "ON";
300
        underflow_checking      : string := "ON";
301
        allow_rwcycle_when_full : string := "OFF";
302
        add_ram_output_register : string  := "OFF";
303
        use_eab                 : string := "ON";
304
        lpm_type                : string := "scfifo";
305
        maximum_depth           : natural := 0 );
306
    port (
307
        data         : in std_logic_vector(lpm_width-1 downto 0);
308
        clock        : in std_logic;
309
        wrreq        : in std_logic;
310
        rdreq        : in std_logic;
311
        aclr         : in std_logic := '0';
312
        sclr         : in std_logic := '0';
313
        full         : out std_logic;
314
        almost_full  : out std_logic;
315
        empty        : out std_logic;
316
        almost_empty : out std_logic;
317
        q            : out std_logic_vector(lpm_width-1 downto 0);
318
        usedw        : out std_logic_vector(lpm_widthu-1 downto 0) );
319
end component;
320
 
321
component dcfifo_mixed_widths
322
    generic (
323
        lpm_width               : natural;
324
        lpm_widthu              : natural;
325
        lpm_width_r             : natural := 0;
326
        lpm_widthu_r            : natural := 0;
327
        lpm_numwords            : natural;
328
        lpm_showahead           : string := "OFF";
329
        lpm_hint                : string := "USE_EAB=ON";
330
        overflow_checking       : string := "ON";
331
        underflow_checking      : string := "ON";
332
        delay_rdusedw           : natural := 1;
333
        delay_wrusedw           : natural := 1;
334
        rdsync_delaypipe        : natural := 0;
335
        wrsync_delaypipe        : natural := 0;
336
        use_eab                 : string := "ON";
337
        add_ram_output_register : string := "OFF";
338
        add_width               : natural := 1;
339
        clocks_are_synchronized : string := "FALSE";
340
        ram_block_type          : string := "AUTO";
341
        add_usedw_msb_bit       : string := "OFF";
342
        write_aclr_synch        : string := "OFF";
343
        lpm_type                : string := "dcfifo_mixed_widths";
344
        intended_device_family  : string := "NON_STRATIX" );
345
    port (
346
        data    : in std_logic_vector(lpm_width-1 downto 0);
347
        rdclk   : in std_logic;
348
        wrclk   : in std_logic;
349
        wrreq   : in std_logic;
350
        rdreq   : in std_logic;
351
        aclr    : in std_logic := '0';
352
        rdfull  : out std_logic;
353
        wrfull  : out std_logic;
354
        wrempty : out std_logic;
355
        rdempty : out std_logic;
356
        q       : out std_logic_vector(lpm_width_r-1 downto 0);
357
        rdusedw : out std_logic_vector(lpm_widthu_r-1 downto 0);
358
        wrusedw : out std_logic_vector(lpm_widthu-1 downto 0) );
359
end component;
360
 
361
component dcfifo
362
    generic (
363
        lpm_width               : natural;
364
        lpm_widthu              : natural;
365
        lpm_numwords            : natural;
366
        lpm_showahead           : string := "OFF";
367
        lpm_hint                : string := "USE_EAB=ON";
368
        overflow_checking       : string := "ON";
369
        underflow_checking      : string := "ON";
370
        delay_rdusedw           : natural := 1;
371
        delay_wrusedw           : natural := 1;
372
        rdsync_delaypipe        : natural := 0;
373
        wrsync_delaypipe        : natural := 0;
374
        use_eab                 : string := "ON";
375
        add_ram_output_register : string := "OFF";
376
        add_width               : natural := 1;
377
        clocks_are_synchronized : string := "FALSE";
378
        ram_block_type          : string := "AUTO";
379
        add_usedw_msb_bit       : string := "OFF";
380
        write_aclr_synch        : string := "OFF";
381
        lpm_type                : string := "dcfifo";
382
        intended_device_family  : string := "NON_STRATIX" );
383
    port (
384
        data    : in std_logic_vector(lpm_width-1 downto 0);
385
        rdclk   : in std_logic;
386
        wrclk   : in std_logic;
387
        wrreq   : in std_logic;
388
        rdreq   : in std_logic;
389
        aclr    : in std_logic := '0';
390
        rdfull  : out std_logic;
391
        wrfull  : out std_logic;
392
        wrempty : out std_logic;
393
        rdempty : out std_logic;
394
        q       : out std_logic_vector(lpm_width-1 downto 0);
395
        rdusedw : out std_logic_vector(lpm_widthu-1 downto 0);
396
        wrusedw : out std_logic_vector(lpm_widthu-1 downto 0) );
397
end component;
398
 
399
component altddio_in
400
    generic (
401
        width                  : positive; -- required parameter
402
        invert_input_clocks    : string := "OFF";
403
        intended_device_family : string := "Stratix";
404
        power_up_high          : string := "OFF";
405
        lpm_hint               : string := "UNUSED";
406
        lpm_type               : string := "altddio_in" );
407
    port (
408
        datain    : in std_logic_vector(width-1 downto 0);
409
        inclock   : in std_logic;
410
        inclocken : in std_logic := '1';
411
        aset      : in std_logic := '0';
412
        aclr      : in std_logic := '0';
413
        sset      : in std_logic := '0';
414
        sclr      : in std_logic := '0';
415
        dataout_h : out std_logic_vector(width-1 downto 0);
416
        dataout_l : out std_logic_vector(width-1 downto 0) );
417
end component;
418
 
419
component altddio_out
420
    generic (
421
        width                  : positive;  -- required parameter
422
        power_up_high          : string := "OFF";
423
        oe_reg                 : string := "UNUSED";
424
        extend_oe_disable      : string := "UNUSED";
425
        invert_output          : string := "OFF";
426
        intended_device_family : string := "Stratix";
427
        lpm_hint               : string := "UNUSED";
428
        lpm_type               : string := "altddio_out" );
429
    port (
430
        datain_h   : in std_logic_vector(width-1 downto 0);
431
        datain_l   : in std_logic_vector(width-1 downto 0);
432
        outclock   : in std_logic;
433
        outclocken : in std_logic := '1';
434
        aset       : in std_logic := '0';
435
        aclr       : in std_logic := '0';
436
        sset       : in std_logic := '0';
437
        sclr       : in std_logic := '0';
438
        oe         : in std_logic := '1';
439
        dataout    : out std_logic_vector(width-1 downto 0);
440
        oe_out    : out std_logic_vector(width-1 downto 0) );
441
end component;
442
 
443
component altddio_bidir
444
    generic(
445
        width                    : positive; -- required parameter
446
        power_up_high            : string := "OFF";
447
        oe_reg                   : string := "UNUSED";
448
        extend_oe_disable        : string := "UNUSED";
449
        implement_input_in_lcell : string := "UNUSED";
450
        invert_output            : string := "OFF";
451
        intended_device_family   : string := "Stratix";
452
        lpm_hint                 : string := "UNUSED";
453
        lpm_type                 : string := "altddio_bidir" );
454
    port (
455
        datain_h   : in std_logic_vector(width-1 downto 0);
456
        datain_l   : in std_logic_vector(width-1 downto 0);
457
        inclock    : in std_logic := '0';
458
        inclocken  : in std_logic := '1';
459
        outclock   : in std_logic;
460
        outclocken : in std_logic := '1';
461
        aset       : in std_logic := '0';
462
        aclr       : in std_logic := '0';
463
        sset       : in std_logic := '0';
464
        sclr       : in std_logic := '0';
465
        oe         : in std_logic := '1';
466
        dataout_h  : out std_logic_vector(width-1 downto 0);
467
        dataout_l  : out std_logic_vector(width-1 downto 0);
468
        combout    : out std_logic_vector(width-1 downto 0);
469
        oe_out     : out std_logic_vector(width-1 downto 0);
470
        dqsundelayedout : out std_logic_vector(width-1 downto 0);
471
        padio      : inout std_logic_vector(width-1 downto 0) );
472
end component;
473
 
474
component altshift_taps
475
    generic (
476
        number_of_taps    : integer := 4;
477
        tap_distance      : integer := 3;
478
        width             : integer := 8;
479
        power_up_state : string := "CLEARED";
480
        lpm_hint          : string := "UNUSED";
481
        lpm_type          : string := "altshift_taps" );
482
    port (
483
        shiftin  : in std_logic_vector (width-1 downto 0);
484
        clock    : in std_logic;
485
        clken    : in std_logic := '1';
486
        aclr     : in std_logic := '0';
487
        shiftout : out std_logic_vector (width-1 downto 0);
488
        taps     : out std_logic_vector ((width*number_of_taps)-1 downto 0));
489
end component;
490
 
491
component altmult_add
492
    generic (
493
        WIDTH_A                      : integer := 1;
494
        WIDTH_B                      : integer := 1;
495
        WIDTH_RESULT                 : integer := 1;
496
        NUMBER_OF_MULTIPLIERS        : integer := 1;
497
 
498
    -- A inputs
499
        INPUT_REGISTER_A0            : string := "CLOCK0";
500
        INPUT_ACLR_A0                : string := "ACLR3";
501
        INPUT_SOURCE_A0              : string := "DATAA";
502
 
503
        INPUT_REGISTER_A1            : string := "CLOCK0";
504
        INPUT_ACLR_A1                : string := "ACLR3";
505
        INPUT_SOURCE_A1              : string := "DATAA";
506
 
507
        INPUT_REGISTER_A2            : string := "CLOCK0";
508
        INPUT_ACLR_A2                : string := "ACLR3";
509
        INPUT_SOURCE_A2              : string := "DATAA";
510
 
511
        INPUT_REGISTER_A3            : string := "CLOCK0";
512
        INPUT_ACLR_A3                : string := "ACLR3";
513
        INPUT_SOURCE_A3              : string := "DATAA";
514
 
515
        PORT_SIGNA                   : string := "PORT_CONNECTIVITY";
516
        REPRESENTATION_A             : string := "UNSIGNED";
517
        SIGNED_REGISTER_A            : string := "CLOCK0";
518
        SIGNED_ACLR_A                : string := "ACLR3";
519
        SIGNED_PIPELINE_REGISTER_A   : string := "CLOCK0";
520
        SIGNED_PIPELINE_ACLR_A       : string := "ACLR3";
521
 
522
    -- B inputs
523
        INPUT_REGISTER_B0            : string := "CLOCK0";
524
        INPUT_ACLR_B0                : string := "ACLR3";
525
        INPUT_SOURCE_B0              : string := "DATAB";
526
 
527
        INPUT_REGISTER_B1            : string := "CLOCK0";
528
        INPUT_ACLR_B1                : string := "ACLR3";
529
        INPUT_SOURCE_B1              : string := "DATAB";
530
 
531
        INPUT_REGISTER_B2            : string := "CLOCK0";
532
        INPUT_ACLR_B2                : string := "ACLR3";
533
        INPUT_SOURCE_B2              : string := "DATAB";
534
 
535
        INPUT_REGISTER_B3            : string := "CLOCK0";
536
        INPUT_ACLR_B3                : string := "ACLR3";
537
        INPUT_SOURCE_B3              : string := "DATAB";
538
 
539
        PORT_SIGNB                   : string := "PORT_CONNECTIVITY";
540
        REPRESENTATION_B             : string := "UNSIGNED";
541
        SIGNED_REGISTER_B            : string := "CLOCK0";
542
        SIGNED_ACLR_B                : string := "ACLR3";
543
        SIGNED_PIPELINE_REGISTER_B   : string := "CLOCK0";
544
        SIGNED_PIPELINE_ACLR_B       : string := "ACLR3";
545
 
546
        MULTIPLIER_REGISTER0         : string := "CLOCK0";
547
        MULTIPLIER_ACLR0             : string := "ACLR3";
548
        MULTIPLIER_REGISTER1         : string := "CLOCK0";
549
        MULTIPLIER_ACLR1             : string := "ACLR3";
550
        MULTIPLIER_REGISTER2         : string := "CLOCK0";
551
        MULTIPLIER_ACLR2             : string := "ACLR3";
552
        MULTIPLIER_REGISTER3         : string := "CLOCK0";
553
        MULTIPLIER_ACLR3             : string := "ACLR3";
554
 
555
        PORT_ADDNSUB1                : string := "PORT_CONNECTIVITY";
556
        ADDNSUB_MULTIPLIER_REGISTER1 : string := "CLOCK0";
557
        ADDNSUB_MULTIPLIER_ACLR1     : string := "ACLR3";
558
        ADDNSUB_MULTIPLIER_PIPELINE_REGISTER1 : string := "CLOCK0";
559
        ADDNSUB_MULTIPLIER_PIPELINE_ACLR1 : string := "ACLR3";
560
 
561
        PORT_ADDNSUB3                : string := "PORT_CONNECTIVITY";
562
        ADDNSUB_MULTIPLIER_REGISTER3 : string := "CLOCK0";
563
        ADDNSUB_MULTIPLIER_ACLR3     : string := "ACLR3";
564
        ADDNSUB_MULTIPLIER_PIPELINE_REGISTER3: string := "CLOCK0";
565
        ADDNSUB_MULTIPLIER_PIPELINE_ACLR3 : string := "ACLR3";
566
 
567
        ADDNSUB1_ROUND_ACLR                   : string := "ACLR3";
568
        ADDNSUB1_ROUND_PIPELINE_ACLR          : string := "ACLR3";
569
        ADDNSUB1_ROUND_REGISTER               : string := "CLOCK0";
570
        ADDNSUB1_ROUND_PIPELINE_REGISTER      : string := "CLOCK0";
571
        ADDNSUB3_ROUND_ACLR                   : string := "ACLR3";
572
        ADDNSUB3_ROUND_PIPELINE_ACLR          : string := "ACLR3";
573
        ADDNSUB3_ROUND_REGISTER               : string := "CLOCK0";
574
        ADDNSUB3_ROUND_PIPELINE_REGISTER      : string := "CLOCK0";
575
 
576
        MULT01_ROUND_ACLR                     : string := "ACLR3";
577
        MULT01_ROUND_REGISTER                 : string := "CLOCK0";
578
        MULT01_SATURATION_REGISTER            : string := "CLOCK0";
579
        MULT01_SATURATION_ACLR                : string := "ACLR3";
580
        MULT23_ROUND_REGISTER                 : string := "CLOCK0";
581
        MULT23_ROUND_ACLR                     : string := "ACLR3";
582
        MULT23_SATURATION_REGISTER            : string := "CLOCK0";
583
        MULT23_SATURATION_ACLR                : string := "ACLR3";
584
 
585
        multiplier1_direction        : string := "ADD";
586
        multiplier3_direction        : string := "ADD";
587
 
588
        OUTPUT_REGISTER              : string := "CLOCK0";
589
        OUTPUT_ACLR                  : string := "ACLR0";
590
 
591
        -- StratixII parameters
592
        multiplier01_rounding    : string := "NO";
593
        multiplier01_saturation : string := "NO";
594
        multiplier23_rounding    : string := "NO";
595
        multiplier23_saturation : string := "NO";
596
        adder1_rounding         : string := "NO";
597
        adder3_rounding         : string := "NO";
598
        port_mult0_is_saturated : string := "UNUSED";
599
        port_mult1_is_saturated : string := "UNUSED";
600
        port_mult2_is_saturated : string := "UNUSED";
601
        port_mult3_is_saturated : string := "UNUSED";
602
 
603
        -- Stratix III parameters
604
        scanouta_register : string := "UNREGISTERED";
605
        scanouta_aclr     : string := "NONE";
606
 
607
        -- Rounding parameters
608
        output_rounding : string := "NO";
609
        output_round_type : string := "NEAREST_INTEGER";
610
        width_msb : integer := 17;
611
        output_round_register : string := "UNREGISTERED";
612
        output_round_aclr : string := "NONE";
613
        output_round_pipeline_register : string := "UNREGISTERED";
614
        output_round_pipeline_aclr : string := "NONE";
615
 
616
        chainout_rounding : string := "NO";
617
        chainout_round_register : string := "UNREGISTERED";
618
        chainout_round_aclr : string := "NONE";
619
        chainout_round_pipeline_register : string := "UNREGISTERED";
620
        chainout_round_pipeline_aclr : string := "NONE";
621
        chainout_round_output_register : string := "UNREGISTERED";
622
        chainout_round_output_aclr : string := "NONE";
623
 
624
        -- saturation parameters
625
        port_output_is_overflow : string := "PORT_UNUSED";
626
        port_chainout_sat_is_overflow : string := "PORT_UNUSED";
627
        output_saturation : string := "NO";
628
        output_saturate_type : string := "ASYMMETRIC";
629
        width_saturate_sign : integer := 1;
630
        output_saturate_register : string := "UNREGISTERED";
631
        output_saturate_aclr : string := "NONE";
632
        output_saturate_pipeline_register : string := "UNREGISTERED";
633
        output_saturate_pipeline_aclr : string := "NONE";
634
 
635
        chainout_saturation : string := "NO";
636
        chainout_saturate_register : string := "UNREGISTERED";
637
        chainout_saturate_aclr : string := "NONE";
638
        chainout_saturate_pipeline_register : string := "UNREGISTERED";
639
        chainout_saturate_pipeline_aclr : string := "NONE";
640
        chainout_saturate_output_register : string := "UNREGISTERED";
641
        chainout_saturate_output_aclr : string := "NONE";
642
 
643
        -- chainout parameters
644
        chainout_adder : string := "NO";
645
        chainout_register : string := "UNREGISTERED";
646
        chainout_aclr : string := "NONE";
647
        width_chainin : integer := 1;
648
        zero_chainout_output_register : string := "UNREGISTERED";
649
        zero_chainout_output_aclr : string := "NONE";
650
 
651
        -- rotate & shift parameters
652
        shift_mode : string := "NO";
653
        rotate_aclr : string := "NONE";
654
        rotate_register : string := "UNREGISTERED";
655
        rotate_pipeline_register : string := "UNREGISTERED";
656
        rotate_pipeline_aclr : string := "NONE";
657
        rotate_output_register : string := "UNREGISTERED";
658
        rotate_output_aclr : string := "NONE";
659
        shift_right_register : string := "UNREGISTERED";
660
        shift_right_aclr : string := "NONE";
661
        shift_right_pipeline_register : string := "UNREGISTERED";
662
        shift_right_pipeline_aclr : string := "NONE";
663
        shift_right_output_register : string := "UNREGISTERED";
664
        shift_right_output_aclr : string := "NONE";
665
 
666
        -- loopback parameters
667
        zero_loopback_register : string := "UNREGISTERED";
668
        zero_loopback_aclr : string := "NONE";
669
        zero_loopback_pipeline_register : string := "UNREGISTERED";
670
        zero_loopback_pipeline_aclr : string := "NONE";
671
        zero_loopback_output_register : string := "UNREGISTERED";
672
        zero_loopback_output_aclr : string := "NONE";
673
 
674
        -- accumulator parameters
675
        accum_sload_register : string := "UNREGISTERED";
676
        accum_sload_aclr : string := "NONE";
677
        accum_sload_pipeline_register : string := "UNREGISTERED";
678
        accum_sload_pipeline_aclr : string := "NONE";
679
        accum_direction : string := "ADD";
680
        accumulator : string := "NO";
681
 
682
        EXTRA_LATENCY                : integer :=0;
683
        DEDICATED_MULTIPLIER_CIRCUITRY:string  := "AUTO";
684
        DSP_BLOCK_BALANCING          : string := "AUTO";
685
        lpm_hint                     : string := "UNUSED";
686
        lpm_type                     : string := "altmult_add";
687
        intended_device_family       : string := "Stratix" );
688
    port (
689
        dataa : in std_logic_vector(NUMBER_OF_MULTIPLIERS * WIDTH_A -1 downto 0);
690
        datab : in std_logic_vector(NUMBER_OF_MULTIPLIERS * WIDTH_B -1 downto 0);
691
 
692
        scanina : in std_logic_vector(width_a -1 downto 0) := (others => '0');
693
        scaninb : in std_logic_vector(width_b -1 downto 0) := (others => '0');
694
 
695
        sourcea : in std_logic_vector(NUMBER_OF_MULTIPLIERS -1 downto 0) := (others => '0');
696
        sourceb : in std_logic_vector(NUMBER_OF_MULTIPLIERS -1 downto 0) := (others => '0');
697
 
698
 
699
        -- clock ports
700
        clock3     : in std_logic := '1';
701
        clock2     : in std_logic := '1';
702
        clock1     : in std_logic := '1';
703
        clock0     : in std_logic := '1';
704
        aclr3      : in std_logic := '0';
705
        aclr2      : in std_logic := '0';
706
        aclr1      : in std_logic := '0';
707
        aclr0      : in std_logic := '0';
708
        ena3       : in std_logic := '1';
709
        ena2       : in std_logic := '1';
710
        ena1       : in std_logic := '1';
711
        ena0       : in std_logic := '1';
712
 
713
        -- control signals
714
        signa      : in std_logic := 'Z';
715
        signb      : in std_logic := 'Z';
716
        addnsub1   : in std_logic := 'Z';
717
        addnsub3   : in std_logic := 'Z';
718
 
719
        -- StratixII only input ports
720
        mult01_round        : in std_logic := '0';
721
        mult23_round        : in std_logic := '0';
722
        mult01_saturation   : in std_logic := '0';
723
        mult23_saturation   : in std_logic := '0';
724
        addnsub1_round      : in std_logic := '0';
725
        addnsub3_round      : in std_logic := '0';
726
 
727
        -- Stratix III only input ports
728
        output_round : in std_logic := '0';
729
        chainout_round : in std_logic := '0';
730
        output_saturate : in std_logic := '0';
731
        chainout_saturate : in std_logic := '0';
732
        chainin : in std_logic_vector (width_chainin - 1 downto 0) := (others => '0');
733
        zero_chainout : in std_logic := '0';
734
        rotate : in std_logic := '0';
735
        shift_right : in std_logic := '0';
736
        zero_loopback : in std_logic := '0';
737
        accum_sload : in std_logic := '0';
738
 
739
        -- output ports
740
        result     : out std_logic_vector(WIDTH_RESULT -1 downto 0);
741
        scanouta   : out std_logic_vector (WIDTH_A -1 downto 0);
742
        scanoutb   : out std_logic_vector (WIDTH_B -1 downto 0);
743
 
744
        -- StratixII only output ports
745
        mult0_is_saturated : out std_logic := '0';
746
        mult1_is_saturated : out std_logic := '0';
747
        mult2_is_saturated : out std_logic := '0';
748
        mult3_is_saturated : out std_logic := '0';
749
 
750
        -- Stratix III only output ports
751
        overflow : out std_logic := '0';
752
        chainout_sat_overflow : out std_logic := '0');
753
end component;
754
 
755
component altmult_accum
756
    generic (
757
        width_a                        : integer := 1;
758
        width_b                        : integer := 1;
759
        width_result                   : integer := 2;
760
        width_upper_data               : integer := 1;
761
        input_source_a                 : string  := "DATAA";
762
        input_source_b                 : string  := "DATAB";
763
        input_reg_a                    : string := "CLOCK0";
764
        input_aclr_a                   : string := "ACLR3";
765
        input_reg_b                    : string := "CLOCK0";
766
        input_aclr_b                   : string := "ACLR3";
767
        port_addnsub                   : string := "PORT_CONNECTIVITY";
768
        addnsub_reg                    : string := "CLOCK0";
769
        addnsub_aclr                   : string := "ACLR3";
770
        addnsub_pipeline_reg           : string := "CLOCK0";
771
        addnsub_pipeline_aclr          : string := "ACLR3";
772
        accum_direction                : string := "ADD";
773
        accum_sload_reg                : string := "CLOCK0";
774
        accum_sload_aclr               : string := "ACLR3";
775
        accum_sload_pipeline_reg       : string := "CLOCK0";
776
        accum_sload_pipeline_aclr      : string := "ACLR3";
777
        representation_a               : string := "UNSIGNED";
778
        port_signa                     : string := "PORT_CONNECTIVITY";
779
        sign_reg_a                     : string := "CLOCK0";
780
        sign_aclr_a                    : string := "ACLR3";
781
        sign_pipeline_reg_a            : string := "CLOCK0";
782
        sign_pipeline_aclr_a           : string := "ACLR3";
783
        representation_b               : string := "UNSIGNED";
784
        port_signb                     : string := "PORT_CONNECTIVITY";
785
        sign_reg_b                     : string := "CLOCK0";
786
        sign_aclr_b                    : string := "ACLR3";
787
        sign_pipeline_reg_b            : string := "CLOCK0";
788
        sign_pipeline_aclr_b           : string := "ACLR3";
789
        multiplier_reg                 : string := "CLOCK0";
790
        multiplier_aclr                : string := "ACLR3";
791
        output_reg                     : string := "CLOCK0";
792
        output_aclr                    : string := "ACLR0";
793
        extra_multiplier_latency       : integer := 0;
794
        extra_accumulator_latency      : integer := 0;
795
        dedicated_multiplier_circuitry : string  := "AUTO";
796
        dsp_block_balancing            : string := "AUTO";
797
        lpm_hint                       : string := "UNUSED";
798
        lpm_type                       : string  := "altmult_accum";
799
        intended_device_family         : string  := "Stratix";
800
        multiplier_rounding            : string  := "NO";
801
        multiplier_saturation          : string  := "NO";
802
        accumulator_rounding           : string  := "NO";
803
        accumulator_saturation         : string  := "NO";
804
        port_mult_is_saturated         : string  := "UNUSED";
805
        port_accum_is_saturated        : string  := "UNUSED";
806
        mult_round_aclr                : string  := "ACLR3";
807
        mult_round_reg                 : string  := "CLOCK0";
808
        mult_saturation_aclr           : string  := "ACLR3";
809
        mult_saturation_reg            : string  := "CLOCK0";
810
        accum_round_aclr               : string  := "ACLR3";
811
        accum_round_reg                : string  := "CLOCK3";
812
        accum_round_pipeline_aclr      : string  := "ACLR3";
813
        accum_round_pipeline_reg       : string  := "CLOCK0";
814
        accum_saturation_aclr          : string  := "ACLR3";
815
        accum_saturation_reg           : string  := "CLOCK0";
816
        accum_saturation_pipeline_aclr : string  := "ACLR3";
817
        accum_saturation_pipeline_reg  : string  := "CLOCK0";
818
        accum_sload_upper_data_aclr    : string  := "ACLR3";
819
        accum_sload_upper_data_pipeline_aclr : string  := "ACLR3";
820
        accum_sload_upper_data_pipeline_reg  : string  := "CLOCK0";
821
        accum_sload_upper_data_reg     : string  := "CLOCK0" );
822
 
823
    port (
824
        dataa        : in std_logic_vector(width_a -1 downto 0) := (others => '0');
825
        datab        : in std_logic_vector(width_b -1 downto 0) := (others => '0');
826
        scanina      : in std_logic_vector(width_a -1 downto 0) := (others => 'Z');
827
        scaninb      : in std_logic_vector(width_b -1 downto 0) := (others => 'Z');
828
        accum_sload_upper_data : in std_logic_vector(width_result -1 downto width_result - width_upper_data) := (others => '0');
829
        sourcea      : in std_logic := '1';
830
        sourceb      : in std_logic := '1';
831
        -- control signals
832
        addnsub      : in std_logic := 'Z';
833
        accum_sload  : in std_logic := '0';
834
        signa        : in std_logic := 'Z';
835
        signb        : in std_logic := 'Z';
836
        -- clock ports
837
        clock0       : in std_logic := '1';
838
        clock1       : in std_logic := '1';
839
        clock2       : in std_logic := '1';
840
        clock3       : in std_logic := '1';
841
        ena0         : in std_logic := '1';
842
        ena1         : in std_logic := '1';
843
        ena2         : in std_logic := '1';
844
        ena3         : in std_logic := '1';
845
        aclr0        : in std_logic := '0';
846
        aclr1        : in std_logic := '0';
847
        aclr2        : in std_logic := '0';
848
        aclr3        : in std_logic := '0';
849
        -- round and saturation ports
850
        mult_round       : in std_logic := '0';
851
        mult_saturation  : in std_logic := '0';
852
        accum_round      : in std_logic := '0';
853
        accum_saturation : in std_logic := '0';
854
        -- output ports
855
        result       : out std_logic_vector(width_result -1 downto 0);
856
        overflow     : out std_logic;
857
        scanouta     : out std_logic_vector (width_a -1 downto 0);
858
        scanoutb     : out std_logic_vector (width_b -1 downto 0);
859
        mult_is_saturated  : out std_logic := '0';
860
        accum_is_saturated : out std_logic := '0' );
861
end component;
862
 
863
component altaccumulate
864
    generic (
865
        width_in           : integer:= 4;
866
        width_out          : integer:= 8;
867
        lpm_representation : string := "UNSIGNED";
868
        extra_latency      : integer:= 0;
869
        use_wys            : string := "ON";
870
        lpm_hint           : string := "UNUSED";
871
        lpm_type           : string := "altaccumulate" );
872
 
873
    port (
874
        -- Input ports
875
        cin       : in std_logic := 'Z';
876
        data      : in std_logic_vector(width_in -1 downto 0);  -- Required port
877
        add_sub   : in std_logic := '1';
878
        clock     : in std_logic;   -- Required port
879
        sload     : in std_logic := '0';
880
        clken     : in std_logic := '1';
881
        sign_data : in std_logic := '0';
882
        aclr      : in std_logic := '0';
883
 
884
        -- Output ports
885
        result    : out std_logic_vector(width_out -1 downto 0) := (others => '0');
886
        cout      : out std_logic := '0';
887
        overflow  : out std_logic := '0' );
888
end component;
889
 
890
component altsyncram
891
    generic (
892
        operation_mode                 : string := "BIDIR_DUAL_PORT";
893
        -- port a parameters
894
        width_a                        : integer := 1;
895
        widthad_a                      : integer := 1;
896
        numwords_a                     : integer := 0;
897
        -- registering parameters
898
        -- port a read parameters
899
        outdata_reg_a                  : string := "UNREGISTERED";
900
        -- clearing parameters
901
        address_aclr_a                 : string := "NONE";
902
        outdata_aclr_a                 : string := "NONE";
903
        -- clearing parameters
904
        -- port a write parameters
905
        indata_aclr_a                  : string := "NONE";
906
        wrcontrol_aclr_a               : string := "NONE";
907
        -- clear for the byte enable port reigsters which are clocked by clk0
908
        byteena_aclr_a                 : string := "NONE";
909
        -- width of the byte enable ports. if it is used, must be WIDTH_WRITE_A/8 or /9
910
        width_byteena_a                : integer := 1;
911
        -- port b parameters
912
        width_b                        : integer := 1;
913
        widthad_b                      : integer := 1;
914
        numwords_b                     : integer := 0;
915
        -- registering parameters
916
        -- port b read parameters
917
        rdcontrol_reg_b                : string := "CLOCK1";
918
        address_reg_b                  : string := "CLOCK1";
919
        outdata_reg_b                  : string := "UNREGISTERED";
920
        -- clearing parameters
921
        outdata_aclr_b                 : string := "NONE";
922
        rdcontrol_aclr_b               : string := "NONE";
923
        -- registering parameters
924
        -- port b write parameters
925
        indata_reg_b                   : string := "CLOCK1";
926
        wrcontrol_wraddress_reg_b      : string := "CLOCK1";
927
        -- registering parameter for the byte enable reister for port b
928
        byteena_reg_b                  : string := "CLOCK1";
929
        -- clearing parameters
930
        indata_aclr_b                  : string := "NONE";
931
        wrcontrol_aclr_b               : string := "NONE";
932
        address_aclr_b                 : string := "NONE";
933
        -- clear parameter for byte enable port register
934
        byteena_aclr_b                 : string := "NONE";
935
        -- StratixII only : to bypass clock enable or using clock enable
936
        clock_enable_input_a           : string := "NORMAL";
937
        clock_enable_output_a          : string := "NORMAL";
938
        clock_enable_input_b           : string := "NORMAL";
939
        clock_enable_output_b          : string := "NORMAL";
940
        -- width of the byte enable ports. if it is used, must be WIDTH_WRITE_A/8 or /9
941
        width_byteena_b                : integer := 1;
942
        -- clock enable setting for the core
943
        clock_enable_core_a            : string := "USE_INPUT_CLKEN";
944
        clock_enable_core_b            : string := "USE_INPUT_CLKEN";
945
        -- read-during-write-same-port setting
946
        read_during_write_mode_port_a  : string := "NEW_DATA_NO_NBE_READ";
947
        read_during_write_mode_port_b  : string := "NEW_DATA_NO_NBE_READ";
948
        -- ECC status ports setting
949
        enable_ecc                     : string := "FALSE";
950
        -- global parameters
951
        -- width of a byte for byte enables
952
        byte_size                      : integer := 0;
953
        read_during_write_mode_mixed_ports: string := "DONT_CARE";
954
        -- ram block type choices are "AUTO", "M512", "M4K" and "MEGARAM"
955
        ram_block_type                 : string := "AUTO";
956
        -- determine whether LE support is turned on or off for altsyncram
957
        implement_in_les               : string := "OFF";
958
        -- determine whether RAM would be power up to uninitialized or not
959
        power_up_uninitialized         : string := "FALSE";
960
 
961
        sim_show_memory_data_in_port_b_layout :  string  := "OFF";
962
 
963
        -- general operation parameters
964
        init_file                      : string := "UNUSED";
965
        init_file_layout               : string := "UNUSED";
966
        maximum_depth                  : integer := 0;
967
        intended_device_family         : string := "Stratix";
968
        lpm_hint                       : string := "UNUSED";
969
        lpm_type                       : string := "altsyncram" );
970
    port (
971
        wren_a    : in std_logic := '0';
972
        wren_b    : in std_logic := '0';
973
        rden_a    : in std_logic := '1';
974
        rden_b    : in std_logic := '1';
975
        data_a    : in std_logic_vector(width_a - 1 downto 0):= (others => '1');
976
        data_b    : in std_logic_vector(width_b - 1 downto 0):= (others => '1');
977
        address_a : in std_logic_vector(widthad_a - 1 downto 0);
978
        address_b : in std_logic_vector(widthad_b - 1 downto 0) := (others => '1');
979
 
980
        clock0    : in std_logic := '1';
981
        clock1    : in std_logic := 'Z';
982
        clocken0  : in std_logic := '1';
983
        clocken1  : in std_logic := '1';
984
        clocken2  : in std_logic := '1';
985
        clocken3  : in std_logic := '1';
986
        aclr0     : in std_logic := '0';
987
        aclr1     : in std_logic := '0';
988
        byteena_a : in std_logic_vector( (width_byteena_a - 1) downto 0) := (others => '1');
989
        byteena_b : in std_logic_vector( (width_byteena_b - 1) downto 0) := (others => 'Z');
990
 
991
        addressstall_a : in std_logic := '0';
992
        addressstall_b : in std_logic := '0';
993
 
994
        q_a            : out std_logic_vector(width_a - 1 downto 0);
995
        q_b            : out std_logic_vector(width_b - 1 downto 0);
996
 
997
        eccstatus      : out std_logic_vector(2 downto 0) );
998
end component;
999
 
1000
component altpll
1001
    generic (
1002
        intended_device_family     : string := "Stratix" ;
1003
        operation_mode             : string := "NORMAL" ;
1004
        pll_type                   : string := "AUTO" ;
1005
        qualify_conf_done          : string := "OFF" ;
1006
        compensate_clock           : string := "CLK0" ;
1007
        scan_chain                 : string := "LONG";
1008
        primary_clock              : string := "inclk0" ;
1009
        inclk0_input_frequency     : natural;   -- required parameter
1010
        inclk1_input_frequency     : natural := 0;
1011
        gate_lock_signal           : string := "NO";
1012
        gate_lock_counter          : integer := 0;
1013
        lock_high                  : natural := 1;
1014
        lock_low                   : natural := 0;
1015
        valid_lock_multiplier      : natural := 1;
1016
        invalid_lock_multiplier    : natural := 5;
1017
        switch_over_type           : string := "AUTO";
1018
        switch_over_on_lossclk     : string := "OFF" ;
1019
        switch_over_on_gated_lock  : string := "OFF" ;
1020
        enable_switch_over_counter : string := "OFF";
1021
        switch_over_counter        : natural := 0;
1022
        feedback_source            : string := "EXTCLK0" ;
1023
        bandwidth                  : natural := 0;
1024
        bandwidth_type             : string := "UNUSED";
1025
        spread_frequency           : natural := 0;
1026
        down_spread                : string := "0.0";
1027
        self_reset_on_gated_loss_lock : string := "OFF";
1028
        self_reset_on_loss_lock      : string := "OFF";
1029
        lock_window_ui             : string := "0.05";
1030
        width_clock                : natural := 6;
1031
        width_phasecounterselect   : natural := 4;
1032
        charge_pump_current_bits   : natural := 9999;
1033
        loop_filter_c_bits         : natural := 9999;
1034
        loop_filter_r_bits         : natural := 9999;
1035
        scan_chain_mif_file        : string  := "UNUSED";
1036
 
1037
        -- simulation-only parameters
1038
        simulation_type            : string := "functional";
1039
        source_is_pll              : string := "off";
1040
        skip_vco                   : string := "off";
1041
 
1042
        -- internal clock specifications
1043
        clk9_multiply_by           : natural := 1;
1044
        clk8_multiply_by           : natural := 1;
1045
        clk7_multiply_by           : natural := 1;
1046
        clk6_multiply_by           : natural := 1;
1047
        clk5_multiply_by           : natural := 1;
1048
        clk4_multiply_by           : natural := 1;
1049
        clk3_multiply_by           : natural := 1;
1050
        clk2_multiply_by           : natural := 1;
1051
        clk1_multiply_by           : natural := 1;
1052
        clk0_multiply_by           : natural := 1;
1053
        clk9_divide_by             : natural := 1;
1054
        clk8_divide_by             : natural := 1;
1055
        clk7_divide_by             : natural := 1;
1056
        clk6_divide_by             : natural := 1;
1057
        clk5_divide_by             : natural := 1;
1058
        clk4_divide_by             : natural := 1;
1059
        clk3_divide_by             : natural := 1;
1060
        clk2_divide_by             : natural := 1;
1061
        clk1_divide_by             : natural := 1;
1062
        clk0_divide_by             : natural := 1;
1063
        clk9_phase_shift           : string := "0";
1064
        clk8_phase_shift           : string := "0";
1065
        clk7_phase_shift           : string := "0";
1066
        clk6_phase_shift           : string := "0";
1067
        clk5_phase_shift           : string := "0";
1068
        clk4_phase_shift           : string := "0";
1069
        clk3_phase_shift           : string := "0";
1070
        clk2_phase_shift           : string := "0";
1071
        clk1_phase_shift           : string := "0";
1072
        clk0_phase_shift           : string := "0";
1073
        clk5_time_delay            : string := "0";
1074
        clk4_time_delay            : string := "0";
1075
        clk3_time_delay            : string := "0";
1076
        clk2_time_delay            : string := "0";
1077
        clk1_time_delay            : string := "0";
1078
        clk0_time_delay            : string := "0";
1079
        clk9_duty_cycle            : natural := 50;
1080
        clk8_duty_cycle            : natural := 50;
1081
        clk7_duty_cycle            : natural := 50;
1082
        clk6_duty_cycle            : natural := 50;
1083
        clk5_duty_cycle            : natural := 50;
1084
        clk4_duty_cycle            : natural := 50;
1085
        clk3_duty_cycle            : natural := 50;
1086
        clk2_duty_cycle            : natural := 50;
1087
        clk1_duty_cycle            : natural := 50;
1088
        clk0_duty_cycle            : natural := 50;
1089
        clk2_output_frequency      : natural := 0;
1090
        clk1_output_frequency      : natural := 0;
1091
        clk0_output_frequency      : natural := 0;
1092
        clk9_use_even_counter_mode : string := "OFF";
1093
        clk8_use_even_counter_mode : string := "OFF";
1094
        clk7_use_even_counter_mode : string := "OFF";
1095
        clk6_use_even_counter_mode : string := "OFF";
1096
        clk5_use_even_counter_mode : string := "OFF";
1097
        clk4_use_even_counter_mode : string := "OFF";
1098
        clk3_use_even_counter_mode : string := "OFF";
1099
        clk2_use_even_counter_mode : string := "OFF";
1100
        clk1_use_even_counter_mode : string := "OFF";
1101
        clk0_use_even_counter_mode : string := "OFF";
1102
        clk9_use_even_counter_value  : string := "OFF";
1103
        clk8_use_even_counter_value  : string := "OFF";
1104
        clk7_use_even_counter_value  : string := "OFF";
1105
        clk6_use_even_counter_value  : string := "OFF";
1106
        clk5_use_even_counter_value  : string := "OFF";
1107
        clk4_use_even_counter_value  : string := "OFF";
1108
        clk3_use_even_counter_value  : string := "OFF";
1109
        clk2_use_even_counter_value  : string := "OFF";
1110
        clk1_use_even_counter_value  : string := "OFF";
1111
        clk0_use_even_counter_value  : string := "OFF";
1112
 
1113
        -- external clock specifications
1114
        extclk3_multiply_by        : natural := 1;
1115
        extclk2_multiply_by        : natural := 1;
1116
        extclk1_multiply_by        : natural := 1;
1117
        extclk0_multiply_by        : natural := 1;
1118
        extclk3_divide_by          : natural := 1;
1119
        extclk2_divide_by          : natural := 1;
1120
        extclk1_divide_by          : natural := 1;
1121
        extclk0_divide_by          : natural := 1;
1122
        extclk3_phase_shift        : string := "0";
1123
        extclk2_phase_shift        : string := "0";
1124
        extclk1_phase_shift        : string := "0";
1125
        extclk0_phase_shift        : string := "0";
1126
        extclk3_time_delay         : string := "0";
1127
        extclk2_time_delay         : string := "0";
1128
        extclk1_time_delay         : string := "0";
1129
        extclk0_time_delay         : string := "0";
1130
        extclk3_duty_cycle         : natural := 50;
1131
        extclk2_duty_cycle         : natural := 50;
1132
        extclk1_duty_cycle         : natural := 50;
1133
        extclk0_duty_cycle         : natural := 50;
1134
        vco_multiply_by            : integer := 0;
1135
        vco_divide_by              : integer := 0;
1136
        sclkout0_phase_shift       : string := "0";
1137
        sclkout1_phase_shift       : string := "0";
1138
 
1139
        dpa_multiply_by            : integer := 0;
1140
        dpa_divide_by              : integer := 0;
1141
        dpa_divider                : integer := 0;
1142
 
1143
        -- advanced user parameters
1144
        vco_min                    : natural := 0;
1145
        vco_max                    : natural := 0;
1146
        vco_center                 : natural := 0;
1147
        pfd_min                    : natural := 0;
1148
        pfd_max                    : natural := 0;
1149
        m_initial                  : natural := 1;
1150
        m                          : natural := 0; -- m must default to 0 to force altpll to calculate the internal parameters for itself
1151
        n                          : natural := 1;
1152
        m2                         : natural := 1;
1153
        n2                         : natural := 1;
1154
        ss                         : natural := 0;
1155
        c0_high                    : natural := 1;
1156
        c1_high                    : natural := 1;
1157
        c2_high                    : natural := 1;
1158
        c3_high                    : natural := 1;
1159
        c4_high                    : natural := 1;
1160
        c5_high                    : natural := 1;
1161
        c6_high                    : natural := 1;
1162
        c7_high                    : natural := 1;
1163
        c8_high                    : natural := 1;
1164
        c9_high                    : natural := 1;
1165
        l0_high                    : natural := 1;
1166
        l1_high                    : natural := 1;
1167
        g0_high                    : natural := 1;
1168
        g1_high                    : natural := 1;
1169
        g2_high                    : natural := 1;
1170
        g3_high                    : natural := 1;
1171
        e0_high                    : natural := 1;
1172
        e1_high                    : natural := 1;
1173
        e2_high                    : natural := 1;
1174
        e3_high                    : natural := 1;
1175
        c0_low                     : natural := 1;
1176
        c1_low                     : natural := 1;
1177
        c2_low                     : natural := 1;
1178
        c3_low                     : natural := 1;
1179
        c4_low                     : natural := 1;
1180
        c5_low                     : natural := 1;
1181
        c6_low                     : natural := 1;
1182
        c7_low                     : natural := 1;
1183
        c8_low                     : natural := 1;
1184
        c9_low                     : natural := 1;
1185
        l0_low                     : natural := 1;
1186
        l1_low                     : natural := 1;
1187
        g0_low                     : natural := 1;
1188
        g1_low                     : natural := 1;
1189
        g2_low                     : natural := 1;
1190
        g3_low                     : natural := 1;
1191
        e0_low                     : natural := 1;
1192
        e1_low                     : natural := 1;
1193
        e2_low                     : natural := 1;
1194
        e3_low                     : natural := 1;
1195
        c0_initial                 : natural := 1;
1196
        c1_initial                 : natural := 1;
1197
        c2_initial                 : natural := 1;
1198
        c3_initial                 : natural := 1;
1199
        c4_initial                 : natural := 1;
1200
        c5_initial                 : natural := 1;
1201
        c6_initial                 : natural := 1;
1202
        c7_initial                 : natural := 1;
1203
        c8_initial                 : natural := 1;
1204
        c9_initial                 : natural := 1;
1205
        l0_initial                 : natural := 1;
1206
        l1_initial                 : natural := 1;
1207
        g0_initial                 : natural := 1;
1208
        g1_initial                 : natural := 1;
1209
        g2_initial                 : natural := 1;
1210
        g3_initial                 : natural := 1;
1211
        e0_initial                 : natural := 1;
1212
        e1_initial                 : natural := 1;
1213
        e2_initial                 : natural := 1;
1214
        e3_initial                 : natural := 1;
1215
        c0_mode                    : string := "bypass" ;
1216
        c1_mode                    : string := "bypass" ;
1217
        c2_mode                    : string := "bypass" ;
1218
        c3_mode                    : string := "bypass" ;
1219
        c4_mode                    : string := "bypass" ;
1220
        c5_mode                    : string := "bypass" ;
1221
        c6_mode                    : string := "bypass" ;
1222
        c7_mode                    : string := "bypass" ;
1223
        c8_mode                    : string := "bypass" ;
1224
        c9_mode                    : string := "bypass" ;
1225
        l0_mode                    : string := "bypass" ;
1226
        l1_mode                    : string := "bypass" ;
1227
        g0_mode                    : string := "bypass" ;
1228
        g1_mode                    : string := "bypass" ;
1229
        g2_mode                    : string := "bypass" ;
1230
        g3_mode                    : string := "bypass" ;
1231
        e0_mode                    : string := "bypass" ;
1232
        e1_mode                    : string := "bypass" ;
1233
        e2_mode                    : string := "bypass" ;
1234
        e3_mode                    : string := "bypass" ;
1235
        c0_ph                      : natural := 0;
1236
        c1_ph                      : natural := 0;
1237
        c2_ph                      : natural := 0;
1238
        c3_ph                      : natural := 0;
1239
        c4_ph                      : natural := 0;
1240
        c5_ph                      : natural := 0;
1241
        c6_ph                      : natural := 0;
1242
        c7_ph                      : natural := 0;
1243
        c8_ph                      : natural := 0;
1244
        c9_ph                      : natural := 0;
1245
        l0_ph                      : natural := 0;
1246
        l1_ph                      : natural := 0;
1247
        g0_ph                      : natural := 0;
1248
        g1_ph                      : natural := 0;
1249
        g2_ph                      : natural := 0;
1250
        g3_ph                      : natural := 0;
1251
        e0_ph                      : natural := 0;
1252
        e1_ph                      : natural := 0;
1253
        e2_ph                      : natural := 0;
1254
        e3_ph                      : natural := 0;
1255
        m_ph                       : natural := 0;
1256
        l0_time_delay              : natural := 0;
1257
        l1_time_delay              : natural := 0;
1258
        g0_time_delay              : natural := 0;
1259
        g1_time_delay              : natural := 0;
1260
        g2_time_delay              : natural := 0;
1261
        g3_time_delay              : natural := 0;
1262
        e0_time_delay              : natural := 0;
1263
        e1_time_delay              : natural := 0;
1264
        e2_time_delay              : natural := 0;
1265
        e3_time_delay              : natural := 0;
1266
        m_time_delay               : natural := 0;
1267
        n_time_delay               : natural := 0;
1268
        c1_use_casc_in             : string := "off";
1269
        c2_use_casc_in             : string := "off";
1270
        c3_use_casc_in             : string := "off";
1271
        c4_use_casc_in             : string := "off";
1272
        c5_use_casc_in             : string := "off";
1273
        c6_use_casc_in             : string := "off";
1274
        c7_use_casc_in             : string := "off";
1275
        c8_use_casc_in             : string := "off";
1276
        c9_use_casc_in             : string := "off";
1277
        m_test_source              : integer := 5;
1278
        c0_test_source             : integer := 5;
1279
        c1_test_source             : integer := 5;
1280
        c2_test_source             : integer := 5;
1281
        c3_test_source             : integer := 5;
1282
        c4_test_source             : integer := 5;
1283
        c5_test_source             : integer := 5;
1284
        c6_test_source             : integer := 5;
1285
        c7_test_source             : integer := 5;
1286
        c8_test_source             : integer := 5;
1287
        c9_test_source             : integer := 5;
1288
        extclk3_counter            : string := "e3" ;
1289
        extclk2_counter            : string := "e2" ;
1290
        extclk1_counter            : string := "e1" ;
1291
        extclk0_counter            : string := "e0" ;
1292
        clk9_counter               : string := "c9" ;
1293
        clk8_counter               : string := "c8" ;
1294
        clk7_counter               : string := "c7" ;
1295
        clk6_counter               : string := "c6" ;
1296
        clk5_counter               : string := "l1" ;
1297
        clk4_counter               : string := "l0" ;
1298
        clk3_counter               : string := "g3" ;
1299
        clk2_counter               : string := "g2" ;
1300
        clk1_counter               : string := "g1" ;
1301
        clk0_counter               : string := "g0" ;
1302
        enable0_counter            : string := "l0";
1303
        enable1_counter            : string := "l0";
1304
        charge_pump_current        : natural := 2;
1305
        loop_filter_r              : string := " 1.000000";
1306
        loop_filter_c              : natural := 5;
1307
        vco_post_scale             : natural := 0;
1308
        vco_frequency_control      : string := "AUTO";
1309
        vco_phase_shift_step       : natural := 0;
1310
        lpm_hint                   : string := "UNUSED";
1311
        lpm_type                   : string := "altpll";
1312
        port_clkena0 : string := "PORT_CONNECTIVITY";
1313
        port_clkena1 : string := "PORT_CONNECTIVITY";
1314
        port_clkena2 : string := "PORT_CONNECTIVITY";
1315
        port_clkena3 : string := "PORT_CONNECTIVITY";
1316
        port_clkena4 : string := "PORT_CONNECTIVITY";
1317
        port_clkena5 : string := "PORT_CONNECTIVITY";
1318
        port_extclkena0 : string := "PORT_CONNECTIVITY";
1319
        port_extclkena1 : string := "PORT_CONNECTIVITY";
1320
        port_extclkena2 : string := "PORT_CONNECTIVITY";
1321
        port_extclkena3 : string := "PORT_CONNECTIVITY";
1322
        port_extclk0 : string := "PORT_CONNECTIVITY";
1323
        port_extclk1 : string := "PORT_CONNECTIVITY";
1324
        port_extclk2 : string := "PORT_CONNECTIVITY";
1325
        port_extclk3 : string := "PORT_CONNECTIVITY";
1326
        port_clkbad0 : string := "PORT_CONNECTIVITY";
1327
        port_clkbad1 : string := "PORT_CONNECTIVITY";
1328
        port_clk0 : string := "PORT_CONNECTIVITY";
1329
        port_clk1 : string := "PORT_CONNECTIVITY";
1330
        port_clk2 : string := "PORT_CONNECTIVITY";
1331
        port_clk3 : string := "PORT_CONNECTIVITY";
1332
        port_clk4 : string := "PORT_CONNECTIVITY";
1333
        port_clk5 : string := "PORT_CONNECTIVITY";
1334
        port_clk6 : string := "PORT_CONNECTIVITY";
1335
        port_clk7 : string := "PORT_CONNECTIVITY";
1336
        port_clk8 : string := "PORT_CONNECTIVITY";
1337
        port_clk9 : string := "PORT_CONNECTIVITY";
1338
        port_scandata : string := "PORT_CONNECTIVITY";
1339
        port_scandataout : string := "PORT_CONNECTIVITY";
1340
        port_scandone : string := "PORT_CONNECTIVITY";
1341
        port_sclkout1 : string := "PORT_CONNECTIVITY";
1342
        port_sclkout0 : string := "PORT_CONNECTIVITY";
1343
        port_activeclock : string := "PORT_CONNECTIVITY";
1344
        port_clkloss : string := "PORT_CONNECTIVITY";
1345
        port_inclk1 : string := "PORT_CONNECTIVITY";
1346
        port_inclk0 : string := "PORT_CONNECTIVITY";
1347
        port_fbin : string := "PORT_CONNECTIVITY";
1348
        port_fbout : string := "PORT_CONNECTIVITY";
1349
        port_pllena : string := "PORT_CONNECTIVITY";
1350
        port_clkswitch : string := "PORT_CONNECTIVITY";
1351
        port_areset : string := "PORT_CONNECTIVITY";
1352
        port_pfdena : string := "PORT_CONNECTIVITY";
1353
        port_scanclk : string := "PORT_CONNECTIVITY";
1354
        port_scanaclr : string := "PORT_CONNECTIVITY";
1355
        port_scanread : string := "PORT_CONNECTIVITY";
1356
        port_scanwrite : string := "PORT_CONNECTIVITY";
1357
        port_enable0 : string := "PORT_CONNECTIVITY";
1358
        port_enable1 : string := "PORT_CONNECTIVITY";
1359
        port_locked : string := "PORT_CONNECTIVITY";
1360
        port_configupdate : string := "PORT_CONNECTIVITY";
1361
        port_phasecounterselect : string := "PORT_CONNECTIVITY";
1362
        port_phasedone : string := "PORT_CONNECTIVITY";
1363
        port_phasestep : string := "PORT_CONNECTIVITY";
1364
        port_phaseupdown : string := "PORT_CONNECTIVITY";
1365
        port_vcooverrange : string := "PORT_CONNECTIVITY";
1366
        port_vcounderrange : string := "PORT_CONNECTIVITY";
1367
        port_scanclkena : string := "PORT_CONNECTIVITY";
1368
        using_fbmimicbidir_port : string := "ON";
1369
        sim_gate_lock_device_behavior : string := "OFF" );
1370
    port (
1371
        inclk       : in std_logic_vector(1 downto 0) := (others => '0');
1372
        fbin        : in std_logic := '0';
1373
        pllena      : in std_logic := '1';
1374
        clkswitch   : in std_logic := '0';
1375
        areset      : in std_logic := '0';
1376
        pfdena      : in std_logic := '1';
1377
        clkena      : in std_logic_vector(5 downto 0) := (others => '1');
1378
        extclkena   : in std_logic_vector(3 downto 0) := (others => '1');
1379
        scanclk     : in std_logic := '0';
1380
        scanclkena  : in std_logic := '1';
1381
        scanaclr    : in std_logic := '0';
1382
        scanread    : in std_logic := '0';
1383
        scanwrite   : in std_logic := '0';
1384
        scandata    : in std_logic := '0';
1385
        phasecounterselect : in std_logic_vector(width_phasecounterselect-1 downto 0) := (others => '0');
1386
        phaseupdown  : in std_logic := '0';
1387
        phasestep    : in std_logic := '0';
1388
        configupdate : in std_logic := '0';
1389
        fbmimicbidir : inout std_logic := '1';
1390
        clk         : out std_logic_vector(width_clock-1 downto 0);
1391
        extclk      : out std_logic_vector(3 downto 0);
1392
        clkbad      : out std_logic_vector(1 downto 0);
1393
        enable0     : out std_logic;
1394
        enable1     : out std_logic;
1395
        activeclock : out std_logic;
1396
        clkloss     : out std_logic;
1397
        locked      : out std_logic;
1398
        scandataout : out std_logic;
1399
        scandone    : out std_logic;
1400
        sclkout0    : out std_logic;
1401
        sclkout1    : out std_logic;
1402
        phasedone     : out std_logic;
1403
        vcooverrange  : out std_logic;
1404
        vcounderrange : out std_logic;
1405
        fbout         : out std_logic;
1406
        fref          : out std_logic;
1407
        icdrclk       : out std_logic );
1408
end component;
1409
 
1410
component altfp_mult
1411
    generic (
1412
        width_exp               : integer := 11;
1413
        width_man               : integer := 31;
1414
        dedicated_multiplier_circuitry  : string := "AUTO";
1415
        reduced_functionality           : string := "NO";
1416
        pipeline                        : natural := 5;
1417
        denormal_support                : string := "YES";
1418
        exception_handling              : string := "YES";
1419
        lpm_hint                        : string := "UNUSED";
1420
        lpm_type                        : string := "altfp_mult" );
1421
    port (
1422
        clock       : in std_logic;
1423
        clk_en      : in std_logic := '1';
1424
        aclr        : in std_logic := '0';
1425
        dataa       : in std_logic_vector(WIDTH_EXP + WIDTH_MAN downto 0) ;
1426
        datab       : in std_logic_vector(WIDTH_EXP + WIDTH_MAN downto 0) ;
1427
        result      : out std_logic_vector(WIDTH_EXP + WIDTH_MAN downto 0) ;
1428
        overflow    : out std_logic ;
1429
        underflow   : out std_logic ;
1430
        zero        : out std_logic ;
1431
        denormal    : out std_logic ;
1432
        indefinite  : out std_logic ;
1433
        nan         : out std_logic );
1434
end component;
1435
 
1436
component altsqrt
1437
    generic (
1438
        q_port_width  : integer := 1;
1439
        r_port_width  : integer := 1;
1440
        width       : integer := 1;
1441
        pipeline    : integer := 0;
1442
        lpm_hint    : string := "UNUSED";
1443
        lpm_type    : string := "altsqrt" );
1444
    port (
1445
        radical     : in std_logic_vector(width - 1 downto 0) ;
1446
        clk         : in std_logic := '1';
1447
        ena         : in std_logic := '1';
1448
        aclr        : in std_logic := '0';
1449
        q           : out std_logic_vector( q_port_width - 1 downto 0) ;
1450
        remainder   : out std_logic_vector( r_port_width - 1 downto 0) );
1451
end component;
1452
 
1453
component parallel_add
1454
    generic (
1455
        width             : natural := 4;
1456
        size              : natural := 2;
1457
        widthr            : natural := 4;
1458
        shift             : natural := 0;
1459
        msw_subtract      : string  := "NO";
1460
        representation    : string  := "UNSIGNED";
1461
        pipeline          : natural := 0;
1462
        result_alignment  : string  := "LSB";
1463
        lpm_hint          : string  := "UNUSED";
1464
        lpm_type          : string  := "parallel_add" );
1465
    port (
1466
        data   : in altera_mf_logic_2D(size - 1 downto 0, width - 1 downto 0);
1467
        clock  : in std_logic := '1';
1468
        aclr   : in std_logic := '0';
1469
        clken  : in std_logic := '1';
1470
        result : out std_logic_vector(widthr - 1 downto 0) );
1471
end component;
1472
 
1473
component a_graycounter
1474
    generic (
1475
        width     : natural;
1476
        pvalue    : natural;
1477
        lpm_hint  : string := "UNUSED";
1478
        lpm_type  : string := "a_graycounter" );
1479
    port (
1480
        clock   : in std_logic;
1481
        clk_en  : in std_logic := '1';
1482
        cnt_en  : in std_logic := '1';
1483
        updown  : in std_logic := '1';
1484
        aclr    : in std_logic := '0';
1485
        sclr    : in std_logic := '0';
1486
        qbin    : out std_logic_vector(width-1 downto 0);
1487
        q       : out std_logic_vector(width-1 downto 0) );
1488
end component;
1489
 
1490
component altsquare
1491
    generic (
1492
        data_width     :    natural;
1493
        pipeline       :    natural;
1494
        representation :    string := "UNSIGNED";
1495
        result_alignment :  string := "LSB";
1496
        result_width   :    natural;
1497
        lpm_hint       :    string := "UNUSED";
1498
        lpm_type       :    string := "altsquare"
1499
    );
1500
    port(
1501
        aclr    :   in std_logic := '0';
1502
        clock   :   in std_logic := '1';
1503
        data    :   in std_logic_vector(data_width-1 downto 0);
1504
        ena     :   in std_logic := '1';
1505
        result  :   out std_logic_vector(result_width-1 downto 0)
1506
    );
1507
end component;
1508
 
1509
component sld_virtual_jtag
1510
    generic (
1511
        lpm_type                : string;
1512
        lpm_hint                : string;
1513
        sld_auto_instance_index : string;
1514
        sld_instance_index      : integer;
1515
        sld_ir_width            : integer;
1516
        sld_sim_n_scan          : integer;
1517
        sld_sim_total_length    : integer;
1518
        sld_sim_action          : string);
1519
    port (
1520
        tdo   : in  std_logic := '0';
1521
        ir_out : in  std_logic_vector(sld_ir_width - 1 downto 0) := (others => '0');
1522
        tck                : out std_logic;
1523
        tdi                : out std_logic;
1524
        ir_in              : out std_logic_vector(sld_ir_width - 1 downto 0);
1525
        virtual_state_cdr  : out std_logic;
1526
        virtual_state_sdr  : out std_logic;
1527
        virtual_state_e1dr : out std_logic;
1528
        virtual_state_pdr  : out std_logic;
1529
        virtual_state_e2dr : out std_logic;
1530
        virtual_state_udr  : out std_logic;
1531
        virtual_state_cir  : out std_logic;
1532
        virtual_state_uir  : out std_logic;
1533
        jtag_state_tlr     : out std_logic;
1534
        jtag_state_rti     : out std_logic;
1535
        jtag_state_sdrs    : out std_logic;
1536
        jtag_state_cdr     : out std_logic;
1537
        jtag_state_sdr     : out std_logic;
1538
        jtag_state_e1dr    : out std_logic;
1539
        jtag_state_pdr     : out std_logic;
1540
        jtag_state_e2dr    : out std_logic;
1541
        jtag_state_udr     : out std_logic;
1542
        jtag_state_sirs    : out std_logic;
1543
        jtag_state_cir     : out std_logic;
1544
        jtag_state_sir     : out std_logic;
1545
        jtag_state_e1ir    : out std_logic;
1546
        jtag_state_pir     : out std_logic;
1547
        jtag_state_e2ir    : out std_logic;
1548
        jtag_state_uir     : out std_logic;
1549
        tms                : out std_logic);
1550
end component;
1551
 
1552
component sld_virtual_jtag_basic
1553
    generic (
1554
        lpm_type                : string;
1555
        lpm_hint                : string;
1556
        sld_mfg_id              : natural range 0 to 2047;
1557
        sld_type_id             : natural range 0 to 255;
1558
        sld_version             : natural range 0 to 31;
1559
        sld_auto_instance_index : string;
1560
        sld_instance_index      : integer;
1561
        sld_ir_width            : integer;
1562
        sld_sim_n_scan          : integer;
1563
        sld_sim_total_length    : integer;
1564
        sld_sim_action          : string);
1565
    port (
1566
        tdo                : in  std_logic                                   := '0';
1567
        ir_out             : in  std_logic_vector(sld_ir_width - 1 downto 0) := (others => '0');
1568
        tck                : out std_logic;
1569
        tdi                : out std_logic;
1570
        ir_in              : out std_logic_vector(sld_ir_width - 1 downto 0);
1571
        virtual_state_cdr  : out std_logic;
1572
        virtual_state_sdr  : out std_logic;
1573
        virtual_state_e1dr : out std_logic;
1574
        virtual_state_pdr  : out std_logic;
1575
        virtual_state_e2dr : out std_logic;
1576
        virtual_state_udr  : out std_logic;
1577
        virtual_state_cir  : out std_logic;
1578
        virtual_state_uir  : out std_logic;
1579
        jtag_state_tlr     : out std_logic;
1580
        jtag_state_rti     : out std_logic;
1581
        jtag_state_sdrs    : out std_logic;
1582
        jtag_state_cdr     : out std_logic;
1583
        jtag_state_sdr     : out std_logic;
1584
        jtag_state_e1dr    : out std_logic;
1585
        jtag_state_pdr     : out std_logic;
1586
        jtag_state_e2dr    : out std_logic;
1587
        jtag_state_udr     : out std_logic;
1588
        jtag_state_sirs    : out std_logic;
1589
        jtag_state_cir     : out std_logic;
1590
        jtag_state_sir     : out std_logic;
1591
        jtag_state_e1ir    : out std_logic;
1592
        jtag_state_pir     : out std_logic;
1593
        jtag_state_e2ir    : out std_logic;
1594
        jtag_state_uir     : out std_logic;
1595
        tms                : out std_logic);
1596
end component;
1597
 
1598
component altera_std_synchronizer
1599
    generic
1600
    (
1601
            depth : integer := 3
1602
    );
1603
 
1604
    port
1605
    (
1606
            clk     : in  std_logic;
1607
            reset_n : in  std_logic;
1608
            din     : in  std_logic;
1609
            dout    : out std_logic
1610
    );
1611
end component;
1612
 
1613
component altera_std_synchronizer_bundle
1614
    generic
1615
    (
1616
            depth : integer := 3;
1617
            width : integer := 1
1618
    );
1619
 
1620
    port
1621
    (
1622
            clk     : in  std_logic;
1623
            reset_n : in  std_logic;
1624
            din     : in  std_logic_vector(width-1 downto 0);
1625
            dout    : out std_logic_vector(width-1 downto 0)
1626
    );
1627
end component;
1628
 
1629
component alt_cal
1630
        generic (
1631
            number_of_channels          :  integer := 1;
1632
            channel_address_width       :  integer := 1;
1633
            sim_model_mode              :  string  := "TRUE";
1634
            lpm_hint                    :  string  := "UNUSED";
1635
            lpm_type                    :  string  := "alt_cal"
1636
        );
1637
        PORT
1638
        (
1639
            busy   :       OUT  STD_LOGIC;
1640
            cal_error      :       OUT  STD_LOGIC_VECTOR (0 DOWNTO 0);
1641
            clock  :       IN  STD_LOGIC;
1642
            dprio_addr     :       OUT  STD_LOGIC_VECTOR (15 DOWNTO 0);
1643
            dprio_busy     :       IN  STD_LOGIC;
1644
            dprio_datain   :       IN  STD_LOGIC_VECTOR (15 DOWNTO 0);
1645
            dprio_dataout  :       OUT  STD_LOGIC_VECTOR (15 DOWNTO 0);
1646
            dprio_rden     :       OUT  STD_LOGIC;
1647
            dprio_wren     :       OUT  STD_LOGIC;
1648
            quad_addr      :       OUT  STD_LOGIC_VECTOR (6 DOWNTO 0);
1649
            remap_addr     :       IN  STD_LOGIC_VECTOR (9 DOWNTO 0) := (OTHERS => '0');
1650
            reset  :       IN  STD_LOGIC := '0';
1651
            retain_addr    :       OUT  STD_LOGIC_VECTOR (0 DOWNTO 0);
1652
            start  :       IN  STD_LOGIC := '0';
1653
            testbuses      :       IN  STD_LOGIC_VECTOR (4 * number_of_channels - 1 DOWNTO 0) := (OTHERS => '0')
1654
        );
1655
end component;
1656
 
1657
component alt_cal_c3gxb
1658
        generic (
1659
            number_of_channels          :  integer := 1;
1660
            channel_address_width       :  integer := 1;
1661
            sim_model_mode              :  string  := "TRUE";
1662
            lpm_hint                    :  string  := "UNUSED";
1663
            lpm_type                    :  string  := "alt_cal_c3gxb"
1664
        );
1665
        PORT
1666
        (
1667
            busy   :       OUT  STD_LOGIC;
1668
            cal_error      :       OUT  STD_LOGIC_VECTOR (0 DOWNTO 0);
1669
            clock  :       IN  STD_LOGIC;
1670
            dprio_addr     :       OUT  STD_LOGIC_VECTOR (15 DOWNTO 0);
1671
            dprio_busy     :       IN  STD_LOGIC;
1672
            dprio_datain   :       IN  STD_LOGIC_VECTOR (15 DOWNTO 0);
1673
            dprio_dataout  :       OUT  STD_LOGIC_VECTOR (15 DOWNTO 0);
1674
            dprio_rden     :       OUT  STD_LOGIC;
1675
            dprio_wren     :       OUT  STD_LOGIC;
1676
            quad_addr      :       OUT  STD_LOGIC_VECTOR (6 DOWNTO 0);
1677
            remap_addr     :       IN  STD_LOGIC_VECTOR (9 DOWNTO 0) := (OTHERS => '0');
1678
            reset  :       IN  STD_LOGIC := '0';
1679
            retain_addr    :       OUT  STD_LOGIC_VECTOR (0 DOWNTO 0);
1680
            start  :       IN  STD_LOGIC := '0';
1681
            testbuses      :       IN  STD_LOGIC_VECTOR (number_of_channels - 1 DOWNTO 0) := (OTHERS => '0')
1682
        );
1683
end component;
1684
 
1685
 
1686
 
1687
 
1688
 
1689
 
1690
 
1691
    constant    ELA_STATUS_BITS    :    natural    :=    4;
1692
    constant    N_ELA_INSTRS    :    natural    :=    8;
1693
    constant    SLD_IR_BITS    :    natural    :=    N_ELA_INSTRS;
1694
 
1695
component    sld_signaltap
1696
    generic    (
1697
        SLD_CURRENT_RESOURCE_WIDTH    :    natural    :=    0;
1698
        SLD_INVERSION_MASK    :    std_logic_vector    :=    "0";
1699
        SLD_POWER_UP_TRIGGER    :    natural    :=    0;
1700
        SLD_ADVANCED_TRIGGER_6    :    string    :=    "NONE";
1701
        SLD_ADVANCED_TRIGGER_9    :    string    :=    "NONE";
1702
        SLD_ADVANCED_TRIGGER_7    :    string    :=    "NONE";
1703
        SLD_STORAGE_QUALIFIER_ADVANCED_CONDITION_ENTITY    :    string    :=    "basic";
1704
        SLD_STORAGE_QUALIFIER_GAP_RECORD    :    natural    :=    0;
1705
        SLD_INCREMENTAL_ROUTING    :    natural    :=    0;
1706
        SLD_STORAGE_QUALIFIER_PIPELINE    :    natural    :=    0;
1707
        SLD_TRIGGER_IN_ENABLED    :    natural    :=    0;
1708
        SLD_STATE_BITS    :    natural    :=    11;
1709
        SLD_STATE_FLOW_USE_GENERATED    :    natural    :=    0;
1710
        SLD_INVERSION_MASK_LENGTH    :    integer    :=    1;
1711
        SLD_DATA_BITS    :    natural    :=    1;
1712
        SLD_BUFFER_FULL_STOP    :    natural    :=    1;
1713
        SLD_STORAGE_QUALIFIER_INVERSION_MASK_LENGTH    :    natural    :=    0;
1714
        SLD_ATTRIBUTE_MEM_MODE    :    string    :=    "OFF";
1715
        SLD_STORAGE_QUALIFIER_MODE    :    string    :=    "OFF";
1716
        SLD_STATE_FLOW_MGR_ENTITY    :    string    :=    "state_flow_mgr_entity.vhd";
1717
        SLD_NODE_CRC_LOWORD    :    natural    :=    50132;
1718
        SLD_ADVANCED_TRIGGER_5    :    string    :=    "NONE";
1719
        SLD_TRIGGER_BITS    :    natural    :=    1;
1720
        SLD_STORAGE_QUALIFIER_BITS    :    natural    :=    1;
1721
        SLD_ADVANCED_TRIGGER_10    :    string    :=    "NONE";
1722
        SLD_MEM_ADDRESS_BITS    :    natural    :=    7;
1723
        SLD_ADVANCED_TRIGGER_ENTITY    :    string    :=    "basic";
1724
        SLD_ADVANCED_TRIGGER_4    :    string    :=    "NONE";
1725
        SLD_TRIGGER_LEVEL    :    natural    :=    10;
1726
        SLD_ADVANCED_TRIGGER_8    :    string    :=    "NONE";
1727
        SLD_RAM_BLOCK_TYPE    :    string    :=    "AUTO";
1728
        SLD_ADVANCED_TRIGGER_2    :    string    :=    "NONE";
1729
        SLD_ADVANCED_TRIGGER_1    :    string    :=    "NONE";
1730
        SLD_DATA_BIT_CNTR_BITS    :    natural    :=    4;
1731
        lpm_type    :    string    :=    "sld_signaltap";
1732
        SLD_NODE_CRC_BITS    :    natural    :=    32;
1733
        SLD_SAMPLE_DEPTH    :    natural    :=    16;
1734
        SLD_ENABLE_ADVANCED_TRIGGER    :    natural    :=    0;
1735
        SLD_SEGMENT_SIZE    :    natural    :=    0;
1736
        SLD_NODE_INFO    :    natural    :=    0;
1737
        SLD_STORAGE_QUALIFIER_ENABLE_ADVANCED_CONDITION    :    natural    :=    0;
1738
        SLD_NODE_CRC_HIWORD    :    natural    :=    41394;
1739
        SLD_TRIGGER_LEVEL_PIPELINE    :    natural    :=    1;
1740
        SLD_ADVANCED_TRIGGER_3    :    string    :=    "NONE"
1741
    );
1742
    port    (
1743
        jtag_state_sdr    :    in    std_logic    :=    '0';
1744
        ir_out    :    out    std_logic_vector(SLD_IR_BITS-1 downto 0);
1745
        jtag_state_cdr    :    in    std_logic    :=    '0';
1746
        ir_in    :    in    std_logic_vector(SLD_IR_BITS-1 downto 0)   :=   (others => '0');
1747
        tdi    :    in    std_logic    :=    '0';
1748
        acq_trigger_out    :    out    std_logic_vector(SLD_TRIGGER_BITS-1 downto 0);
1749
        jtag_state_uir    :    in    std_logic    :=    '0';
1750
        acq_trigger_in    :    in    std_logic_vector(SLD_TRIGGER_BITS-1 downto 0)   :=   (others => '0');
1751
        trigger_out    :    out    std_logic;
1752
        storage_enable    :    in    std_logic    :=    '0';
1753
        acq_data_out    :    out    std_logic_vector(SLD_DATA_BITS-1 downto 0);
1754
        acq_data_in    :    in    std_logic_vector(SLD_DATA_BITS-1 downto 0)   :=   (others => '0');
1755
        acq_storage_qualifier_in    :    in    std_logic_vector(SLD_STORAGE_QUALIFIER_BITS-1 downto 0)   :=   (others => '0');
1756
        jtag_state_udr    :    in    std_logic    :=    '0';
1757
        tdo    :    out    std_logic;
1758
        crc    :    in    std_logic_vector(SLD_NODE_CRC_BITS-1 downto 0)   :=   (others => '0');
1759
        jtag_state_e1dr    :    in    std_logic    :=    '0';
1760
        raw_tck    :    in    std_logic    :=    '0';
1761
        usr1    :    in    std_logic    :=    '0';
1762
        acq_clk    :    in    std_logic;
1763
        shift    :    in    std_logic    :=    '0';
1764
        ena    :    in    std_logic    :=    '0';
1765
        clr    :    in    std_logic    :=    '0';
1766
        trigger_in    :    in    std_logic    :=    '0';
1767
        update    :    in    std_logic    :=    '0';
1768
        rti    :    in    std_logic    :=    '0'
1769
    );
1770
end component; --sld_signaltap
1771
 
1772
 
1773
component    altstratixii_oct
1774
    generic    (
1775
        lpm_type    :    string    :=    "altstratixii_oct"
1776
    );
1777
    port    (
1778
        terminationenable    :    in    std_logic;
1779
        terminationclock    :    in    std_logic;
1780
        rdn    :    in    std_logic;
1781
        rup    :    in    std_logic
1782
    );
1783
end component; --altstratixii_oct
1784
 
1785
    constant    TOP_PFL_IR_BITS    :    natural    :=    5;
1786
    constant    N_FLASH_BITS    :    natural    :=    4;
1787
 
1788
component    altparallel_flash_loader
1789
    generic    (
1790
        flash_nreset_counter    :    natural    :=    1;
1791
        flash_data_width    :    natural    :=    16;
1792
        normal_mode    :    natural    :=    1;
1793
        fifo_size    :    natural    :=    16;
1794
        safe_mode_revert    :    natural    :=    0;
1795
        dclk_divisor    :    natural    :=    1;
1796
        config_wait_timer_width    :    natural    :=    14;
1797
        flash_nreset_checkbox    :    natural    :=    0;
1798
        safe_mode_retry    :    natural    :=    1;
1799
        features_cfg    :    natural    :=    1;
1800
        burst_mode_numonyx    :    natural    :=    0;
1801
        burst_mode_intel    :    natural    :=    0;
1802
        burst_mode    :    natural    :=    0;
1803
        clk_divisor    :    natural    :=    1;
1804
        addr_width    :    natural    :=    20;
1805
        option_bits_start_address    :    natural    :=    0;
1806
        safe_mode_revert_addr    :    natural    :=    0;
1807
        enhanced_flash_programming    :    natural    :=    0;
1808
        page_mode    :    natural    :=    0;
1809
        lpm_type    :    string    :=    "ALTPARALLEL_FLASH_LOADER";
1810
        features_pgm    :    natural    :=    1;
1811
        n_flash    :    natural    :=    1;
1812
        burst_mode_spansion    :    natural    :=    0;
1813
        auto_restart    :    STRING    :=    "OFF";
1814
        page_clk_divisor    :    natural    :=    1;
1815
        conf_data_width    :    natural    :=    1;
1816
        TRISTATE_CHECKBOX    :    natural    :=    0;
1817
        safe_mode_halt    :    natural    :=    0
1818
    );
1819
    port    (
1820
        fpga_data    :    out    std_logic_vector(conf_data_width-1 downto 0);
1821
        fpga_dclk    :    out    std_logic;
1822
        flash_nce    :    out    std_logic;
1823
        fpga_nstatus    :    in    std_logic    :=    '0';
1824
        pfl_clk    :    in    std_logic    :=    '0';
1825
        fpga_nconfig    :    out    std_logic;
1826
        flash_noe    :    out    std_logic;
1827
        flash_nwe    :    out    std_logic;
1828
        fpga_conf_done    :    in    std_logic    :=    '0';
1829
        pfl_flash_access_granted    :    in    std_logic    :=    '0';
1830
        pfl_nreconfigure    :    in    std_logic    :=    '1';
1831
        flash_nreset    :    out    std_logic;
1832
        pfl_nreset    :    in    std_logic    :=    '0';
1833
        flash_data    :    inout    std_logic_vector(flash_data_width-1 downto 0);
1834
        flash_nadv    :    out    std_logic;
1835
        flash_clk    :    out    std_logic;
1836
        flash_addr    :    out    std_logic_vector(addr_width-1 downto 0);
1837
        pfl_flash_access_request    :    out    std_logic;
1838
        fpga_pgm    :    in    std_logic_vector(2 downto 0)   :=   (others => '0')
1839
    );
1840
end component; --altparallel_flash_loader
1841
 
1842
 
1843
component    altserial_flash_loader
1844
    generic    (
1845
        enhanced_mode    :    natural    :=    0;
1846
        intended_device_family    :    STRING    :=    "Cyclone";
1847
        enable_shared_access    :    STRING    :=    "OFF";
1848
        lpm_type    :    STRING    :=    "ALTSERIAL_FLASH_LOADER"
1849
    );
1850
    port    (
1851
        noe    :    in    std_logic    :=    '0';
1852
        asmi_access_granted    :    in    std_logic    :=    '1';
1853
        sdoin    :    in    std_logic    :=    '0';
1854
        asmi_access_request    :    out    std_logic;
1855
        data0out    :    out    std_logic;
1856
        scein    :    in    std_logic    :=    '0';
1857
        dclkin    :    in    std_logic    :=    '0'
1858
    );
1859
end component; --altserial_flash_loader
1860
 
1861
 
1862
component    altsource_probe
1863
    generic    (
1864
        probe_width    :    natural    :=    1;
1865
        lpm_hint    :    string    :=    "UNUSED";
1866
        source_width    :    natural    :=    1;
1867
        instance_id    :    string    :=    "UNUSED";
1868
        sld_instance_index    :    natural    :=    0;
1869
        source_initial_value    :    string    :=    "0";
1870
        sld_ir_width    :    natural    :=    4;
1871
        lpm_type    :    string    :=    "altsource_probe";
1872
        sld_auto_instance_index    :    string    :=    "YES";
1873
        SLD_NODE_INFO    :    natural    :=    4746752;
1874
        enable_metastability    :    string    :=    "NO"
1875
    );
1876
    port    (
1877
        jtag_state_sdr    :    in    std_logic;
1878
        source    :    out    std_logic_vector(source_width-1 downto 0);
1879
        ir_out    :    out    std_logic_vector(sld_ir_width-1 downto 0);
1880
        jtag_state_cdr    :    in    std_logic;
1881
        ir_in    :    in    std_logic_vector(sld_ir_width-1 downto 0);
1882
        jtag_state_tlr    :    in    std_logic;
1883
        tdi    :    in    std_logic;
1884
        jtag_state_uir    :    in    std_logic;
1885
        source_ena    :    in    std_logic;
1886
        jtag_state_cir    :    in    std_logic;
1887
        jtag_state_udr    :    in    std_logic;
1888
        tdo    :    out    std_logic;
1889
        clrn    :    in    std_logic;
1890
        jtag_state_e1dr    :    in    std_logic;
1891
        source_clk    :    in    std_logic;
1892
        raw_tck    :    in    std_logic;
1893
        usr1    :    in    std_logic;
1894
        ena    :    in    std_logic;
1895
        probe    :    in    std_logic_vector(probe_width-1 downto 0)
1896
    );
1897
end component; --altsource_probe
1898
 
1899
end altera_mf_components;

powered by: WebSVN 2.1.0

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