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

Subversion Repositories pcie_sg_dma

[/] [pcie_sg_dma/] [branches/] [Virtex6/] [ML605_ISE12.3/] [MyUserLogic/] [top_level_1_PCIe_UserLogic_00_USER_LOGIC/] [synth_model/] [user_logic.vhd] - Blame information for rev 11

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 11 barabba
--------------------------------------------------------------------------------
2
--     This file is owned and controlled by Xilinx and must be used           --
3
--     solely for design, simulation, implementation and creation of          --
4
--     design files limited to Xilinx devices or technologies. Use            --
5
--     with non-Xilinx devices or technologies is expressly prohibited        --
6
--     and immediately terminates your license.                               --
7
--                                                                            --
8
--     XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION "AS IS"          --
9
--     SOLELY FOR USE IN DEVELOPING PROGRAMS AND SOLUTIONS FOR                --
10
--     XILINX DEVICES.  BY PROVIDING THIS DESIGN, CODE, OR INFORMATION        --
11
--     AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, APPLICATION            --
12
--     OR STANDARD, XILINX IS MAKING NO REPRESENTATION THAT THIS              --
13
--     IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT,                --
14
--     AND YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE       --
15
--     FOR YOUR IMPLEMENTATION.  XILINX EXPRESSLY DISCLAIMS ANY               --
16
--     WARRANTY WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE                --
17
--     IMPLEMENTATION, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR         --
18
--     REPRESENTATIONS THAT THIS IMPLEMENTATION IS FREE FROM CLAIMS OF        --
19
--     INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS        --
20
--     FOR A PARTICULAR PURPOSE.                                              --
21
--                                                                            --
22
--     Xilinx products are not intended for use in life support               --
23
--     appliances, devices, or systems. Use in such applications are          --
24
--     expressly prohibited.                                                  --
25
--                                                                            --
26
--     (c) Copyright 1995-2009 Xilinx, Inc.                                   --
27
--     All rights reserved.                                                   --
28
--------------------------------------------------------------------------------
29
-- You must compile the wrapper file cntr_11_0_1a411d6ef586e892.vhd when simulating
30
-- the core, cntr_11_0_1a411d6ef586e892. When compiling the wrapper file, be sure to
31
-- reference the XilinxCoreLib VHDL simulation library. For detailed
32
-- instructions, please refer to the "CORE Generator Help".
33
 
34
-- The synthesis directives "translate_off/translate_on" specified
35
-- below are supported by Xilinx, Mentor Graphics and Synplicity
36
-- synthesis tools. Ensure they are correct for your synthesis tool(s).
37
 
38
LIBRARY ieee;
39
USE ieee.std_logic_1164.ALL;
40
-- synthesis translate_off
41
Library XilinxCoreLib;
42
-- synthesis translate_on
43
ENTITY cntr_11_0_1a411d6ef586e892 IS
44
        port (
45
        clk: IN std_logic;
46
        ce: IN std_logic;
47
        sinit: IN std_logic;
48
        q: OUT std_logic_VECTOR(11 downto 0));
49
END cntr_11_0_1a411d6ef586e892;
50
 
51
ARCHITECTURE cntr_11_0_1a411d6ef586e892_a OF cntr_11_0_1a411d6ef586e892 IS
52
-- synthesis translate_off
53
component wrapped_cntr_11_0_1a411d6ef586e892
54
        port (
55
        clk: IN std_logic;
56
        ce: IN std_logic;
57
        sinit: IN std_logic;
58
        q: OUT std_logic_VECTOR(11 downto 0));
59
end component;
60
 
61
-- Configuration specification 
62
        for all : wrapped_cntr_11_0_1a411d6ef586e892 use entity XilinxCoreLib.c_counter_binary_v11_0(behavioral)
63
                generic map(
64
                        c_count_mode => 0,
65
                        c_load_low => 0,
66
                        c_count_to => "1",
67
                        c_implementation => 0,
68
                        c_has_sclr => 0,
69
                        c_ce_overrides_sync => 0,
70
                        c_restrict_count => 0,
71
                        c_width => 12,
72
                        c_verbosity => 0,
73
                        c_has_load => 0,
74
                        c_latency => 1,
75
                        c_has_thresh0 => 0,
76
                        c_ainit_val => "0",
77
                        c_has_ce => 1,
78
                        c_sclr_overrides_sset => 1,
79
                        c_fb_latency => 0,
80
                        c_sinit_val => "0",
81
                        c_has_sset => 0,
82
                        c_has_sinit => 1,
83
                        c_count_by => "1",
84
                        c_xdevicefamily => "virtex6",
85
                        c_thresh0_value => "1");
86
-- synthesis translate_on
87
BEGIN
88
-- synthesis translate_off
89
U0 : wrapped_cntr_11_0_1a411d6ef586e892
90
                port map (
91
                        clk => clk,
92
                        ce => ce,
93
                        sinit => sinit,
94
                        q => q);
95
-- synthesis translate_on
96
 
97
END cntr_11_0_1a411d6ef586e892_a;
98
 
99
 
100
-------------------------------------------------------------------
101
-- System Generator version 12.3 VHDL source file.
102
--
103
-- Copyright(C) 2010 by Xilinx, Inc.  All rights reserved.  This
104
-- text/file contains proprietary, confidential information of Xilinx,
105
-- Inc., is distributed under license from Xilinx, Inc., and may be used,
106
-- copied and/or disclosed only pursuant to the terms of a valid license
107
-- agreement with Xilinx, Inc.  Xilinx hereby grants you a license to use
108
-- this text/file solely for design, simulation, implementation and
109
-- creation of design files limited to Xilinx devices or technologies.
110
-- Use with non-Xilinx devices or technologies is expressly prohibited
111
-- and immediately terminates your license unless covered by a separate
112
-- agreement.
113
--
114
-- Xilinx is providing this design, code, or information "as is" solely
115
-- for use in developing programs and solutions for Xilinx devices.  By
116
-- providing this design, code, or information as one possible
117
-- implementation of this feature, application or standard, Xilinx is
118
-- making no representation that this implementation is free from any
119
-- claims of infringement.  You are responsible for obtaining any rights
120
-- you may require for your implementation.  Xilinx expressly disclaims
121
-- any warranty whatsoever with respect to the adequacy of the
122
-- implementation, including but not limited to warranties of
123
-- merchantability or fitness for a particular purpose.
124
--
125
-- Xilinx products are not intended for use in life support appliances,
126
-- devices, or systems.  Use in such applications is expressly prohibited.
127
--
128
-- Any modifications that are made to the source code are done at the user's
129
-- sole risk and will be unsupported.
130
--
131
-- This copyright and support notice must be retained as part of this
132
-- text at all times.  (c) Copyright 1995-2010 Xilinx, Inc.  All rights
133
-- reserved.
134
-------------------------------------------------------------------
135
library IEEE;
136
use IEEE.std_logic_1164.all;
137
use IEEE.numeric_std.all;
138
package conv_pkg is
139
    constant simulating : boolean := false
140
      -- synopsys translate_off
141
        or true
142
      -- synopsys translate_on
143
    ;
144
    constant xlUnsigned : integer := 1;
145
    constant xlSigned : integer := 2;
146
    constant xlWrap : integer := 1;
147
    constant xlSaturate : integer := 2;
148
    constant xlTruncate : integer := 1;
149
    constant xlRound : integer := 2;
150
    constant xlRoundBanker : integer := 3;
151
    constant xlAddMode : integer := 1;
152
    constant xlSubMode : integer := 2;
153
    attribute black_box : boolean;
154
    attribute syn_black_box : boolean;
155
    attribute fpga_dont_touch: string;
156
    attribute box_type :  string;
157
    attribute keep : string;
158
    attribute syn_keep : boolean;
159
    function std_logic_vector_to_unsigned(inp : std_logic_vector) return unsigned;
160
    function unsigned_to_std_logic_vector(inp : unsigned) return std_logic_vector;
161
    function std_logic_vector_to_signed(inp : std_logic_vector) return signed;
162
    function signed_to_std_logic_vector(inp : signed) return std_logic_vector;
163
    function unsigned_to_signed(inp : unsigned) return signed;
164
    function signed_to_unsigned(inp : signed) return unsigned;
165
    function pos(inp : std_logic_vector; arith : INTEGER) return boolean;
166
    function all_same(inp: std_logic_vector) return boolean;
167
    function all_zeros(inp: std_logic_vector) return boolean;
168
    function is_point_five(inp: std_logic_vector) return boolean;
169
    function all_ones(inp: std_logic_vector) return boolean;
170
    function convert_type (inp : std_logic_vector; old_width, old_bin_pt,
171
                           old_arith, new_width, new_bin_pt, new_arith,
172
                           quantization, overflow : INTEGER)
173
        return std_logic_vector;
174
    function cast (inp : std_logic_vector; old_bin_pt,
175
                   new_width, new_bin_pt, new_arith : INTEGER)
176
        return std_logic_vector;
177
    function vec_slice (inp : std_logic_vector; upper, lower : INTEGER)
178
        return std_logic_vector;
179
    function s2u_slice (inp : signed; upper, lower : INTEGER)
180
        return unsigned;
181
    function u2u_slice (inp : unsigned; upper, lower : INTEGER)
182
        return unsigned;
183
    function s2s_cast (inp : signed; old_bin_pt,
184
                   new_width, new_bin_pt : INTEGER)
185
        return signed;
186
    function u2s_cast (inp : unsigned; old_bin_pt,
187
                   new_width, new_bin_pt : INTEGER)
188
        return signed;
189
    function s2u_cast (inp : signed; old_bin_pt,
190
                   new_width, new_bin_pt : INTEGER)
191
        return unsigned;
192
    function u2u_cast (inp : unsigned; old_bin_pt,
193
                   new_width, new_bin_pt : INTEGER)
194
        return unsigned;
195
    function u2v_cast (inp : unsigned; old_bin_pt,
196
                   new_width, new_bin_pt : INTEGER)
197
        return std_logic_vector;
198
    function s2v_cast (inp : signed; old_bin_pt,
199
                   new_width, new_bin_pt : INTEGER)
200
        return std_logic_vector;
201
    function trunc (inp : std_logic_vector; old_width, old_bin_pt, old_arith,
202
                    new_width, new_bin_pt, new_arith : INTEGER)
203
        return std_logic_vector;
204
    function round_towards_inf (inp : std_logic_vector; old_width, old_bin_pt,
205
                                old_arith, new_width, new_bin_pt,
206
                                new_arith : INTEGER) return std_logic_vector;
207
    function round_towards_even (inp : std_logic_vector; old_width, old_bin_pt,
208
                                old_arith, new_width, new_bin_pt,
209
                                new_arith : INTEGER) return std_logic_vector;
210
    function max_signed(width : INTEGER) return std_logic_vector;
211
    function min_signed(width : INTEGER) return std_logic_vector;
212
    function saturation_arith(inp:  std_logic_vector;  old_width, old_bin_pt,
213
                              old_arith, new_width, new_bin_pt, new_arith
214
                              : INTEGER) return std_logic_vector;
215
    function wrap_arith(inp:  std_logic_vector;  old_width, old_bin_pt,
216
                        old_arith, new_width, new_bin_pt, new_arith : INTEGER)
217
                        return std_logic_vector;
218
    function fractional_bits(a_bin_pt, b_bin_pt: INTEGER) return INTEGER;
219
    function integer_bits(a_width, a_bin_pt, b_width, b_bin_pt: INTEGER)
220
        return INTEGER;
221
    function sign_ext(inp : std_logic_vector; new_width : INTEGER)
222
        return std_logic_vector;
223
    function zero_ext(inp : std_logic_vector; new_width : INTEGER)
224
        return std_logic_vector;
225
    function zero_ext(inp : std_logic; new_width : INTEGER)
226
        return std_logic_vector;
227
    function extend_MSB(inp : std_logic_vector; new_width, arith : INTEGER)
228
        return std_logic_vector;
229
    function align_input(inp : std_logic_vector; old_width, delta, new_arith,
230
                          new_width: INTEGER)
231
        return std_logic_vector;
232
    function pad_LSB(inp : std_logic_vector; new_width: integer)
233
        return std_logic_vector;
234
    function pad_LSB(inp : std_logic_vector; new_width, arith : integer)
235
        return std_logic_vector;
236
    function max(L, R: INTEGER) return INTEGER;
237
    function min(L, R: INTEGER) return INTEGER;
238
    function "="(left,right: STRING) return boolean;
239
    function boolean_to_signed (inp : boolean; width: integer)
240
        return signed;
241
    function boolean_to_unsigned (inp : boolean; width: integer)
242
        return unsigned;
243
    function boolean_to_vector (inp : boolean)
244
        return std_logic_vector;
245
    function std_logic_to_vector (inp : std_logic)
246
        return std_logic_vector;
247
    function integer_to_std_logic_vector (inp : integer;  width, arith : integer)
248
        return std_logic_vector;
249
    function std_logic_vector_to_integer (inp : std_logic_vector;  arith : integer)
250
        return integer;
251
    function std_logic_to_integer(constant inp : std_logic := '0')
252
        return integer;
253
    function bin_string_element_to_std_logic_vector (inp : string;  width, index : integer)
254
        return std_logic_vector;
255
    function bin_string_to_std_logic_vector (inp : string)
256
        return std_logic_vector;
257
    function hex_string_to_std_logic_vector (inp : string; width : integer)
258
        return std_logic_vector;
259
    function makeZeroBinStr (width : integer) return STRING;
260
    function and_reduce(inp: std_logic_vector) return std_logic;
261
    -- synopsys translate_off
262
    function is_binary_string_invalid (inp : string)
263
        return boolean;
264
    function is_binary_string_undefined (inp : string)
265
        return boolean;
266
    function is_XorU(inp : std_logic_vector)
267
        return boolean;
268
    function to_real(inp : std_logic_vector; bin_pt : integer; arith : integer)
269
        return real;
270
    function std_logic_to_real(inp : std_logic; bin_pt : integer; arith : integer)
271
        return real;
272
    function real_to_std_logic_vector (inp : real;  width, bin_pt, arith : integer)
273
        return std_logic_vector;
274
    function real_string_to_std_logic_vector (inp : string;  width, bin_pt, arith : integer)
275
        return std_logic_vector;
276
    constant display_precision : integer := 20;
277
    function real_to_string (inp : real) return string;
278
    function valid_bin_string(inp : string) return boolean;
279
    function std_logic_vector_to_bin_string(inp : std_logic_vector) return string;
280
    function std_logic_to_bin_string(inp : std_logic) return string;
281
    function std_logic_vector_to_bin_string_w_point(inp : std_logic_vector; bin_pt : integer)
282
        return string;
283
    function real_to_bin_string(inp : real;  width, bin_pt, arith : integer)
284
        return string;
285
    type stdlogic_to_char_t is array(std_logic) of character;
286
    constant to_char : stdlogic_to_char_t := (
287
        'U' => 'U',
288
        'X' => 'X',
289
        '0' => '0',
290
        '1' => '1',
291
        'Z' => 'Z',
292
        'W' => 'W',
293
        'L' => 'L',
294
        'H' => 'H',
295
        '-' => '-');
296
    -- synopsys translate_on
297
end conv_pkg;
298
package body conv_pkg is
299
    function std_logic_vector_to_unsigned(inp : std_logic_vector)
300
        return unsigned
301
    is
302
    begin
303
        return unsigned (inp);
304
    end;
305
    function unsigned_to_std_logic_vector(inp : unsigned)
306
        return std_logic_vector
307
    is
308
    begin
309
        return std_logic_vector(inp);
310
    end;
311
    function std_logic_vector_to_signed(inp : std_logic_vector)
312
        return signed
313
    is
314
    begin
315
        return  signed (inp);
316
    end;
317
    function signed_to_std_logic_vector(inp : signed)
318
        return std_logic_vector
319
    is
320
    begin
321
        return std_logic_vector(inp);
322
    end;
323
    function unsigned_to_signed (inp : unsigned)
324
        return signed
325
    is
326
    begin
327
        return signed(std_logic_vector(inp));
328
    end;
329
    function signed_to_unsigned (inp : signed)
330
        return unsigned
331
    is
332
    begin
333
        return unsigned(std_logic_vector(inp));
334
    end;
335
    function pos(inp : std_logic_vector; arith : INTEGER)
336
        return boolean
337
    is
338
        constant width : integer := inp'length;
339
        variable vec : std_logic_vector(width-1 downto 0);
340
    begin
341
        vec := inp;
342
        if arith = xlUnsigned then
343
            return true;
344
        else
345
            if vec(width-1) = '0' then
346
                return true;
347
            else
348
                return false;
349
            end if;
350
        end if;
351
        return true;
352
    end;
353
    function max_signed(width : INTEGER)
354
        return std_logic_vector
355
    is
356
        variable ones : std_logic_vector(width-2 downto 0);
357
        variable result : std_logic_vector(width-1 downto 0);
358
    begin
359
        ones := (others => '1');
360
        result(width-1) := '0';
361
        result(width-2 downto 0) := ones;
362
        return result;
363
    end;
364
    function min_signed(width : INTEGER)
365
        return std_logic_vector
366
    is
367
        variable zeros : std_logic_vector(width-2 downto 0);
368
        variable result : std_logic_vector(width-1 downto 0);
369
    begin
370
        zeros := (others => '0');
371
        result(width-1) := '1';
372
        result(width-2 downto 0) := zeros;
373
        return result;
374
    end;
375
    function and_reduce(inp: std_logic_vector) return std_logic
376
    is
377
        variable result: std_logic;
378
        constant width : integer := inp'length;
379
        variable vec : std_logic_vector(width-1 downto 0);
380
    begin
381
        vec := inp;
382
        result := vec(0);
383
        if width > 1 then
384
            for i in 1 to width-1 loop
385
                result := result and vec(i);
386
            end loop;
387
        end if;
388
        return result;
389
    end;
390
    function all_same(inp: std_logic_vector) return boolean
391
    is
392
        variable result: boolean;
393
        constant width : integer := inp'length;
394
        variable vec : std_logic_vector(width-1 downto 0);
395
    begin
396
        vec := inp;
397
        result := true;
398
        if width > 0 then
399
            for i in 1 to width-1 loop
400
                if vec(i) /= vec(0) then
401
                    result := false;
402
                end if;
403
            end loop;
404
        end if;
405
        return result;
406
    end;
407
    function all_zeros(inp: std_logic_vector)
408
        return boolean
409
    is
410
        constant width : integer := inp'length;
411
        variable vec : std_logic_vector(width-1 downto 0);
412
        variable zero : std_logic_vector(width-1 downto 0);
413
        variable result : boolean;
414
    begin
415
        zero := (others => '0');
416
        vec := inp;
417
        -- synopsys translate_off
418
        if (is_XorU(vec)) then
419
            return false;
420
        end if;
421
         -- synopsys translate_on
422
        if (std_logic_vector_to_unsigned(vec) = std_logic_vector_to_unsigned(zero)) then
423
            result := true;
424
        else
425
            result := false;
426
        end if;
427
        return result;
428
    end;
429
    function is_point_five(inp: std_logic_vector)
430
        return boolean
431
    is
432
        constant width : integer := inp'length;
433
        variable vec : std_logic_vector(width-1 downto 0);
434
        variable result : boolean;
435
    begin
436
        vec := inp;
437
        -- synopsys translate_off
438
        if (is_XorU(vec)) then
439
            return false;
440
        end if;
441
         -- synopsys translate_on
442
        if (width > 1) then
443
           if ((vec(width-1) = '1') and (all_zeros(vec(width-2 downto 0)) = true)) then
444
               result := true;
445
           else
446
               result := false;
447
           end if;
448
        else
449
           if (vec(width-1) = '1') then
450
               result := true;
451
           else
452
               result := false;
453
           end if;
454
        end if;
455
        return result;
456
    end;
457
    function all_ones(inp: std_logic_vector)
458
        return boolean
459
    is
460
        constant width : integer := inp'length;
461
        variable vec : std_logic_vector(width-1 downto 0);
462
        variable one : std_logic_vector(width-1 downto 0);
463
        variable result : boolean;
464
    begin
465
        one := (others => '1');
466
        vec := inp;
467
        -- synopsys translate_off
468
        if (is_XorU(vec)) then
469
            return false;
470
        end if;
471
         -- synopsys translate_on
472
        if (std_logic_vector_to_unsigned(vec) = std_logic_vector_to_unsigned(one)) then
473
            result := true;
474
        else
475
            result := false;
476
        end if;
477
        return result;
478
    end;
479
    function full_precision_num_width(quantization, overflow, old_width,
480
                                      old_bin_pt, old_arith,
481
                                      new_width, new_bin_pt, new_arith : INTEGER)
482
        return integer
483
    is
484
        variable result : integer;
485
    begin
486
        result := old_width + 2;
487
        return result;
488
    end;
489
    function quantized_num_width(quantization, overflow, old_width, old_bin_pt,
490
                                 old_arith, new_width, new_bin_pt, new_arith
491
                                 : INTEGER)
492
        return integer
493
    is
494
        variable right_of_dp, left_of_dp, result : integer;
495
    begin
496
        right_of_dp := max(new_bin_pt, old_bin_pt);
497
        left_of_dp := max((new_width - new_bin_pt), (old_width - old_bin_pt));
498
        result := (old_width + 2) + (new_bin_pt - old_bin_pt);
499
        return result;
500
    end;
501
    function convert_type (inp : std_logic_vector; old_width, old_bin_pt,
502
                           old_arith, new_width, new_bin_pt, new_arith,
503
                           quantization, overflow : INTEGER)
504
        return std_logic_vector
505
    is
506
        constant fp_width : integer :=
507
            full_precision_num_width(quantization, overflow, old_width,
508
                                     old_bin_pt, old_arith, new_width,
509
                                     new_bin_pt, new_arith);
510
        constant fp_bin_pt : integer := old_bin_pt;
511
        constant fp_arith : integer := old_arith;
512
        variable full_precision_result : std_logic_vector(fp_width-1 downto 0);
513
        constant q_width : integer :=
514
            quantized_num_width(quantization, overflow, old_width, old_bin_pt,
515
                                old_arith, new_width, new_bin_pt, new_arith);
516
        constant q_bin_pt : integer := new_bin_pt;
517
        constant q_arith : integer := old_arith;
518
        variable quantized_result : std_logic_vector(q_width-1 downto 0);
519
        variable result : std_logic_vector(new_width-1 downto 0);
520
    begin
521
        result := (others => '0');
522
        full_precision_result := cast(inp, old_bin_pt, fp_width, fp_bin_pt,
523
                                      fp_arith);
524
        if (quantization = xlRound) then
525
            quantized_result := round_towards_inf(full_precision_result,
526
                                                  fp_width, fp_bin_pt,
527
                                                  fp_arith, q_width, q_bin_pt,
528
                                                  q_arith);
529
        elsif (quantization = xlRoundBanker) then
530
            quantized_result := round_towards_even(full_precision_result,
531
                                                  fp_width, fp_bin_pt,
532
                                                  fp_arith, q_width, q_bin_pt,
533
                                                  q_arith);
534
        else
535
            quantized_result := trunc(full_precision_result, fp_width, fp_bin_pt,
536
                                      fp_arith, q_width, q_bin_pt, q_arith);
537
        end if;
538
        if (overflow = xlSaturate) then
539
            result := saturation_arith(quantized_result, q_width, q_bin_pt,
540
                                       q_arith, new_width, new_bin_pt, new_arith);
541
        else
542
             result := wrap_arith(quantized_result, q_width, q_bin_pt, q_arith,
543
                                  new_width, new_bin_pt, new_arith);
544
        end if;
545
        return result;
546
    end;
547
    function cast (inp : std_logic_vector; old_bin_pt, new_width,
548
                   new_bin_pt, new_arith : INTEGER)
549
        return std_logic_vector
550
    is
551
        constant old_width : integer := inp'length;
552
        constant left_of_dp : integer := (new_width - new_bin_pt)
553
                                         - (old_width - old_bin_pt);
554
        constant right_of_dp : integer := (new_bin_pt - old_bin_pt);
555
        variable vec : std_logic_vector(old_width-1 downto 0);
556
        variable result : std_logic_vector(new_width-1 downto 0);
557
        variable j   : integer;
558
    begin
559
        vec := inp;
560
        for i in new_width-1 downto 0 loop
561
            j := i - right_of_dp;
562
            if ( j > old_width-1) then
563
                if (new_arith = xlUnsigned) then
564
                    result(i) := '0';
565
                else
566
                    result(i) := vec(old_width-1);
567
                end if;
568
            elsif ( j >= 0) then
569
                result(i) := vec(j);
570
            else
571
                result(i) := '0';
572
            end if;
573
        end loop;
574
        return result;
575
    end;
576
    function vec_slice (inp : std_logic_vector; upper, lower : INTEGER)
577
      return std_logic_vector
578
    is
579
    begin
580
        return inp(upper downto lower);
581
    end;
582
    function s2u_slice (inp : signed; upper, lower : INTEGER)
583
      return unsigned
584
    is
585
    begin
586
        return unsigned(vec_slice(std_logic_vector(inp), upper, lower));
587
    end;
588
    function u2u_slice (inp : unsigned; upper, lower : INTEGER)
589
      return unsigned
590
    is
591
    begin
592
        return unsigned(vec_slice(std_logic_vector(inp), upper, lower));
593
    end;
594
    function s2s_cast (inp : signed; old_bin_pt, new_width, new_bin_pt : INTEGER)
595
        return signed
596
    is
597
    begin
598
        return signed(cast(std_logic_vector(inp), old_bin_pt, new_width, new_bin_pt, xlSigned));
599
    end;
600
    function s2u_cast (inp : signed; old_bin_pt, new_width,
601
                   new_bin_pt : INTEGER)
602
        return unsigned
603
    is
604
    begin
605
        return unsigned(cast(std_logic_vector(inp), old_bin_pt, new_width, new_bin_pt, xlSigned));
606
    end;
607
    function u2s_cast (inp : unsigned; old_bin_pt, new_width,
608
                   new_bin_pt : INTEGER)
609
        return signed
610
    is
611
    begin
612
        return signed(cast(std_logic_vector(inp), old_bin_pt, new_width, new_bin_pt, xlUnsigned));
613
    end;
614
    function u2u_cast (inp : unsigned; old_bin_pt, new_width,
615
                   new_bin_pt : INTEGER)
616
        return unsigned
617
    is
618
    begin
619
        return unsigned(cast(std_logic_vector(inp), old_bin_pt, new_width, new_bin_pt, xlUnsigned));
620
    end;
621
    function u2v_cast (inp : unsigned; old_bin_pt, new_width,
622
                   new_bin_pt : INTEGER)
623
        return std_logic_vector
624
    is
625
    begin
626
        return cast(std_logic_vector(inp), old_bin_pt, new_width, new_bin_pt, xlUnsigned);
627
    end;
628
    function s2v_cast (inp : signed; old_bin_pt, new_width,
629
                   new_bin_pt : INTEGER)
630
        return std_logic_vector
631
    is
632
    begin
633
        return cast(std_logic_vector(inp), old_bin_pt, new_width, new_bin_pt, xlSigned);
634
    end;
635
    function boolean_to_signed (inp : boolean; width : integer)
636
        return signed
637
    is
638
        variable result : signed(width - 1 downto 0);
639
    begin
640
        result := (others => '0');
641
        if inp then
642
          result(0) := '1';
643
        else
644
          result(0) := '0';
645
        end if;
646
        return result;
647
    end;
648
    function boolean_to_unsigned (inp : boolean; width : integer)
649
        return unsigned
650
    is
651
        variable result : unsigned(width - 1 downto 0);
652
    begin
653
        result := (others => '0');
654
        if inp then
655
          result(0) := '1';
656
        else
657
          result(0) := '0';
658
        end if;
659
        return result;
660
    end;
661
    function boolean_to_vector (inp : boolean)
662
        return std_logic_vector
663
    is
664
        variable result : std_logic_vector(1 - 1 downto 0);
665
    begin
666
        result := (others => '0');
667
        if inp then
668
          result(0) := '1';
669
        else
670
          result(0) := '0';
671
        end if;
672
        return result;
673
    end;
674
    function std_logic_to_vector (inp : std_logic)
675
        return std_logic_vector
676
    is
677
        variable result : std_logic_vector(1 - 1 downto 0);
678
    begin
679
        result(0) := inp;
680
        return result;
681
    end;
682
    function trunc (inp : std_logic_vector; old_width, old_bin_pt, old_arith,
683
                                new_width, new_bin_pt, new_arith : INTEGER)
684
        return std_logic_vector
685
    is
686
        constant right_of_dp : integer := (old_bin_pt - new_bin_pt);
687
        variable vec : std_logic_vector(old_width-1 downto 0);
688
        variable result : std_logic_vector(new_width-1 downto 0);
689
    begin
690
        vec := inp;
691
        if right_of_dp >= 0 then
692
            if new_arith = xlUnsigned then
693
                result := zero_ext(vec(old_width-1 downto right_of_dp), new_width);
694
            else
695
                result := sign_ext(vec(old_width-1 downto right_of_dp), new_width);
696
            end if;
697
        else
698
            if new_arith = xlUnsigned then
699
                result := zero_ext(pad_LSB(vec, old_width +
700
                                           abs(right_of_dp)), new_width);
701
            else
702
                result := sign_ext(pad_LSB(vec, old_width +
703
                                           abs(right_of_dp)), new_width);
704
            end if;
705
        end if;
706
        return result;
707
    end;
708
    function round_towards_inf (inp : std_logic_vector; old_width, old_bin_pt,
709
                                old_arith, new_width, new_bin_pt, new_arith
710
                                : INTEGER)
711
        return std_logic_vector
712
    is
713
        constant right_of_dp : integer := (old_bin_pt - new_bin_pt);
714
        constant expected_new_width : integer :=  old_width - right_of_dp  + 1;
715
        variable vec : std_logic_vector(old_width-1 downto 0);
716
        variable one_or_zero : std_logic_vector(new_width-1 downto 0);
717
        variable truncated_val : std_logic_vector(new_width-1 downto 0);
718
        variable result : std_logic_vector(new_width-1 downto 0);
719
    begin
720
        vec := inp;
721
        if right_of_dp >= 0 then
722
            if new_arith = xlUnsigned then
723
                truncated_val := zero_ext(vec(old_width-1 downto right_of_dp),
724
                                          new_width);
725
            else
726
                truncated_val := sign_ext(vec(old_width-1 downto right_of_dp),
727
                                          new_width);
728
            end if;
729
        else
730
            if new_arith = xlUnsigned then
731
                truncated_val := zero_ext(pad_LSB(vec, old_width +
732
                                                  abs(right_of_dp)), new_width);
733
            else
734
                truncated_val := sign_ext(pad_LSB(vec, old_width +
735
                                                  abs(right_of_dp)), new_width);
736
            end if;
737
        end if;
738
        one_or_zero := (others => '0');
739
        if (new_arith = xlSigned) then
740
            if (vec(old_width-1) = '0') then
741
                one_or_zero(0) := '1';
742
            end if;
743
            if (right_of_dp >= 2) and (right_of_dp <= old_width) then
744
                if (all_zeros(vec(right_of_dp-2 downto 0)) = false) then
745
                    one_or_zero(0) := '1';
746
                end if;
747
            end if;
748
            if (right_of_dp >= 1) and (right_of_dp <= old_width) then
749
                if vec(right_of_dp-1) = '0' then
750
                    one_or_zero(0) := '0';
751
                end if;
752
            else
753
                one_or_zero(0) := '0';
754
            end if;
755
        else
756
            if (right_of_dp >= 1) and (right_of_dp <= old_width) then
757
                one_or_zero(0) :=  vec(right_of_dp-1);
758
            end if;
759
        end if;
760
        if new_arith = xlSigned then
761
            result := signed_to_std_logic_vector(std_logic_vector_to_signed(truncated_val) +
762
                                                 std_logic_vector_to_signed(one_or_zero));
763
        else
764
            result := unsigned_to_std_logic_vector(std_logic_vector_to_unsigned(truncated_val) +
765
                                                  std_logic_vector_to_unsigned(one_or_zero));
766
        end if;
767
        return result;
768
    end;
769
    function round_towards_even (inp : std_logic_vector; old_width, old_bin_pt,
770
                                old_arith, new_width, new_bin_pt, new_arith
771
                                : INTEGER)
772
        return std_logic_vector
773
    is
774
        constant right_of_dp : integer := (old_bin_pt - new_bin_pt);
775
        constant expected_new_width : integer :=  old_width - right_of_dp  + 1;
776
        variable vec : std_logic_vector(old_width-1 downto 0);
777
        variable one_or_zero : std_logic_vector(new_width-1 downto 0);
778
        variable truncated_val : std_logic_vector(new_width-1 downto 0);
779
        variable result : std_logic_vector(new_width-1 downto 0);
780
    begin
781
        vec := inp;
782
        if right_of_dp >= 0 then
783
            if new_arith = xlUnsigned then
784
                truncated_val := zero_ext(vec(old_width-1 downto right_of_dp),
785
                                          new_width);
786
            else
787
                truncated_val := sign_ext(vec(old_width-1 downto right_of_dp),
788
                                          new_width);
789
            end if;
790
        else
791
            if new_arith = xlUnsigned then
792
                truncated_val := zero_ext(pad_LSB(vec, old_width +
793
                                                  abs(right_of_dp)), new_width);
794
            else
795
                truncated_val := sign_ext(pad_LSB(vec, old_width +
796
                                                  abs(right_of_dp)), new_width);
797
            end if;
798
        end if;
799
        one_or_zero := (others => '0');
800
        if (right_of_dp >= 1) and (right_of_dp <= old_width) then
801
            if (is_point_five(vec(right_of_dp-1 downto 0)) = false) then
802
                one_or_zero(0) :=  vec(right_of_dp-1);
803
            else
804
                one_or_zero(0) :=  vec(right_of_dp);
805
            end if;
806
        end if;
807
        if new_arith = xlSigned then
808
            result := signed_to_std_logic_vector(std_logic_vector_to_signed(truncated_val) +
809
                                                 std_logic_vector_to_signed(one_or_zero));
810
        else
811
            result := unsigned_to_std_logic_vector(std_logic_vector_to_unsigned(truncated_val) +
812
                                                  std_logic_vector_to_unsigned(one_or_zero));
813
        end if;
814
        return result;
815
    end;
816
    function saturation_arith(inp:  std_logic_vector;  old_width, old_bin_pt,
817
                              old_arith, new_width, new_bin_pt, new_arith
818
                              : INTEGER)
819
        return std_logic_vector
820
    is
821
        constant left_of_dp : integer := (old_width - old_bin_pt) -
822
                                         (new_width - new_bin_pt);
823
        variable vec : std_logic_vector(old_width-1 downto 0);
824
        variable result : std_logic_vector(new_width-1 downto 0);
825
        variable overflow : boolean;
826
    begin
827
        vec := inp;
828
        overflow := true;
829
        result := (others => '0');
830
        if (new_width >= old_width) then
831
            overflow := false;
832
        end if;
833
        if ((old_arith = xlSigned and new_arith = xlSigned) and (old_width > new_width)) then
834
            if all_same(vec(old_width-1 downto new_width-1)) then
835
                overflow := false;
836
            end if;
837
        end if;
838
        if (old_arith = xlSigned and new_arith = xlUnsigned) then
839
            if (old_width > new_width) then
840
                if all_zeros(vec(old_width-1 downto new_width)) then
841
                    overflow := false;
842
                end if;
843
            else
844
                if (old_width = new_width) then
845
                    if (vec(new_width-1) = '0') then
846
                        overflow := false;
847
                    end if;
848
                end if;
849
            end if;
850
        end if;
851
        if (old_arith = xlUnsigned and new_arith = xlUnsigned) then
852
            if (old_width > new_width) then
853
                if all_zeros(vec(old_width-1 downto new_width)) then
854
                    overflow := false;
855
                end if;
856
            else
857
                if (old_width = new_width) then
858
                    overflow := false;
859
                end if;
860
            end if;
861
        end if;
862
        if ((old_arith = xlUnsigned and new_arith = xlSigned) and (old_width > new_width)) then
863
            if all_same(vec(old_width-1 downto new_width-1)) then
864
                overflow := false;
865
            end if;
866
        end if;
867
        if overflow then
868
            if new_arith = xlSigned then
869
                if vec(old_width-1) = '0' then
870
                    result := max_signed(new_width);
871
                else
872
                    result := min_signed(new_width);
873
                end if;
874
            else
875
                if ((old_arith = xlSigned) and vec(old_width-1) = '1') then
876
                    result := (others => '0');
877
                else
878
                    result := (others => '1');
879
                end if;
880
            end if;
881
        else
882
            if (old_arith = xlSigned) and (new_arith = xlUnsigned) then
883
                if (vec(old_width-1) = '1') then
884
                    vec := (others => '0');
885
                end if;
886
            end if;
887
            if new_width <= old_width then
888
                result := vec(new_width-1 downto 0);
889
            else
890
                if new_arith = xlUnsigned then
891
                    result := zero_ext(vec, new_width);
892
                else
893
                    result := sign_ext(vec, new_width);
894
                end if;
895
            end if;
896
        end if;
897
        return result;
898
    end;
899
   function wrap_arith(inp:  std_logic_vector;  old_width, old_bin_pt,
900
                       old_arith, new_width, new_bin_pt, new_arith : INTEGER)
901
        return std_logic_vector
902
    is
903
        variable result : std_logic_vector(new_width-1 downto 0);
904
        variable result_arith : integer;
905
    begin
906
        if (old_arith = xlSigned) and (new_arith = xlUnsigned) then
907
            result_arith := xlSigned;
908
        end if;
909
        result := cast(inp, old_bin_pt, new_width, new_bin_pt, result_arith);
910
        return result;
911
    end;
912
    function fractional_bits(a_bin_pt, b_bin_pt: INTEGER) return INTEGER is
913
    begin
914
        return max(a_bin_pt, b_bin_pt);
915
    end;
916
    function integer_bits(a_width, a_bin_pt, b_width, b_bin_pt: INTEGER)
917
        return INTEGER is
918
    begin
919
        return  max(a_width - a_bin_pt, b_width - b_bin_pt);
920
    end;
921
    function pad_LSB(inp : std_logic_vector; new_width: integer)
922
        return STD_LOGIC_VECTOR
923
    is
924
        constant orig_width : integer := inp'length;
925
        variable vec : std_logic_vector(orig_width-1 downto 0);
926
        variable result : std_logic_vector(new_width-1 downto 0);
927
        variable pos : integer;
928
        constant pad_pos : integer := new_width - orig_width - 1;
929
    begin
930
        vec := inp;
931
        pos := new_width-1;
932
        if (new_width >= orig_width) then
933
            for i in orig_width-1 downto 0 loop
934
                result(pos) := vec(i);
935
                pos := pos - 1;
936
            end loop;
937
            if pad_pos >= 0 then
938
                for i in pad_pos downto 0 loop
939
                    result(i) := '0';
940
                end loop;
941
            end if;
942
        end if;
943
        return result;
944
    end;
945
    function sign_ext(inp : std_logic_vector; new_width : INTEGER)
946
        return std_logic_vector
947
    is
948
        constant old_width : integer := inp'length;
949
        variable vec : std_logic_vector(old_width-1 downto 0);
950
        variable result : std_logic_vector(new_width-1 downto 0);
951
    begin
952
        vec := inp;
953
        if new_width >= old_width then
954
            result(old_width-1 downto 0) := vec;
955
            if new_width-1 >= old_width then
956
                for i in new_width-1 downto old_width loop
957
                    result(i) := vec(old_width-1);
958
                end loop;
959
            end if;
960
        else
961
            result(new_width-1 downto 0) := vec(new_width-1 downto 0);
962
        end if;
963
        return result;
964
    end;
965
    function zero_ext(inp : std_logic_vector; new_width : INTEGER)
966
        return std_logic_vector
967
    is
968
        constant old_width : integer := inp'length;
969
        variable vec : std_logic_vector(old_width-1 downto 0);
970
        variable result : std_logic_vector(new_width-1 downto 0);
971
    begin
972
        vec := inp;
973
        if new_width >= old_width then
974
            result(old_width-1 downto 0) := vec;
975
            if new_width-1 >= old_width then
976
                for i in new_width-1 downto old_width loop
977
                    result(i) := '0';
978
                end loop;
979
            end if;
980
        else
981
            result(new_width-1 downto 0) := vec(new_width-1 downto 0);
982
        end if;
983
        return result;
984
    end;
985
    function zero_ext(inp : std_logic; new_width : INTEGER)
986
        return std_logic_vector
987
    is
988
        variable result : std_logic_vector(new_width-1 downto 0);
989
    begin
990
        result(0) := inp;
991
        for i in new_width-1 downto 1 loop
992
            result(i) := '0';
993
        end loop;
994
        return result;
995
    end;
996
    function extend_MSB(inp : std_logic_vector; new_width, arith : INTEGER)
997
        return std_logic_vector
998
    is
999
        constant orig_width : integer := inp'length;
1000
        variable vec : std_logic_vector(orig_width-1 downto 0);
1001
        variable result : std_logic_vector(new_width-1 downto 0);
1002
    begin
1003
        vec := inp;
1004
        if arith = xlUnsigned then
1005
            result := zero_ext(vec, new_width);
1006
        else
1007
            result := sign_ext(vec, new_width);
1008
        end if;
1009
        return result;
1010
    end;
1011
    function pad_LSB(inp : std_logic_vector; new_width, arith: integer)
1012
        return STD_LOGIC_VECTOR
1013
    is
1014
        constant orig_width : integer := inp'length;
1015
        variable vec : std_logic_vector(orig_width-1 downto 0);
1016
        variable result : std_logic_vector(new_width-1 downto 0);
1017
        variable pos : integer;
1018
    begin
1019
        vec := inp;
1020
        pos := new_width-1;
1021
        if (arith = xlUnsigned) then
1022
            result(pos) := '0';
1023
            pos := pos - 1;
1024
        else
1025
            result(pos) := vec(orig_width-1);
1026
            pos := pos - 1;
1027
        end if;
1028
        if (new_width >= orig_width) then
1029
            for i in orig_width-1 downto 0 loop
1030
                result(pos) := vec(i);
1031
                pos := pos - 1;
1032
            end loop;
1033
            if pos >= 0 then
1034
                for i in pos downto 0 loop
1035
                    result(i) := '0';
1036
                end loop;
1037
            end if;
1038
        end if;
1039
        return result;
1040
    end;
1041
    function align_input(inp : std_logic_vector; old_width, delta, new_arith,
1042
                         new_width: INTEGER)
1043
        return std_logic_vector
1044
    is
1045
        variable vec : std_logic_vector(old_width-1 downto 0);
1046
        variable padded_inp : std_logic_vector((old_width + delta)-1  downto 0);
1047
        variable result : std_logic_vector(new_width-1 downto 0);
1048
    begin
1049
        vec := inp;
1050
        if delta > 0 then
1051
            padded_inp := pad_LSB(vec, old_width+delta);
1052
            result := extend_MSB(padded_inp, new_width, new_arith);
1053
        else
1054
            result := extend_MSB(vec, new_width, new_arith);
1055
        end if;
1056
        return result;
1057
    end;
1058
    function max(L, R: INTEGER) return INTEGER is
1059
    begin
1060
        if L > R then
1061
            return L;
1062
        else
1063
            return R;
1064
        end if;
1065
    end;
1066
    function min(L, R: INTEGER) return INTEGER is
1067
    begin
1068
        if L < R then
1069
            return L;
1070
        else
1071
            return R;
1072
        end if;
1073
    end;
1074
    function "="(left,right: STRING) return boolean is
1075
    begin
1076
        if (left'length /= right'length) then
1077
            return false;
1078
        else
1079
            test : for i in 1 to left'length loop
1080
                if left(i) /= right(i) then
1081
                    return false;
1082
                end if;
1083
            end loop test;
1084
            return true;
1085
        end if;
1086
    end;
1087
    -- synopsys translate_off
1088
    function is_binary_string_invalid (inp : string)
1089
        return boolean
1090
    is
1091
        variable vec : string(1 to inp'length);
1092
        variable result : boolean;
1093
    begin
1094
        vec := inp;
1095
        result := false;
1096
        for i in 1 to vec'length loop
1097
            if ( vec(i) = 'X' ) then
1098
                result := true;
1099
            end if;
1100
        end loop;
1101
        return result;
1102
    end;
1103
    function is_binary_string_undefined (inp : string)
1104
        return boolean
1105
    is
1106
        variable vec : string(1 to inp'length);
1107
        variable result : boolean;
1108
    begin
1109
        vec := inp;
1110
        result := false;
1111
        for i in 1 to vec'length loop
1112
            if ( vec(i) = 'U' ) then
1113
                result := true;
1114
            end if;
1115
        end loop;
1116
        return result;
1117
    end;
1118
    function is_XorU(inp : std_logic_vector)
1119
        return boolean
1120
    is
1121
        constant width : integer := inp'length;
1122
        variable vec : std_logic_vector(width-1 downto 0);
1123
        variable result : boolean;
1124
    begin
1125
        vec := inp;
1126
        result := false;
1127
        for i in 0 to width-1 loop
1128
            if (vec(i) = 'U') or (vec(i) = 'X') then
1129
                result := true;
1130
            end if;
1131
        end loop;
1132
        return result;
1133
    end;
1134
    function to_real(inp : std_logic_vector; bin_pt : integer; arith : integer)
1135
        return real
1136
    is
1137
        variable  vec : std_logic_vector(inp'length-1 downto 0);
1138
        variable result, shift_val, undefined_real : real;
1139
        variable neg_num : boolean;
1140
    begin
1141
        vec := inp;
1142
        result := 0.0;
1143
        neg_num := false;
1144
        if vec(inp'length-1) = '1' then
1145
            neg_num := true;
1146
        end if;
1147
        for i in 0 to inp'length-1 loop
1148
            if  vec(i) = 'U' or vec(i) = 'X' then
1149
                return undefined_real;
1150
            end if;
1151
            if arith = xlSigned then
1152
                if neg_num then
1153
                    if vec(i) = '0' then
1154
                        result := result + 2.0**i;
1155
                    end if;
1156
                else
1157
                    if vec(i) = '1' then
1158
                        result := result + 2.0**i;
1159
                    end if;
1160
                end if;
1161
            else
1162
                if vec(i) = '1' then
1163
                    result := result + 2.0**i;
1164
                end if;
1165
            end if;
1166
        end loop;
1167
        if arith = xlSigned then
1168
            if neg_num then
1169
                result := result + 1.0;
1170
                result := result * (-1.0);
1171
            end if;
1172
        end if;
1173
        shift_val := 2.0**(-1*bin_pt);
1174
        result := result * shift_val;
1175
        return result;
1176
    end;
1177
    function std_logic_to_real(inp : std_logic; bin_pt : integer; arith : integer)
1178
        return real
1179
    is
1180
        variable result : real := 0.0;
1181
    begin
1182
        if inp = '1' then
1183
            result := 1.0;
1184
        end if;
1185
        if arith = xlSigned then
1186
            assert false
1187
                report "It doesn't make sense to convert a 1 bit number to a signed real.";
1188
        end if;
1189
        return result;
1190
    end;
1191
    -- synopsys translate_on
1192
    function integer_to_std_logic_vector (inp : integer;  width, arith : integer)
1193
        return std_logic_vector
1194
    is
1195
        variable result : std_logic_vector(width-1 downto 0);
1196
        variable unsigned_val : unsigned(width-1 downto 0);
1197
        variable signed_val : signed(width-1 downto 0);
1198
    begin
1199
        if (arith = xlSigned) then
1200
            signed_val := to_signed(inp, width);
1201
            result := signed_to_std_logic_vector(signed_val);
1202
        else
1203
            unsigned_val := to_unsigned(inp, width);
1204
            result := unsigned_to_std_logic_vector(unsigned_val);
1205
        end if;
1206
        return result;
1207
    end;
1208
    function std_logic_vector_to_integer (inp : std_logic_vector;  arith : integer)
1209
        return integer
1210
    is
1211
        constant width : integer := inp'length;
1212
        variable unsigned_val : unsigned(width-1 downto 0);
1213
        variable signed_val : signed(width-1 downto 0);
1214
        variable result : integer;
1215
    begin
1216
        if (arith = xlSigned) then
1217
            signed_val := std_logic_vector_to_signed(inp);
1218
            result := to_integer(signed_val);
1219
        else
1220
            unsigned_val := std_logic_vector_to_unsigned(inp);
1221
            result := to_integer(unsigned_val);
1222
        end if;
1223
        return result;
1224
    end;
1225
    function std_logic_to_integer(constant inp : std_logic := '0')
1226
        return integer
1227
    is
1228
    begin
1229
        if inp = '1' then
1230
            return 1;
1231
        else
1232
            return 0;
1233
        end if;
1234
    end;
1235
    function makeZeroBinStr (width : integer) return STRING is
1236
        variable result : string(1 to width+3);
1237
    begin
1238
        result(1) := '0';
1239
        result(2) := 'b';
1240
        for i in 3 to width+2 loop
1241
            result(i) := '0';
1242
        end loop;
1243
        result(width+3) := '.';
1244
        return result;
1245
    end;
1246
    -- synopsys translate_off
1247
    function real_string_to_std_logic_vector (inp : string;  width, bin_pt, arith : integer)
1248
        return std_logic_vector
1249
    is
1250
        variable result : std_logic_vector(width-1 downto 0);
1251
    begin
1252
        result := (others => '0');
1253
        return result;
1254
    end;
1255
    function real_to_std_logic_vector (inp : real;  width, bin_pt, arith : integer)
1256
        return std_logic_vector
1257
    is
1258
        variable real_val : real;
1259
        variable int_val : integer;
1260
        variable result : std_logic_vector(width-1 downto 0) := (others => '0');
1261
        variable unsigned_val : unsigned(width-1 downto 0) := (others => '0');
1262
        variable signed_val : signed(width-1 downto 0) := (others => '0');
1263
    begin
1264
        real_val := inp;
1265
        int_val := integer(real_val * 2.0**(bin_pt));
1266
        if (arith = xlSigned) then
1267
            signed_val := to_signed(int_val, width);
1268
            result := signed_to_std_logic_vector(signed_val);
1269
        else
1270
            unsigned_val := to_unsigned(int_val, width);
1271
            result := unsigned_to_std_logic_vector(unsigned_val);
1272
        end if;
1273
        return result;
1274
    end;
1275
    -- synopsys translate_on
1276
    function valid_bin_string (inp : string)
1277
        return boolean
1278
    is
1279
        variable vec : string(1 to inp'length);
1280
    begin
1281
        vec := inp;
1282
        if (vec(1) = '0' and vec(2) = 'b') then
1283
            return true;
1284
        else
1285
            return false;
1286
        end if;
1287
    end;
1288
    function hex_string_to_std_logic_vector(inp: string; width : integer)
1289
        return std_logic_vector is
1290
        constant strlen       : integer := inp'LENGTH;
1291
        variable result       : std_logic_vector(width-1 downto 0);
1292
        variable bitval       : std_logic_vector((strlen*4)-1 downto 0);
1293
        variable posn         : integer;
1294
        variable ch           : character;
1295
        variable vec          : string(1 to strlen);
1296
    begin
1297
        vec := inp;
1298
        result := (others => '0');
1299
        posn := (strlen*4)-1;
1300
        for i in 1 to strlen loop
1301
            ch := vec(i);
1302
            case ch is
1303
                when '0' => bitval(posn downto posn-3) := "0000";
1304
                when '1' => bitval(posn downto posn-3) := "0001";
1305
                when '2' => bitval(posn downto posn-3) := "0010";
1306
                when '3' => bitval(posn downto posn-3) := "0011";
1307
                when '4' => bitval(posn downto posn-3) := "0100";
1308
                when '5' => bitval(posn downto posn-3) := "0101";
1309
                when '6' => bitval(posn downto posn-3) := "0110";
1310
                when '7' => bitval(posn downto posn-3) := "0111";
1311
                when '8' => bitval(posn downto posn-3) := "1000";
1312
                when '9' => bitval(posn downto posn-3) := "1001";
1313
                when 'A' | 'a' => bitval(posn downto posn-3) := "1010";
1314
                when 'B' | 'b' => bitval(posn downto posn-3) := "1011";
1315
                when 'C' | 'c' => bitval(posn downto posn-3) := "1100";
1316
                when 'D' | 'd' => bitval(posn downto posn-3) := "1101";
1317
                when 'E' | 'e' => bitval(posn downto posn-3) := "1110";
1318
                when 'F' | 'f' => bitval(posn downto posn-3) := "1111";
1319
                when others => bitval(posn downto posn-3) := "XXXX";
1320
                               -- synopsys translate_off
1321
                               ASSERT false
1322
                                   REPORT "Invalid hex value" SEVERITY ERROR;
1323
                               -- synopsys translate_on
1324
            end case;
1325
            posn := posn - 4;
1326
        end loop;
1327
        if (width <= strlen*4) then
1328
            result :=  bitval(width-1 downto 0);
1329
        else
1330
            result((strlen*4)-1 downto 0) := bitval;
1331
        end if;
1332
        return result;
1333
    end;
1334
    function bin_string_to_std_logic_vector (inp : string)
1335
        return std_logic_vector
1336
    is
1337
        variable pos : integer;
1338
        variable vec : string(1 to inp'length);
1339
        variable result : std_logic_vector(inp'length-1 downto 0);
1340
    begin
1341
        vec := inp;
1342
        pos := inp'length-1;
1343
        result := (others => '0');
1344
        for i in 1 to vec'length loop
1345
            -- synopsys translate_off
1346
            if (pos < 0) and (vec(i) = '0' or vec(i) = '1' or vec(i) = 'X' or vec(i) = 'U')  then
1347
                assert false
1348
                    report "Input string is larger than output std_logic_vector. Truncating output.";
1349
                return result;
1350
            end if;
1351
            -- synopsys translate_on
1352
            if vec(i) = '0' then
1353
                result(pos) := '0';
1354
                pos := pos - 1;
1355
            end if;
1356
            if vec(i) = '1' then
1357
                result(pos) := '1';
1358
                pos := pos - 1;
1359
            end if;
1360
            -- synopsys translate_off
1361
            if (vec(i) = 'X' or vec(i) = 'U') then
1362
                result(pos) := 'U';
1363
                pos := pos - 1;
1364
            end if;
1365
            -- synopsys translate_on
1366
        end loop;
1367
        return result;
1368
    end;
1369
    function bin_string_element_to_std_logic_vector (inp : string;  width, index : integer)
1370
        return std_logic_vector
1371
    is
1372
        constant str_width : integer := width + 4;
1373
        constant inp_len : integer := inp'length;
1374
        constant num_elements : integer := (inp_len + 1)/str_width;
1375
        constant reverse_index : integer := (num_elements-1) - index;
1376
        variable left_pos : integer;
1377
        variable right_pos : integer;
1378
        variable vec : string(1 to inp'length);
1379
        variable result : std_logic_vector(width-1 downto 0);
1380
    begin
1381
        vec := inp;
1382
        result := (others => '0');
1383
        if (reverse_index = 0) and (reverse_index < num_elements) and (inp_len-3 >= width) then
1384
            left_pos := 1;
1385
            right_pos := width + 3;
1386
            result := bin_string_to_std_logic_vector(vec(left_pos to right_pos));
1387
        end if;
1388
        if (reverse_index > 0) and (reverse_index < num_elements) and (inp_len-3 >= width) then
1389
            left_pos := (reverse_index * str_width) + 1;
1390
            right_pos := left_pos + width + 2;
1391
            result := bin_string_to_std_logic_vector(vec(left_pos to right_pos));
1392
        end if;
1393
        return result;
1394
    end;
1395
   -- synopsys translate_off
1396
    function std_logic_vector_to_bin_string(inp : std_logic_vector)
1397
        return string
1398
    is
1399
        variable vec : std_logic_vector(1 to inp'length);
1400
        variable result : string(vec'range);
1401
    begin
1402
        vec := inp;
1403
        for i in vec'range loop
1404
            result(i) := to_char(vec(i));
1405
        end loop;
1406
        return result;
1407
    end;
1408
    function std_logic_to_bin_string(inp : std_logic)
1409
        return string
1410
    is
1411
        variable result : string(1 to 3);
1412
    begin
1413
        result(1) := '0';
1414
        result(2) := 'b';
1415
        result(3) := to_char(inp);
1416
        return result;
1417
    end;
1418
    function std_logic_vector_to_bin_string_w_point(inp : std_logic_vector; bin_pt : integer)
1419
        return string
1420
    is
1421
        variable width : integer := inp'length;
1422
        variable vec : std_logic_vector(width-1 downto 0);
1423
        variable str_pos : integer;
1424
        variable result : string(1 to width+3);
1425
    begin
1426
        vec := inp;
1427
        str_pos := 1;
1428
        result(str_pos) := '0';
1429
        str_pos := 2;
1430
        result(str_pos) := 'b';
1431
        str_pos := 3;
1432
        for i in width-1 downto 0  loop
1433
            if (((width+3) - bin_pt) = str_pos) then
1434
                result(str_pos) := '.';
1435
                str_pos := str_pos + 1;
1436
            end if;
1437
            result(str_pos) := to_char(vec(i));
1438
            str_pos := str_pos + 1;
1439
        end loop;
1440
        if (bin_pt = 0) then
1441
            result(str_pos) := '.';
1442
        end if;
1443
        return result;
1444
    end;
1445
    function real_to_bin_string(inp : real;  width, bin_pt, arith : integer)
1446
        return string
1447
    is
1448
        variable result : string(1 to width);
1449
        variable vec : std_logic_vector(width-1 downto 0);
1450
    begin
1451
        vec := real_to_std_logic_vector(inp, width, bin_pt, arith);
1452
        result := std_logic_vector_to_bin_string(vec);
1453
        return result;
1454
    end;
1455
    function real_to_string (inp : real) return string
1456
    is
1457
        variable result : string(1 to display_precision) := (others => ' ');
1458
    begin
1459
        result(real'image(inp)'range) := real'image(inp);
1460
        return result;
1461
    end;
1462
    -- synopsys translate_on
1463
end conv_pkg;
1464
 
1465
-------------------------------------------------------------------
1466
-- System Generator version 12.3 VHDL source file.
1467
--
1468
-- Copyright(C) 2010 by Xilinx, Inc.  All rights reserved.  This
1469
-- text/file contains proprietary, confidential information of Xilinx,
1470
-- Inc., is distributed under license from Xilinx, Inc., and may be used,
1471
-- copied and/or disclosed only pursuant to the terms of a valid license
1472
-- agreement with Xilinx, Inc.  Xilinx hereby grants you a license to use
1473
-- this text/file solely for design, simulation, implementation and
1474
-- creation of design files limited to Xilinx devices or technologies.
1475
-- Use with non-Xilinx devices or technologies is expressly prohibited
1476
-- and immediately terminates your license unless covered by a separate
1477
-- agreement.
1478
--
1479
-- Xilinx is providing this design, code, or information "as is" solely
1480
-- for use in developing programs and solutions for Xilinx devices.  By
1481
-- providing this design, code, or information as one possible
1482
-- implementation of this feature, application or standard, Xilinx is
1483
-- making no representation that this implementation is free from any
1484
-- claims of infringement.  You are responsible for obtaining any rights
1485
-- you may require for your implementation.  Xilinx expressly disclaims
1486
-- any warranty whatsoever with respect to the adequacy of the
1487
-- implementation, including but not limited to warranties of
1488
-- merchantability or fitness for a particular purpose.
1489
--
1490
-- Xilinx products are not intended for use in life support appliances,
1491
-- devices, or systems.  Use in such applications is expressly prohibited.
1492
--
1493
-- Any modifications that are made to the source code are done at the user's
1494
-- sole risk and will be unsupported.
1495
--
1496
-- This copyright and support notice must be retained as part of this
1497
-- text at all times.  (c) Copyright 1995-2010 Xilinx, Inc.  All rights
1498
-- reserved.
1499
-------------------------------------------------------------------
1500
-- synopsys translate_off
1501
library unisim;
1502
use unisim.vcomponents.all;
1503
-- synopsys translate_on
1504
library IEEE;
1505
use IEEE.std_logic_1164.all;
1506
use work.conv_pkg.all;
1507
entity srl17e is
1508
    generic (width : integer:=16;
1509
             latency : integer :=8);
1510
    port (clk   : in std_logic;
1511
          ce    : in std_logic;
1512
          d     : in std_logic_vector(width-1 downto 0);
1513
          q     : out std_logic_vector(width-1 downto 0));
1514
end srl17e;
1515
architecture structural of srl17e is
1516
    component SRL16E
1517
        port (D   : in STD_ULOGIC;
1518
              CE  : in STD_ULOGIC;
1519
              CLK : in STD_ULOGIC;
1520
              A0  : in STD_ULOGIC;
1521
              A1  : in STD_ULOGIC;
1522
              A2  : in STD_ULOGIC;
1523
              A3  : in STD_ULOGIC;
1524
              Q   : out STD_ULOGIC);
1525
    end component;
1526
    attribute syn_black_box of SRL16E : component is true;
1527
    attribute fpga_dont_touch of SRL16E : component is "true";
1528
    component FDE
1529
        port(
1530
            Q  :        out   STD_ULOGIC;
1531
            D  :        in    STD_ULOGIC;
1532
            C  :        in    STD_ULOGIC;
1533
            CE :        in    STD_ULOGIC);
1534
    end component;
1535
    attribute syn_black_box of FDE : component is true;
1536
    attribute fpga_dont_touch of FDE : component is "true";
1537
    constant a : std_logic_vector(4 downto 0) :=
1538
        integer_to_std_logic_vector(latency-2,5,xlSigned);
1539
    signal d_delayed : std_logic_vector(width-1 downto 0);
1540
    signal srl16_out : std_logic_vector(width-1 downto 0);
1541
begin
1542
    d_delayed <= d after 200 ps;
1543
    reg_array : for i in 0 to width-1 generate
1544
        srl16_used: if latency > 1 generate
1545
            u1 : srl16e port map(clk => clk,
1546
                                 d => d_delayed(i),
1547
                                 q => srl16_out(i),
1548
                                 ce => ce,
1549
                                 a0 => a(0),
1550
                                 a1 => a(1),
1551
                                 a2 => a(2),
1552
                                 a3 => a(3));
1553
        end generate;
1554
        srl16_not_used: if latency <= 1 generate
1555
            srl16_out(i) <= d_delayed(i);
1556
        end generate;
1557
        fde_used: if latency /= 0  generate
1558
            u2 : fde port map(c => clk,
1559
                              d => srl16_out(i),
1560
                              q => q(i),
1561
                              ce => ce);
1562
        end generate;
1563
        fde_not_used: if latency = 0  generate
1564
            q(i) <= srl16_out(i);
1565
        end generate;
1566
    end generate;
1567
 end structural;
1568
library IEEE;
1569
use IEEE.std_logic_1164.all;
1570
use work.conv_pkg.all;
1571
entity synth_reg is
1572
    generic (width           : integer := 8;
1573
             latency         : integer := 1);
1574
    port (i       : in std_logic_vector(width-1 downto 0);
1575
          ce      : in std_logic;
1576
          clr     : in std_logic;
1577
          clk     : in std_logic;
1578
          o       : out std_logic_vector(width-1 downto 0));
1579
end synth_reg;
1580
architecture structural of synth_reg is
1581
    component srl17e
1582
        generic (width : integer:=16;
1583
                 latency : integer :=8);
1584
        port (clk : in std_logic;
1585
              ce  : in std_logic;
1586
              d   : in std_logic_vector(width-1 downto 0);
1587
              q   : out std_logic_vector(width-1 downto 0));
1588
    end component;
1589
    function calc_num_srl17es (latency : integer)
1590
        return integer
1591
    is
1592
        variable remaining_latency : integer;
1593
        variable result : integer;
1594
    begin
1595
        result := latency / 17;
1596
        remaining_latency := latency - (result * 17);
1597
        if (remaining_latency /= 0) then
1598
            result := result + 1;
1599
        end if;
1600
        return result;
1601
    end;
1602
    constant complete_num_srl17es : integer := latency / 17;
1603
    constant num_srl17es : integer := calc_num_srl17es(latency);
1604
    constant remaining_latency : integer := latency - (complete_num_srl17es * 17);
1605
    type register_array is array (num_srl17es downto 0) of
1606
        std_logic_vector(width-1 downto 0);
1607
    signal z : register_array;
1608
begin
1609
    z(0) <= i;
1610
    complete_ones : if complete_num_srl17es > 0 generate
1611
        srl17e_array: for i in 0 to complete_num_srl17es-1 generate
1612
            delay_comp : srl17e
1613
                generic map (width => width,
1614
                             latency => 17)
1615
                port map (clk => clk,
1616
                          ce  => ce,
1617
                          d       => z(i),
1618
                          q       => z(i+1));
1619
        end generate;
1620
    end generate;
1621
    partial_one : if remaining_latency > 0 generate
1622
        last_srl17e : srl17e
1623
            generic map (width => width,
1624
                         latency => remaining_latency)
1625
            port map (clk => clk,
1626
                      ce  => ce,
1627
                      d   => z(num_srl17es-1),
1628
                      q   => z(num_srl17es));
1629
    end generate;
1630
    o <= z(num_srl17es);
1631
end structural;
1632
library IEEE;
1633
use IEEE.std_logic_1164.all;
1634
use work.conv_pkg.all;
1635
entity synth_reg_reg is
1636
    generic (width           : integer := 8;
1637
             latency         : integer := 1);
1638
    port (i       : in std_logic_vector(width-1 downto 0);
1639
          ce      : in std_logic;
1640
          clr     : in std_logic;
1641
          clk     : in std_logic;
1642
          o       : out std_logic_vector(width-1 downto 0));
1643
end synth_reg_reg;
1644
architecture behav of synth_reg_reg is
1645
  type reg_array_type is array (latency-1 downto 0) of std_logic_vector(width -1 downto 0);
1646
  signal reg_bank : reg_array_type := (others => (others => '0'));
1647
  signal reg_bank_in : reg_array_type := (others => (others => '0'));
1648
  attribute syn_allow_retiming : boolean;
1649
  attribute syn_srlstyle : string;
1650
  attribute syn_allow_retiming of reg_bank : signal is true;
1651
  attribute syn_allow_retiming of reg_bank_in : signal is true;
1652
  attribute syn_srlstyle of reg_bank : signal is "registers";
1653
  attribute syn_srlstyle of reg_bank_in : signal is "registers";
1654
begin
1655
  latency_eq_0: if latency = 0 generate
1656
    o <= i;
1657
  end generate latency_eq_0;
1658
  latency_gt_0: if latency >= 1 generate
1659
    o <= reg_bank(latency-1);
1660
    reg_bank_in(0) <= i;
1661
    loop_gen: for idx in latency-2 downto 0 generate
1662
      reg_bank_in(idx+1) <= reg_bank(idx);
1663
    end generate loop_gen;
1664
    sync_loop: for sync_idx in latency-1 downto 0 generate
1665
      sync_proc: process (clk)
1666
      begin
1667
        if clk'event and clk = '1' then
1668
          if ce = '1'  then
1669
            reg_bank(sync_idx) <= reg_bank_in(sync_idx);
1670
          end if;
1671
        end if;
1672
      end process sync_proc;
1673
    end generate sync_loop;
1674
  end generate latency_gt_0;
1675
end behav;
1676
 
1677
-------------------------------------------------------------------
1678
-- System Generator version 12.3 VHDL source file.
1679
--
1680
-- Copyright(C) 2010 by Xilinx, Inc.  All rights reserved.  This
1681
-- text/file contains proprietary, confidential information of Xilinx,
1682
-- Inc., is distributed under license from Xilinx, Inc., and may be used,
1683
-- copied and/or disclosed only pursuant to the terms of a valid license
1684
-- agreement with Xilinx, Inc.  Xilinx hereby grants you a license to use
1685
-- this text/file solely for design, simulation, implementation and
1686
-- creation of design files limited to Xilinx devices or technologies.
1687
-- Use with non-Xilinx devices or technologies is expressly prohibited
1688
-- and immediately terminates your license unless covered by a separate
1689
-- agreement.
1690
--
1691
-- Xilinx is providing this design, code, or information "as is" solely
1692
-- for use in developing programs and solutions for Xilinx devices.  By
1693
-- providing this design, code, or information as one possible
1694
-- implementation of this feature, application or standard, Xilinx is
1695
-- making no representation that this implementation is free from any
1696
-- claims of infringement.  You are responsible for obtaining any rights
1697
-- you may require for your implementation.  Xilinx expressly disclaims
1698
-- any warranty whatsoever with respect to the adequacy of the
1699
-- implementation, including but not limited to warranties of
1700
-- merchantability or fitness for a particular purpose.
1701
--
1702
-- Xilinx products are not intended for use in life support appliances,
1703
-- devices, or systems.  Use in such applications is expressly prohibited.
1704
--
1705
-- Any modifications that are made to the source code are done at the user's
1706
-- sole risk and will be unsupported.
1707
--
1708
-- This copyright and support notice must be retained as part of this
1709
-- text at all times.  (c) Copyright 1995-2010 Xilinx, Inc.  All rights
1710
-- reserved.
1711
-------------------------------------------------------------------
1712
-- synopsys translate_off
1713
library unisim;
1714
use unisim.vcomponents.all;
1715
-- synopsys translate_on
1716
library IEEE;
1717
use IEEE.std_logic_1164.all;
1718
use work.conv_pkg.all;
1719
entity single_reg_w_init is
1720
  generic (
1721
    width: integer := 8;
1722
    init_index: integer := 0;
1723
    init_value: bit_vector := b"0000"
1724
  );
1725
  port (
1726
    i: in std_logic_vector(width - 1 downto 0);
1727
    ce: in std_logic;
1728
    clr: in std_logic;
1729
    clk: in std_logic;
1730
    o: out std_logic_vector(width - 1 downto 0)
1731
  );
1732
end single_reg_w_init;
1733
architecture structural of single_reg_w_init is
1734
  function build_init_const(width: integer;
1735
                            init_index: integer;
1736
                            init_value: bit_vector)
1737
    return std_logic_vector
1738
  is
1739
    variable result: std_logic_vector(width - 1 downto 0);
1740
  begin
1741
    if init_index = 0 then
1742
      result := (others => '0');
1743
    elsif init_index = 1 then
1744
      result := (others => '0');
1745
      result(0) := '1';
1746
    else
1747
      result := to_stdlogicvector(init_value);
1748
    end if;
1749
    return result;
1750
  end;
1751
  component fdre
1752
    port (
1753
      q: out std_ulogic;
1754
      d: in  std_ulogic;
1755
      c: in  std_ulogic;
1756
      ce: in  std_ulogic;
1757
      r: in  std_ulogic
1758
    );
1759
  end component;
1760
  attribute syn_black_box of fdre: component is true;
1761
  attribute fpga_dont_touch of fdre: component is "true";
1762
  component fdse
1763
    port (
1764
      q: out std_ulogic;
1765
      d: in  std_ulogic;
1766
      c: in  std_ulogic;
1767
      ce: in  std_ulogic;
1768
      s: in  std_ulogic
1769
    );
1770
  end component;
1771
  attribute syn_black_box of fdse: component is true;
1772
  attribute fpga_dont_touch of fdse: component is "true";
1773
  constant init_const: std_logic_vector(width - 1 downto 0)
1774
    := build_init_const(width, init_index, init_value);
1775
begin
1776
  fd_prim_array: for index in 0 to width - 1 generate
1777
    bit_is_0: if (init_const(index) = '0') generate
1778
      fdre_comp: fdre
1779
        port map (
1780
          c => clk,
1781
          d => i(index),
1782
          q => o(index),
1783
          ce => ce,
1784
          r => clr
1785
        );
1786
    end generate;
1787
    bit_is_1: if (init_const(index) = '1') generate
1788
      fdse_comp: fdse
1789
        port map (
1790
          c => clk,
1791
          d => i(index),
1792
          q => o(index),
1793
          ce => ce,
1794
          s => clr
1795
        );
1796
    end generate;
1797
  end generate;
1798
end architecture structural;
1799
-- synopsys translate_off
1800
library unisim;
1801
use unisim.vcomponents.all;
1802
-- synopsys translate_on
1803
library IEEE;
1804
use IEEE.std_logic_1164.all;
1805
use work.conv_pkg.all;
1806
entity synth_reg_w_init is
1807
  generic (
1808
    width: integer := 8;
1809
    init_index: integer := 0;
1810
    init_value: bit_vector := b"0000";
1811
    latency: integer := 1
1812
  );
1813
  port (
1814
    i: in std_logic_vector(width - 1 downto 0);
1815
    ce: in std_logic;
1816
    clr: in std_logic;
1817
    clk: in std_logic;
1818
    o: out std_logic_vector(width - 1 downto 0)
1819
  );
1820
end synth_reg_w_init;
1821
architecture structural of synth_reg_w_init is
1822
  component single_reg_w_init
1823
    generic (
1824
      width: integer := 8;
1825
      init_index: integer := 0;
1826
      init_value: bit_vector := b"0000"
1827
    );
1828
    port (
1829
      i: in std_logic_vector(width - 1 downto 0);
1830
      ce: in std_logic;
1831
      clr: in std_logic;
1832
      clk: in std_logic;
1833
      o: out std_logic_vector(width - 1 downto 0)
1834
    );
1835
  end component;
1836
  signal dly_i: std_logic_vector((latency + 1) * width - 1 downto 0);
1837
  signal dly_clr: std_logic;
1838
begin
1839
  latency_eq_0: if (latency = 0) generate
1840
    o <= i;
1841
  end generate;
1842
  latency_gt_0: if (latency >= 1) generate
1843
    dly_i((latency + 1) * width - 1 downto latency * width) <= i
1844
      after 200 ps;
1845
    dly_clr <= clr after 200 ps;
1846
    fd_array: for index in latency downto 1 generate
1847
       reg_comp: single_reg_w_init
1848
          generic map (
1849
            width => width,
1850
            init_index => init_index,
1851
            init_value => init_value
1852
          )
1853
          port map (
1854
            clk => clk,
1855
            i => dly_i((index + 1) * width - 1 downto index * width),
1856
            o => dly_i(index * width - 1 downto (index - 1) * width),
1857
            ce => ce,
1858
            clr => dly_clr
1859
          );
1860
    end generate;
1861
    o <= dly_i(width - 1 downto 0);
1862
  end generate;
1863
end structural;
1864
 
1865
-------------------------------------------------------------------
1866
-- System Generator version 12.3 VHDL source file.
1867
--
1868
-- Copyright(C) 2010 by Xilinx, Inc.  All rights reserved.  This
1869
-- text/file contains proprietary, confidential information of Xilinx,
1870
-- Inc., is distributed under license from Xilinx, Inc., and may be used,
1871
-- copied and/or disclosed only pursuant to the terms of a valid license
1872
-- agreement with Xilinx, Inc.  Xilinx hereby grants you a license to use
1873
-- this text/file solely for design, simulation, implementation and
1874
-- creation of design files limited to Xilinx devices or technologies.
1875
-- Use with non-Xilinx devices or technologies is expressly prohibited
1876
-- and immediately terminates your license unless covered by a separate
1877
-- agreement.
1878
--
1879
-- Xilinx is providing this design, code, or information "as is" solely
1880
-- for use in developing programs and solutions for Xilinx devices.  By
1881
-- providing this design, code, or information as one possible
1882
-- implementation of this feature, application or standard, Xilinx is
1883
-- making no representation that this implementation is free from any
1884
-- claims of infringement.  You are responsible for obtaining any rights
1885
-- you may require for your implementation.  Xilinx expressly disclaims
1886
-- any warranty whatsoever with respect to the adequacy of the
1887
-- implementation, including but not limited to warranties of
1888
-- merchantability or fitness for a particular purpose.
1889
--
1890
-- Xilinx products are not intended for use in life support appliances,
1891
-- devices, or systems.  Use in such applications is expressly prohibited.
1892
--
1893
-- Any modifications that are made to the source code are done at the user's
1894
-- sole risk and will be unsupported.
1895
--
1896
-- This copyright and support notice must be retained as part of this
1897
-- text at all times.  (c) Copyright 1995-2010 Xilinx, Inc.  All rights
1898
-- reserved.
1899
-------------------------------------------------------------------
1900
library IEEE;
1901
use IEEE.std_logic_1164.all;
1902
use work.conv_pkg.all;
1903
entity convert_func_call is
1904
    generic (
1905
        din_width    : integer := 16;
1906
        din_bin_pt   : integer := 4;
1907
        din_arith    : integer := xlUnsigned;
1908
        dout_width   : integer := 8;
1909
        dout_bin_pt  : integer := 2;
1910
        dout_arith   : integer := xlUnsigned;
1911
        quantization : integer := xlTruncate;
1912
        overflow     : integer := xlWrap);
1913
    port (
1914
        din : in std_logic_vector (din_width-1 downto 0);
1915
        result : out std_logic_vector (dout_width-1 downto 0));
1916
end convert_func_call;
1917
architecture behavior of convert_func_call is
1918
begin
1919
    result <= convert_type(din, din_width, din_bin_pt, din_arith,
1920
                           dout_width, dout_bin_pt, dout_arith,
1921
                           quantization, overflow);
1922
end behavior;
1923
library IEEE;
1924
use IEEE.std_logic_1164.all;
1925
use work.conv_pkg.all;
1926
entity xlconvert is
1927
    generic (
1928
        din_width    : integer := 16;
1929
        din_bin_pt   : integer := 4;
1930
        din_arith    : integer := xlUnsigned;
1931
        dout_width   : integer := 8;
1932
        dout_bin_pt  : integer := 2;
1933
        dout_arith   : integer := xlUnsigned;
1934
        en_width     : integer := 1;
1935
        en_bin_pt    : integer := 0;
1936
        en_arith     : integer := xlUnsigned;
1937
        bool_conversion : integer :=0;
1938
        latency      : integer := 0;
1939
        quantization : integer := xlTruncate;
1940
        overflow     : integer := xlWrap);
1941
    port (
1942
        din : in std_logic_vector (din_width-1 downto 0);
1943
        en  : in std_logic_vector (en_width-1 downto 0);
1944
        ce  : in std_logic;
1945
        clr : in std_logic;
1946
        clk : in std_logic;
1947
        dout : out std_logic_vector (dout_width-1 downto 0));
1948
end xlconvert;
1949
architecture behavior of xlconvert is
1950
    component synth_reg
1951
        generic (width       : integer;
1952
                 latency     : integer);
1953
        port (i       : in std_logic_vector(width-1 downto 0);
1954
              ce      : in std_logic;
1955
              clr     : in std_logic;
1956
              clk     : in std_logic;
1957
              o       : out std_logic_vector(width-1 downto 0));
1958
    end component;
1959
    component convert_func_call
1960
        generic (
1961
            din_width    : integer := 16;
1962
            din_bin_pt   : integer := 4;
1963
            din_arith    : integer := xlUnsigned;
1964
            dout_width   : integer := 8;
1965
            dout_bin_pt  : integer := 2;
1966
            dout_arith   : integer := xlUnsigned;
1967
            quantization : integer := xlTruncate;
1968
            overflow     : integer := xlWrap);
1969
        port (
1970
            din : in std_logic_vector (din_width-1 downto 0);
1971
            result : out std_logic_vector (dout_width-1 downto 0));
1972
    end component;
1973
    -- synopsys translate_off
1974
    -- synopsys translate_on
1975
    signal result : std_logic_vector(dout_width-1 downto 0);
1976
    signal internal_ce : std_logic;
1977
begin
1978
    -- synopsys translate_off
1979
    -- synopsys translate_on
1980
    internal_ce <= ce and en(0);
1981
 
1982
    bool_conversion_generate : if (bool_conversion = 1)
1983
    generate
1984
      result <= din;
1985
    end generate;
1986
    std_conversion_generate : if (bool_conversion = 0)
1987
    generate
1988
      convert : convert_func_call
1989
        generic map (
1990
          din_width   => din_width,
1991
          din_bin_pt  => din_bin_pt,
1992
          din_arith   => din_arith,
1993
          dout_width  => dout_width,
1994
          dout_bin_pt => dout_bin_pt,
1995
          dout_arith  => dout_arith,
1996
          quantization => quantization,
1997
          overflow     => overflow)
1998
        port map (
1999
          din => din,
2000
          result => result);
2001
    end generate;
2002
    latency_test : if (latency > 0) generate
2003
        reg : synth_reg
2004
            generic map (
2005
              width => dout_width,
2006
              latency => latency
2007
            )
2008
            port map (
2009
              i => result,
2010
              ce => internal_ce,
2011
              clr => clr,
2012
              clk => clk,
2013
              o => dout
2014
            );
2015
    end generate;
2016
    latency0 : if (latency = 0)
2017
    generate
2018
        dout <= result;
2019
    end generate latency0;
2020
end  behavior;
2021
library IEEE;
2022
use IEEE.std_logic_1164.all;
2023
use IEEE.numeric_std.all;
2024
use work.conv_pkg.all;
2025
 
2026
entity constant_963ed6358a is
2027
  port (
2028
    op : out std_logic_vector((1 - 1) downto 0);
2029
    clk : in std_logic;
2030
    ce : in std_logic;
2031
    clr : in std_logic);
2032
end constant_963ed6358a;
2033
 
2034
 
2035
architecture behavior of constant_963ed6358a is
2036
begin
2037
  op <= "0";
2038
end behavior;
2039
 
2040
 
2041
-------------------------------------------------------------------
2042
-- System Generator version 12.3 VHDL source file.
2043
--
2044
-- Copyright(C) 2010 by Xilinx, Inc.  All rights reserved.  This
2045
-- text/file contains proprietary, confidential information of Xilinx,
2046
-- Inc., is distributed under license from Xilinx, Inc., and may be used,
2047
-- copied and/or disclosed only pursuant to the terms of a valid license
2048
-- agreement with Xilinx, Inc.  Xilinx hereby grants you a license to use
2049
-- this text/file solely for design, simulation, implementation and
2050
-- creation of design files limited to Xilinx devices or technologies.
2051
-- Use with non-Xilinx devices or technologies is expressly prohibited
2052
-- and immediately terminates your license unless covered by a separate
2053
-- agreement.
2054
--
2055
-- Xilinx is providing this design, code, or information "as is" solely
2056
-- for use in developing programs and solutions for Xilinx devices.  By
2057
-- providing this design, code, or information as one possible
2058
-- implementation of this feature, application or standard, Xilinx is
2059
-- making no representation that this implementation is free from any
2060
-- claims of infringement.  You are responsible for obtaining any rights
2061
-- you may require for your implementation.  Xilinx expressly disclaims
2062
-- any warranty whatsoever with respect to the adequacy of the
2063
-- implementation, including but not limited to warranties of
2064
-- merchantability or fitness for a particular purpose.
2065
--
2066
-- Xilinx products are not intended for use in life support appliances,
2067
-- devices, or systems.  Use in such applications is expressly prohibited.
2068
--
2069
-- Any modifications that are made to the source code are done at the user's
2070
-- sole risk and will be unsupported.
2071
--
2072
-- This copyright and support notice must be retained as part of this
2073
-- text at all times.  (c) Copyright 1995-2010 Xilinx, Inc.  All rights
2074
-- reserved.
2075
-------------------------------------------------------------------
2076
library IEEE;
2077
use IEEE.std_logic_1164.all;
2078
use work.conv_pkg.all;
2079
entity xlregister is
2080
   generic (d_width          : integer := 5;
2081
            init_value       : bit_vector := b"00");
2082
   port (d   : in std_logic_vector (d_width-1 downto 0);
2083
         rst : in std_logic_vector(0 downto 0) := "0";
2084
         en  : in std_logic_vector(0 downto 0) := "1";
2085
         ce  : in std_logic;
2086
         clk : in std_logic;
2087
         q   : out std_logic_vector (d_width-1 downto 0));
2088
end xlregister;
2089
architecture behavior of xlregister is
2090
   component synth_reg_w_init
2091
      generic (width      : integer;
2092
               init_index : integer;
2093
               init_value : bit_vector;
2094
               latency    : integer);
2095
      port (i   : in std_logic_vector(width-1 downto 0);
2096
            ce  : in std_logic;
2097
            clr : in std_logic;
2098
            clk : in std_logic;
2099
            o   : out std_logic_vector(width-1 downto 0));
2100
   end component;
2101
   -- synopsys translate_off
2102
   signal real_d, real_q           : real;
2103
   -- synopsys translate_on
2104
   signal internal_clr             : std_logic;
2105
   signal internal_ce              : std_logic;
2106
begin
2107
   internal_clr <= rst(0) and ce;
2108
   internal_ce  <= en(0) and ce;
2109
   synth_reg_inst : synth_reg_w_init
2110
      generic map (width      => d_width,
2111
                   init_index => 2,
2112
                   init_value => init_value,
2113
                   latency    => 1)
2114
      port map (i   => d,
2115
                ce  => internal_ce,
2116
                clr => internal_clr,
2117
                clk => clk,
2118
                o   => q);
2119
end architecture behavior;
2120
library IEEE;
2121
use IEEE.std_logic_1164.all;
2122
use IEEE.numeric_std.all;
2123
use work.conv_pkg.all;
2124
 
2125
entity constant_6293007044 is
2126
  port (
2127
    op : out std_logic_vector((1 - 1) downto 0);
2128
    clk : in std_logic;
2129
    ce : in std_logic;
2130
    clr : in std_logic);
2131
end constant_6293007044;
2132
 
2133
 
2134
architecture behavior of constant_6293007044 is
2135
begin
2136
  op <= "1";
2137
end behavior;
2138
 
2139
library IEEE;
2140
use IEEE.std_logic_1164.all;
2141
use IEEE.numeric_std.all;
2142
use work.conv_pkg.all;
2143
 
2144
entity constant_19562ab42f is
2145
  port (
2146
    op : out std_logic_vector((8 - 1) downto 0);
2147
    clk : in std_logic;
2148
    ce : in std_logic;
2149
    clr : in std_logic);
2150
end constant_19562ab42f;
2151
 
2152
 
2153
architecture behavior of constant_19562ab42f is
2154
begin
2155
  op <= "11111111";
2156
end behavior;
2157
 
2158
 
2159
-------------------------------------------------------------------
2160
-- System Generator version 12.3 VHDL source file.
2161
--
2162
-- Copyright(C) 2010 by Xilinx, Inc.  All rights reserved.  This
2163
-- text/file contains proprietary, confidential information of Xilinx,
2164
-- Inc., is distributed under license from Xilinx, Inc., and may be used,
2165
-- copied and/or disclosed only pursuant to the terms of a valid license
2166
-- agreement with Xilinx, Inc.  Xilinx hereby grants you a license to use
2167
-- this text/file solely for design, simulation, implementation and
2168
-- creation of design files limited to Xilinx devices or technologies.
2169
-- Use with non-Xilinx devices or technologies is expressly prohibited
2170
-- and immediately terminates your license unless covered by a separate
2171
-- agreement.
2172
--
2173
-- Xilinx is providing this design, code, or information "as is" solely
2174
-- for use in developing programs and solutions for Xilinx devices.  By
2175
-- providing this design, code, or information as one possible
2176
-- implementation of this feature, application or standard, Xilinx is
2177
-- making no representation that this implementation is free from any
2178
-- claims of infringement.  You are responsible for obtaining any rights
2179
-- you may require for your implementation.  Xilinx expressly disclaims
2180
-- any warranty whatsoever with respect to the adequacy of the
2181
-- implementation, including but not limited to warranties of
2182
-- merchantability or fitness for a particular purpose.
2183
--
2184
-- Xilinx products are not intended for use in life support appliances,
2185
-- devices, or systems.  Use in such applications is expressly prohibited.
2186
--
2187
-- Any modifications that are made to the source code are done at the user's
2188
-- sole risk and will be unsupported.
2189
--
2190
-- This copyright and support notice must be retained as part of this
2191
-- text at all times.  (c) Copyright 1995-2010 Xilinx, Inc.  All rights
2192
-- reserved.
2193
-------------------------------------------------------------------
2194
-- synopsys translate_off
2195
library XilinxCoreLib;
2196
-- synopsys translate_on
2197
library IEEE;
2198
use IEEE.std_logic_1164.all;
2199
use work.conv_pkg.all;
2200
entity xlcounter_free is
2201
  generic (
2202
    core_name0: string := "";
2203
    op_width: integer := 5;
2204
    op_arith: integer := xlSigned
2205
  );
2206
  port (
2207
    ce: in std_logic;
2208
    clr: in std_logic;
2209
    clk: in std_logic;
2210
    op: out std_logic_vector(op_width - 1 downto 0);
2211
    up: in std_logic_vector(0 downto 0) := (others => '0');
2212
    load: in std_logic_vector(0 downto 0) := (others => '0');
2213
    din: in std_logic_vector(op_width - 1 downto 0) := (others => '0');
2214
    en: in std_logic_vector(0 downto 0);
2215
    rst: in std_logic_vector(0 downto 0)
2216
  );
2217
end xlcounter_free ;
2218
architecture behavior of xlcounter_free is
2219
  component cntr_11_0_1a411d6ef586e892
2220
    port (
2221
      clk: in std_logic;
2222
      ce: in std_logic;
2223
      SINIT: in std_logic;
2224
      q: out std_logic_vector(op_width - 1 downto 0)
2225
    );
2226
  end component;
2227
  attribute syn_black_box of cntr_11_0_1a411d6ef586e892:
2228
    component is true;
2229
  attribute fpga_dont_touch of cntr_11_0_1a411d6ef586e892:
2230
    component is "true";
2231
  attribute box_type of cntr_11_0_1a411d6ef586e892:
2232
    component  is "black_box";
2233
-- synopsys translate_off
2234
  constant zeroVec: std_logic_vector(op_width - 1 downto 0) := (others => '0');
2235
  constant oneVec: std_logic_vector(op_width - 1 downto 0) := (others => '1');
2236
  constant zeroStr: string(1 to op_width) :=
2237
    std_logic_vector_to_bin_string(zeroVec);
2238
  constant oneStr: string(1 to op_width) :=
2239
    std_logic_vector_to_bin_string(oneVec);
2240
-- synopsys translate_on
2241
  signal core_sinit: std_logic;
2242
  signal core_ce: std_logic;
2243
  signal op_net: std_logic_vector(op_width - 1 downto 0);
2244
begin
2245
  core_ce <= ce and en(0);
2246
  core_sinit <= (clr or rst(0)) and ce;
2247
  op <= op_net;
2248
  comp0: if ((core_name0 = "cntr_11_0_1a411d6ef586e892")) generate
2249
    core_instance0: cntr_11_0_1a411d6ef586e892
2250
      port map (
2251
        clk => clk,
2252
        ce => core_ce,
2253
        SINIT => core_sinit,
2254
        q => op_net
2255
      );
2256
  end generate;
2257
end behavior;
2258
library IEEE;
2259
use IEEE.std_logic_1164.all;
2260
use IEEE.numeric_std.all;
2261
use work.conv_pkg.all;
2262
 
2263
entity inverter_e5b38cca3b is
2264
  port (
2265
    ip : in std_logic_vector((1 - 1) downto 0);
2266
    op : out std_logic_vector((1 - 1) downto 0);
2267
    clk : in std_logic;
2268
    ce : in std_logic;
2269
    clr : in std_logic);
2270
end inverter_e5b38cca3b;
2271
 
2272
 
2273
architecture behavior of inverter_e5b38cca3b is
2274
  signal ip_1_26: boolean;
2275
  type array_type_op_mem_22_20 is array (0 to (1 - 1)) of boolean;
2276
  signal op_mem_22_20: array_type_op_mem_22_20 := (
2277
 
2278
  signal op_mem_22_20_front_din: boolean;
2279
  signal op_mem_22_20_back: boolean;
2280
  signal op_mem_22_20_push_front_pop_back_en: std_logic;
2281
  signal internal_ip_12_1_bitnot: boolean;
2282
begin
2283
  ip_1_26 <= ((ip) = "1");
2284
  op_mem_22_20_back <= op_mem_22_20(0);
2285
  proc_op_mem_22_20: process (clk)
2286
  is
2287
    variable i: integer;
2288
  begin
2289
    if (clk'event and (clk = '1')) then
2290
      if ((ce = '1') and (op_mem_22_20_push_front_pop_back_en = '1')) then
2291
        op_mem_22_20(0) <= op_mem_22_20_front_din;
2292
      end if;
2293
    end if;
2294
  end process proc_op_mem_22_20;
2295
  internal_ip_12_1_bitnot <= ((not boolean_to_vector(ip_1_26)) = "1");
2296
  op_mem_22_20_push_front_pop_back_en <= '0';
2297
  op <= boolean_to_vector(internal_ip_12_1_bitnot);
2298
end behavior;
2299
 
2300
library IEEE;
2301
use IEEE.std_logic_1164.all;
2302
use IEEE.numeric_std.all;
2303
use work.conv_pkg.all;
2304
 
2305
entity logical_80f90b97d0 is
2306
  port (
2307
    d0 : in std_logic_vector((1 - 1) downto 0);
2308
    d1 : in std_logic_vector((1 - 1) downto 0);
2309
    y : out std_logic_vector((1 - 1) downto 0);
2310
    clk : in std_logic;
2311
    ce : in std_logic;
2312
    clr : in std_logic);
2313
end logical_80f90b97d0;
2314
 
2315
 
2316
architecture behavior of logical_80f90b97d0 is
2317
  signal d0_1_24: std_logic;
2318
  signal d1_1_27: std_logic;
2319
  signal fully_2_1_bit: std_logic;
2320
begin
2321
  d0_1_24 <= d0(0);
2322
  d1_1_27 <= d1(0);
2323
  fully_2_1_bit <= d0_1_24 and d1_1_27;
2324
  y <= std_logic_to_vector(fully_2_1_bit);
2325
end behavior;
2326
 
2327
library IEEE;
2328
use IEEE.std_logic_1164.all;
2329
use work.conv_pkg.all;
2330
 
2331
-- Generated from Simulink block "USER_LOGIC"
2332
 
2333
entity user_logic is
2334
  port (
2335
    bram_rd_dout: in std_logic_vector(63 downto 0);
2336
    ce_1: in std_logic;
2337
    clk_1: in std_logic;
2338
    data_out: in std_logic;
2339
    data_out_x0: in std_logic_vector(31 downto 0);
2340
    data_out_x1: in std_logic;
2341
    data_out_x10: in std_logic_vector(31 downto 0);
2342
    data_out_x11: in std_logic;
2343
    data_out_x12: in std_logic_vector(31 downto 0);
2344
    data_out_x13: in std_logic;
2345
    data_out_x14: in std_logic_vector(31 downto 0);
2346
    data_out_x15: in std_logic;
2347
    data_out_x16: in std_logic_vector(31 downto 0);
2348
    data_out_x17: in std_logic;
2349
    data_out_x18: in std_logic_vector(31 downto 0);
2350
    data_out_x19: in std_logic_vector(31 downto 0);
2351
    data_out_x2: in std_logic_vector(31 downto 0);
2352
    data_out_x20: in std_logic;
2353
    data_out_x21: in std_logic_vector(31 downto 0);
2354
    data_out_x22: in std_logic;
2355
    data_out_x23: in std_logic;
2356
    data_out_x24: in std_logic_vector(31 downto 0);
2357
    data_out_x25: in std_logic;
2358
    data_out_x26: in std_logic_vector(31 downto 0);
2359
    data_out_x27: in std_logic;
2360
    data_out_x28: in std_logic_vector(31 downto 0);
2361
    data_out_x3: in std_logic;
2362
    data_out_x6: in std_logic_vector(31 downto 0);
2363
    data_out_x7: in std_logic;
2364
    data_out_x8: in std_logic_vector(31 downto 0);
2365
    data_out_x9: in std_logic;
2366
    fifo_rd_count: in std_logic_vector(14 downto 0);
2367
    fifo_rd_dout: in std_logic_vector(71 downto 0);
2368
    fifo_rd_empty: in std_logic;
2369
    fifo_rd_pempty: in std_logic;
2370
    fifo_rd_valid: in std_logic;
2371
    fifo_wr_count: in std_logic_vector(14 downto 0);
2372
    fifo_wr_full: in std_logic;
2373
    fifo_wr_pfull: in std_logic;
2374
    rst_i: in std_logic;
2375
    bram_rd_addr: out std_logic_vector(11 downto 0);
2376
    bram_wr_addr: out std_logic_vector(11 downto 0);
2377
    bram_wr_din: out std_logic_vector(63 downto 0);
2378
    bram_wr_en: out std_logic_vector(7 downto 0);
2379
    data_in: out std_logic_vector(31 downto 0);
2380
    data_in_x0: out std_logic;
2381
    data_in_x1: out std_logic;
2382
    data_in_x10: out std_logic_vector(31 downto 0);
2383
    data_in_x11: out std_logic_vector(31 downto 0);
2384
    data_in_x12: out std_logic;
2385
    data_in_x13: out std_logic_vector(31 downto 0);
2386
    data_in_x14: out std_logic;
2387
    data_in_x15: out std_logic_vector(31 downto 0);
2388
    data_in_x16: out std_logic;
2389
    data_in_x17: out std_logic_vector(31 downto 0);
2390
    data_in_x18: out std_logic;
2391
    data_in_x19: out std_logic_vector(31 downto 0);
2392
    data_in_x2: out std_logic;
2393
    data_in_x20: out std_logic_vector(31 downto 0);
2394
    data_in_x21: out std_logic;
2395
    data_in_x22: out std_logic;
2396
    data_in_x23: out std_logic_vector(31 downto 0);
2397
    data_in_x24: out std_logic;
2398
    data_in_x25: out std_logic_vector(31 downto 0);
2399
    data_in_x26: out std_logic_vector(31 downto 0);
2400
    data_in_x3: out std_logic;
2401
    data_in_x4: out std_logic_vector(31 downto 0);
2402
    data_in_x5: out std_logic;
2403
    data_in_x6: out std_logic_vector(31 downto 0);
2404
    data_in_x7: out std_logic;
2405
    data_in_x8: out std_logic_vector(31 downto 0);
2406
    data_in_x9: out std_logic;
2407
    en: out std_logic;
2408
    en_x0: out std_logic;
2409
    en_x1: out std_logic;
2410
    en_x10: out std_logic;
2411
    en_x11: out std_logic;
2412
    en_x12: out std_logic;
2413
    en_x13: out std_logic;
2414
    en_x14: out std_logic;
2415
    en_x15: out std_logic;
2416
    en_x16: out std_logic;
2417
    en_x17: out std_logic;
2418
    en_x18: out std_logic;
2419
    en_x19: out std_logic;
2420
    en_x2: out std_logic;
2421
    en_x20: out std_logic;
2422
    en_x21: out std_logic;
2423
    en_x22: out std_logic;
2424
    en_x23: out std_logic;
2425
    en_x24: out std_logic;
2426
    en_x25: out std_logic;
2427
    en_x26: out std_logic;
2428
    en_x3: out std_logic;
2429
    en_x4: out std_logic;
2430
    en_x5: out std_logic;
2431
    en_x6: out std_logic;
2432
    en_x7: out std_logic;
2433
    en_x8: out std_logic;
2434
    en_x9: out std_logic;
2435
    fifo_rd_en: out std_logic;
2436
    fifo_wr_din: out std_logic_vector(71 downto 0);
2437
    fifo_wr_en: out std_logic;
2438
    rst_o: out std_logic;
2439
    user_int_1o: out std_logic;
2440
    user_int_2o: out std_logic;
2441
    user_int_3o: out std_logic
2442
  );
2443
end user_logic;
2444
 
2445
architecture structural of user_logic is
2446
  attribute core_generation_info: string;
2447
  attribute core_generation_info of structural : architecture is "PCIe_UserLogic_00,sysgen_core,{clock_period=5.00000000,clocking=Clock_Enables,compilation=NGC_Netlist,sample_periods=1.00000000000,testbench=0,total_blocks=339,xilinx_constant_block_block=23,xilinx_counter_block=1,xilinx_gateway_in_block=44,xilinx_gateway_out_block=39,xilinx_inverter_block=2,xilinx_logical_block_block=1,xilinx_register_block=78,xilinx_shared_memory_based_from_register_block=62,xilinx_shared_memory_based_to_register_block=62,xilinx_subsystem_generator_block=1,xilinx_system_generator_block=2,xilinx_type_converter_block=14,}";
2448
 
2449
  signal bram_rd_addr_net: std_logic_vector(11 downto 0);
2450
  signal bram_rd_dout_net: std_logic_vector(63 downto 0);
2451
  signal bram_wr_addr_net: std_logic_vector(11 downto 0);
2452
  signal bram_wr_din_net: std_logic_vector(63 downto 0);
2453
  signal bram_wr_en_net: std_logic_vector(7 downto 0);
2454
  signal ce_1_sg_x0: std_logic;
2455
  signal clk_1_sg_x0: std_logic;
2456
  signal constant10_op_net: std_logic;
2457
  signal constant11_op_net: std_logic;
2458
  signal constant12_op_net: std_logic;
2459
  signal constant14_op_net: std_logic;
2460
  signal constant15_op_net: std_logic;
2461
  signal constant19_op_net: std_logic;
2462
  signal constant1_op_net: std_logic;
2463
  signal constant20_op_net: std_logic;
2464
  signal constant21_op_net: std_logic;
2465
  signal constant22_op_net: std_logic;
2466
  signal constant23_op_net: std_logic;
2467
  signal constant24_op_net: std_logic;
2468
  signal constant25_op_net: std_logic;
2469
  signal constant26_op_net: std_logic;
2470
  signal constant2_op_net: std_logic_vector(7 downto 0);
2471
  signal constant3_op_net: std_logic;
2472
  signal constant4_op_net: std_logic;
2473
  signal constant6_op_net_x0: std_logic;
2474
  signal constant7_op_net: std_logic;
2475
  signal constant8_op_net: std_logic;
2476
  signal constant9_op_net: std_logic;
2477
  signal convert11_dout_net: std_logic;
2478
  signal convert12_dout_net: std_logic;
2479
  signal convert14_dout_net: std_logic;
2480
  signal convert15_dout_net: std_logic;
2481
  signal convert16_dout_net: std_logic;
2482
  signal convert17_dout_net: std_logic;
2483
  signal convert1_dout_net: std_logic;
2484
  signal convert4_dout_net: std_logic;
2485
  signal convert5_dout_net: std_logic;
2486
  signal convert6_dout_net: std_logic;
2487
  signal convert7_dout_net: std_logic;
2488
  signal convert8_dout_net: std_logic;
2489
  signal counter4_op_net: std_logic_vector(11 downto 0);
2490
  signal data_in_net: std_logic_vector(31 downto 0);
2491
  signal data_in_x0_net: std_logic;
2492
  signal data_in_x10_net: std_logic_vector(31 downto 0);
2493
  signal data_in_x11_net: std_logic_vector(31 downto 0);
2494
  signal data_in_x12_net: std_logic;
2495
  signal data_in_x13_net: std_logic_vector(31 downto 0);
2496
  signal data_in_x14_net: std_logic;
2497
  signal data_in_x15_net: std_logic_vector(31 downto 0);
2498
  signal data_in_x16_net: std_logic;
2499
  signal data_in_x17_net: std_logic_vector(31 downto 0);
2500
  signal data_in_x18_net: std_logic;
2501
  signal data_in_x19_net: std_logic_vector(31 downto 0);
2502
  signal data_in_x1_net: std_logic;
2503
  signal data_in_x20_net: std_logic_vector(31 downto 0);
2504
  signal data_in_x21_net: std_logic;
2505
  signal data_in_x22_net: std_logic;
2506
  signal data_in_x23_net: std_logic_vector(31 downto 0);
2507
  signal data_in_x24_net: std_logic;
2508
  signal data_in_x25_net: std_logic_vector(31 downto 0);
2509
  signal data_in_x26_net: std_logic_vector(31 downto 0);
2510
  signal data_in_x2_net: std_logic;
2511
  signal data_in_x3_net: std_logic;
2512
  signal data_in_x4_net: std_logic_vector(31 downto 0);
2513
  signal data_in_x5_net: std_logic;
2514
  signal data_in_x6_net: std_logic_vector(31 downto 0);
2515
  signal data_in_x7_net: std_logic;
2516
  signal data_in_x8_net: std_logic_vector(31 downto 0);
2517
  signal data_in_x9_net: std_logic;
2518
  signal data_out_net: std_logic;
2519
  signal data_out_x0_net: std_logic_vector(31 downto 0);
2520
  signal data_out_x10_net: std_logic_vector(31 downto 0);
2521
  signal data_out_x11_net: std_logic;
2522
  signal data_out_x12_net: std_logic_vector(31 downto 0);
2523
  signal data_out_x13_net: std_logic;
2524
  signal data_out_x14_net: std_logic_vector(31 downto 0);
2525
  signal data_out_x15_net: std_logic;
2526
  signal data_out_x16_net: std_logic_vector(31 downto 0);
2527
  signal data_out_x17_net: std_logic;
2528
  signal data_out_x18_net: std_logic_vector(31 downto 0);
2529
  signal data_out_x19_net: std_logic_vector(31 downto 0);
2530
  signal data_out_x1_net: std_logic;
2531
  signal data_out_x20_net: std_logic;
2532
  signal data_out_x21_net: std_logic_vector(31 downto 0);
2533
  signal data_out_x22_net: std_logic;
2534
  signal data_out_x23_net: std_logic;
2535
  signal data_out_x24_net: std_logic_vector(31 downto 0);
2536
  signal data_out_x25_net: std_logic;
2537
  signal data_out_x26_net: std_logic_vector(31 downto 0);
2538
  signal data_out_x27_net: std_logic;
2539
  signal data_out_x28_net: std_logic_vector(31 downto 0);
2540
  signal data_out_x2_net: std_logic_vector(31 downto 0);
2541
  signal data_out_x3_net: std_logic;
2542
  signal data_out_x6_net: std_logic_vector(31 downto 0);
2543
  signal data_out_x7_net: std_logic;
2544
  signal data_out_x8_net: std_logic_vector(31 downto 0);
2545
  signal data_out_x9_net: std_logic;
2546
  signal dinb: std_logic_vector(31 downto 0);
2547
  signal dinb_x0: std_logic_vector(31 downto 0);
2548
  signal fifo_rd_count_net: std_logic_vector(14 downto 0);
2549
  signal fifo_rd_dout_net: std_logic_vector(71 downto 0);
2550
  signal fifo_rd_empty_net: std_logic;
2551
  signal fifo_rd_en_net: std_logic;
2552
  signal fifo_rd_pempty_net: std_logic;
2553
  signal fifo_rd_valid_net: std_logic;
2554
  signal fifo_wr_count_net: std_logic_vector(14 downto 0);
2555
  signal fifo_wr_din_net: std_logic_vector(71 downto 0);
2556
  signal fifo_wr_en_net: std_logic;
2557
  signal fifo_wr_full_net: std_logic;
2558
  signal fifo_wr_pfull_net: std_logic;
2559
  signal inverter3_op_net: std_logic;
2560
  signal inverter5_op_net: std_logic;
2561
  signal logical4_y_net: std_logic;
2562
  signal rst_i_net: std_logic;
2563
  signal rst_o_net: std_logic;
2564
  signal timecountreset: std_logic;
2565
  signal timecounttrigger: std_logic;
2566
  signal tx_en_in105_q_net: std_logic;
2567
  signal tx_en_in107_q_net: std_logic;
2568
  signal tx_en_in116_q_net: std_logic;
2569
  signal tx_en_in117_q_net: std_logic_vector(31 downto 0);
2570
  signal tx_en_in119_q_net: std_logic;
2571
  signal tx_en_in120_q_net: std_logic_vector(31 downto 0);
2572
  signal tx_en_in123_q_net: std_logic;
2573
  signal tx_en_in124_q_net: std_logic_vector(31 downto 0);
2574
  signal tx_en_in127_q_net: std_logic;
2575
  signal tx_en_in128_q_net: std_logic_vector(31 downto 0);
2576
  signal tx_en_in12_q_net: std_logic_vector(31 downto 0);
2577
  signal tx_en_in16_q_net: std_logic_vector(11 downto 0);
2578
  signal tx_en_in17_q_net: std_logic_vector(11 downto 0);
2579
  signal tx_en_in18_q_net: std_logic_vector(7 downto 0);
2580
  signal tx_en_in30_q_net: std_logic_vector(11 downto 0);
2581
  signal tx_en_in4_q_net: std_logic;
2582
  signal tx_en_in52_q_net: std_logic_vector(31 downto 0);
2583
  signal tx_en_in58_q_net: std_logic;
2584
  signal tx_en_in59_q_net: std_logic;
2585
  signal tx_en_in5_q_net: std_logic;
2586
  signal tx_en_in60_q_net: std_logic_vector(31 downto 0);
2587
  signal tx_en_in61_q_net: std_logic;
2588
  signal tx_en_in65_q_net: std_logic_vector(31 downto 0);
2589
  signal tx_en_in67_q_net: std_logic;
2590
  signal tx_en_in6_q_net: std_logic_vector(31 downto 0);
2591
  signal tx_en_in86_q_net: std_logic;
2592
  signal tx_en_in87_q_net: std_logic_vector(31 downto 0);
2593
  signal tx_en_in89_q_net: std_logic;
2594
  signal tx_en_in8_q_net: std_logic;
2595
  signal tx_en_in90_q_net: std_logic_vector(31 downto 0);
2596
  signal tx_en_in92_q_net: std_logic;
2597
  signal tx_en_in93_q_net: std_logic_vector(31 downto 0);
2598
  signal user_int_1o_net: std_logic;
2599
  signal user_int_2o_net: std_logic;
2600
  signal user_int_3o_net: std_logic;
2601
 
2602
begin
2603
  bram_rd_dout_net <= bram_rd_dout;
2604
  ce_1_sg_x0 <= ce_1;
2605
  clk_1_sg_x0 <= clk_1;
2606
  data_out_net <= data_out;
2607
  data_out_x0_net <= data_out_x0;
2608
  data_out_x1_net <= data_out_x1;
2609
  data_out_x10_net <= data_out_x10;
2610
  data_out_x11_net <= data_out_x11;
2611
  data_out_x12_net <= data_out_x12;
2612
  data_out_x13_net <= data_out_x13;
2613
  data_out_x14_net <= data_out_x14;
2614
  data_out_x15_net <= data_out_x15;
2615
  data_out_x16_net <= data_out_x16;
2616
  data_out_x17_net <= data_out_x17;
2617
  data_out_x18_net <= data_out_x18;
2618
  data_out_x19_net <= data_out_x19;
2619
  data_out_x2_net <= data_out_x2;
2620
  data_out_x20_net <= data_out_x20;
2621
  data_out_x21_net <= data_out_x21;
2622
  data_out_x22_net <= data_out_x22;
2623
  data_out_x23_net <= data_out_x23;
2624
  data_out_x24_net <= data_out_x24;
2625
  data_out_x25_net <= data_out_x25;
2626
  data_out_x26_net <= data_out_x26;
2627
  data_out_x27_net <= data_out_x27;
2628
  data_out_x28_net <= data_out_x28;
2629
  data_out_x3_net <= data_out_x3;
2630
  data_out_x6_net <= data_out_x6;
2631
  data_out_x7_net <= data_out_x7;
2632
  data_out_x8_net <= data_out_x8;
2633
  data_out_x9_net <= data_out_x9;
2634
  fifo_rd_count_net <= fifo_rd_count;
2635
  fifo_rd_dout_net <= fifo_rd_dout;
2636
  fifo_rd_empty_net <= fifo_rd_empty;
2637
  fifo_rd_pempty_net <= fifo_rd_pempty;
2638
  fifo_rd_valid_net <= fifo_rd_valid;
2639
  fifo_wr_count_net <= fifo_wr_count;
2640
  fifo_wr_full_net <= fifo_wr_full;
2641
  fifo_wr_pfull_net <= fifo_wr_pfull;
2642
  rst_i_net <= rst_i;
2643
  bram_rd_addr <= bram_rd_addr_net;
2644
  bram_wr_addr <= bram_wr_addr_net;
2645
  bram_wr_din <= bram_wr_din_net;
2646
  bram_wr_en <= bram_wr_en_net;
2647
  data_in <= data_in_net;
2648
  data_in_x0 <= data_in_x0_net;
2649
  data_in_x1 <= data_in_x1_net;
2650
  data_in_x10 <= data_in_x10_net;
2651
  data_in_x11 <= data_in_x11_net;
2652
  data_in_x12 <= data_in_x12_net;
2653
  data_in_x13 <= data_in_x13_net;
2654
  data_in_x14 <= data_in_x14_net;
2655
  data_in_x15 <= data_in_x15_net;
2656
  data_in_x16 <= data_in_x16_net;
2657
  data_in_x17 <= data_in_x17_net;
2658
  data_in_x18 <= data_in_x18_net;
2659
  data_in_x19 <= data_in_x19_net;
2660
  data_in_x2 <= data_in_x2_net;
2661
  data_in_x20 <= data_in_x20_net;
2662
  data_in_x21 <= data_in_x21_net;
2663
  data_in_x22 <= data_in_x22_net;
2664
  data_in_x23 <= data_in_x23_net;
2665
  data_in_x24 <= data_in_x24_net;
2666
  data_in_x25 <= data_in_x25_net;
2667
  data_in_x26 <= data_in_x26_net;
2668
  data_in_x3 <= data_in_x3_net;
2669
  data_in_x4 <= data_in_x4_net;
2670
  data_in_x5 <= data_in_x5_net;
2671
  data_in_x6 <= data_in_x6_net;
2672
  data_in_x7 <= data_in_x7_net;
2673
  data_in_x8 <= data_in_x8_net;
2674
  data_in_x9 <= data_in_x9_net;
2675
  en <= constant6_op_net_x0;
2676
  en_x0 <= constant6_op_net_x0;
2677
  en_x1 <= constant6_op_net_x0;
2678
  en_x10 <= constant6_op_net_x0;
2679
  en_x11 <= constant6_op_net_x0;
2680
  en_x12 <= constant6_op_net_x0;
2681
  en_x13 <= constant6_op_net_x0;
2682
  en_x14 <= constant6_op_net_x0;
2683
  en_x15 <= constant6_op_net_x0;
2684
  en_x16 <= constant6_op_net_x0;
2685
  en_x17 <= constant6_op_net_x0;
2686
  en_x18 <= constant6_op_net_x0;
2687
  en_x19 <= constant6_op_net_x0;
2688
  en_x2 <= constant6_op_net_x0;
2689
  en_x20 <= constant6_op_net_x0;
2690
  en_x21 <= constant6_op_net_x0;
2691
  en_x22 <= constant6_op_net_x0;
2692
  en_x23 <= constant6_op_net_x0;
2693
  en_x24 <= constant6_op_net_x0;
2694
  en_x25 <= constant6_op_net_x0;
2695
  en_x26 <= constant6_op_net_x0;
2696
  en_x3 <= constant6_op_net_x0;
2697
  en_x4 <= constant6_op_net_x0;
2698
  en_x5 <= constant6_op_net_x0;
2699
  en_x6 <= constant6_op_net_x0;
2700
  en_x7 <= constant6_op_net_x0;
2701
  en_x8 <= constant6_op_net_x0;
2702
  en_x9 <= constant6_op_net_x0;
2703
  fifo_rd_en <= fifo_rd_en_net;
2704
  fifo_wr_din <= fifo_wr_din_net;
2705
  fifo_wr_en <= fifo_wr_en_net;
2706
  rst_o <= rst_o_net;
2707
  user_int_1o <= user_int_1o_net;
2708
  user_int_2o <= user_int_2o_net;
2709
  user_int_3o <= user_int_3o_net;
2710
 
2711
  constant1: entity work.constant_963ed6358a
2712
    port map (
2713
      ce => '0',
2714
      clk => '0',
2715
      clr => '0',
2716
      op(0) => constant1_op_net
2717
    );
2718
 
2719
  constant10: entity work.constant_963ed6358a
2720
    port map (
2721
      ce => '0',
2722
      clk => '0',
2723
      clr => '0',
2724
      op(0) => constant10_op_net
2725
    );
2726
 
2727
  constant11: entity work.constant_963ed6358a
2728
    port map (
2729
      ce => '0',
2730
      clk => '0',
2731
      clr => '0',
2732
      op(0) => constant11_op_net
2733
    );
2734
 
2735
  constant12: entity work.constant_963ed6358a
2736
    port map (
2737
      ce => '0',
2738
      clk => '0',
2739
      clr => '0',
2740
      op(0) => constant12_op_net
2741
    );
2742
 
2743
  constant14: entity work.constant_6293007044
2744
    port map (
2745
      ce => '0',
2746
      clk => '0',
2747
      clr => '0',
2748
      op(0) => constant14_op_net
2749
    );
2750
 
2751
  constant15: entity work.constant_6293007044
2752
    port map (
2753
      ce => '0',
2754
      clk => '0',
2755
      clr => '0',
2756
      op(0) => constant15_op_net
2757
    );
2758
 
2759
  constant19: entity work.constant_963ed6358a
2760
    port map (
2761
      ce => '0',
2762
      clk => '0',
2763
      clr => '0',
2764
      op(0) => constant19_op_net
2765
    );
2766
 
2767
  constant2: entity work.constant_19562ab42f
2768
    port map (
2769
      ce => '0',
2770
      clk => '0',
2771
      clr => '0',
2772
      op => constant2_op_net
2773
    );
2774
 
2775
  constant20: entity work.constant_963ed6358a
2776
    port map (
2777
      ce => '0',
2778
      clk => '0',
2779
      clr => '0',
2780
      op(0) => constant20_op_net
2781
    );
2782
 
2783
  constant21: entity work.constant_963ed6358a
2784
    port map (
2785
      ce => '0',
2786
      clk => '0',
2787
      clr => '0',
2788
      op(0) => constant21_op_net
2789
    );
2790
 
2791
  constant22: entity work.constant_963ed6358a
2792
    port map (
2793
      ce => '0',
2794
      clk => '0',
2795
      clr => '0',
2796
      op(0) => constant22_op_net
2797
    );
2798
 
2799
  constant23: entity work.constant_963ed6358a
2800
    port map (
2801
      ce => '0',
2802
      clk => '0',
2803
      clr => '0',
2804
      op(0) => constant23_op_net
2805
    );
2806
 
2807
  constant24: entity work.constant_963ed6358a
2808
    port map (
2809
      ce => '0',
2810
      clk => '0',
2811
      clr => '0',
2812
      op(0) => constant24_op_net
2813
    );
2814
 
2815
  constant25: entity work.constant_963ed6358a
2816
    port map (
2817
      ce => '0',
2818
      clk => '0',
2819
      clr => '0',
2820
      op(0) => constant25_op_net
2821
    );
2822
 
2823
  constant26: entity work.constant_963ed6358a
2824
    port map (
2825
      ce => '0',
2826
      clk => '0',
2827
      clr => '0',
2828
      op(0) => constant26_op_net
2829
    );
2830
 
2831
  constant3: entity work.constant_963ed6358a
2832
    port map (
2833
      ce => '0',
2834
      clk => '0',
2835
      clr => '0',
2836
      op(0) => constant3_op_net
2837
    );
2838
 
2839
  constant4: entity work.constant_963ed6358a
2840
    port map (
2841
      ce => '0',
2842
      clk => '0',
2843
      clr => '0',
2844
      op(0) => constant4_op_net
2845
    );
2846
 
2847
  constant6: entity work.constant_6293007044
2848
    port map (
2849
      ce => '0',
2850
      clk => '0',
2851
      clr => '0',
2852
      op(0) => constant6_op_net_x0
2853
    );
2854
 
2855
  constant7: entity work.constant_963ed6358a
2856
    port map (
2857
      ce => '0',
2858
      clk => '0',
2859
      clr => '0',
2860
      op(0) => constant7_op_net
2861
    );
2862
 
2863
  constant8: entity work.constant_963ed6358a
2864
    port map (
2865
      ce => '0',
2866
      clk => '0',
2867
      clr => '0',
2868
      op(0) => constant8_op_net
2869
    );
2870
 
2871
  constant9: entity work.constant_963ed6358a
2872
    port map (
2873
      ce => '0',
2874
      clk => '0',
2875
      clr => '0',
2876
      op(0) => constant9_op_net
2877
    );
2878
 
2879
  convert1: entity work.xlconvert
2880
    generic map (
2881
      bool_conversion => 1,
2882
      din_arith => 1,
2883
      din_bin_pt => 0,
2884
      din_width => 1,
2885
      dout_arith => 1,
2886
      dout_bin_pt => 0,
2887
      dout_width => 1,
2888
      latency => 0,
2889
      overflow => xlWrap,
2890
      quantization => xlTruncate
2891
    )
2892
    port map (
2893
      ce => ce_1_sg_x0,
2894
      clk => clk_1_sg_x0,
2895
      clr => '0',
2896
      din(0) => tx_en_in5_q_net,
2897
      en => "1",
2898
      dout(0) => convert1_dout_net
2899
    );
2900
 
2901
  convert11: entity work.xlconvert
2902
    generic map (
2903
      bool_conversion => 1,
2904
      din_arith => 1,
2905
      din_bin_pt => 0,
2906
      din_width => 1,
2907
      dout_arith => 1,
2908
      dout_bin_pt => 0,
2909
      dout_width => 1,
2910
      latency => 0,
2911
      overflow => xlWrap,
2912
      quantization => xlTruncate
2913
    )
2914
    port map (
2915
      ce => ce_1_sg_x0,
2916
      clk => clk_1_sg_x0,
2917
      clr => '0',
2918
      din(0) => tx_en_in89_q_net,
2919
      en => "1",
2920
      dout(0) => convert11_dout_net
2921
    );
2922
 
2923
  convert12: entity work.xlconvert
2924
    generic map (
2925
      bool_conversion => 1,
2926
      din_arith => 1,
2927
      din_bin_pt => 0,
2928
      din_width => 1,
2929
      dout_arith => 1,
2930
      dout_bin_pt => 0,
2931
      dout_width => 1,
2932
      latency => 0,
2933
      overflow => xlWrap,
2934
      quantization => xlTruncate
2935
    )
2936
    port map (
2937
      ce => ce_1_sg_x0,
2938
      clk => clk_1_sg_x0,
2939
      clr => '0',
2940
      din(0) => tx_en_in92_q_net,
2941
      en => "1",
2942
      dout(0) => convert12_dout_net
2943
    );
2944
 
2945
  convert14: entity work.xlconvert
2946
    generic map (
2947
      bool_conversion => 1,
2948
      din_arith => 1,
2949
      din_bin_pt => 0,
2950
      din_width => 1,
2951
      dout_arith => 1,
2952
      dout_bin_pt => 0,
2953
      dout_width => 1,
2954
      latency => 0,
2955
      overflow => xlWrap,
2956
      quantization => xlTruncate
2957
    )
2958
    port map (
2959
      ce => ce_1_sg_x0,
2960
      clk => clk_1_sg_x0,
2961
      clr => '0',
2962
      din(0) => tx_en_in116_q_net,
2963
      en => "1",
2964
      dout(0) => convert14_dout_net
2965
    );
2966
 
2967
  convert15: entity work.xlconvert
2968
    generic map (
2969
      bool_conversion => 1,
2970
      din_arith => 1,
2971
      din_bin_pt => 0,
2972
      din_width => 1,
2973
      dout_arith => 1,
2974
      dout_bin_pt => 0,
2975
      dout_width => 1,
2976
      latency => 0,
2977
      overflow => xlWrap,
2978
      quantization => xlTruncate
2979
    )
2980
    port map (
2981
      ce => ce_1_sg_x0,
2982
      clk => clk_1_sg_x0,
2983
      clr => '0',
2984
      din(0) => tx_en_in119_q_net,
2985
      en => "1",
2986
      dout(0) => convert15_dout_net
2987
    );
2988
 
2989
  convert16: entity work.xlconvert
2990
    generic map (
2991
      bool_conversion => 1,
2992
      din_arith => 1,
2993
      din_bin_pt => 0,
2994
      din_width => 1,
2995
      dout_arith => 1,
2996
      dout_bin_pt => 0,
2997
      dout_width => 1,
2998
      latency => 0,
2999
      overflow => xlWrap,
3000
      quantization => xlTruncate
3001
    )
3002
    port map (
3003
      ce => ce_1_sg_x0,
3004
      clk => clk_1_sg_x0,
3005
      clr => '0',
3006
      din(0) => tx_en_in123_q_net,
3007
      en => "1",
3008
      dout(0) => convert16_dout_net
3009
    );
3010
 
3011
  convert17: entity work.xlconvert
3012
    generic map (
3013
      bool_conversion => 1,
3014
      din_arith => 1,
3015
      din_bin_pt => 0,
3016
      din_width => 1,
3017
      dout_arith => 1,
3018
      dout_bin_pt => 0,
3019
      dout_width => 1,
3020
      latency => 0,
3021
      overflow => xlWrap,
3022
      quantization => xlTruncate
3023
    )
3024
    port map (
3025
      ce => ce_1_sg_x0,
3026
      clk => clk_1_sg_x0,
3027
      clr => '0',
3028
      din(0) => tx_en_in127_q_net,
3029
      en => "1",
3030
      dout(0) => convert17_dout_net
3031
    );
3032
 
3033
  convert3: entity work.xlconvert
3034
    generic map (
3035
      bool_conversion => 1,
3036
      din_arith => 1,
3037
      din_bin_pt => 0,
3038
      din_width => 1,
3039
      dout_arith => 1,
3040
      dout_bin_pt => 0,
3041
      dout_width => 1,
3042
      latency => 0,
3043
      overflow => xlWrap,
3044
      quantization => xlTruncate
3045
    )
3046
    port map (
3047
      ce => ce_1_sg_x0,
3048
      clk => clk_1_sg_x0,
3049
      clr => '0',
3050
      din(0) => tx_en_in4_q_net,
3051
      en => "1",
3052
      dout(0) => timecountreset
3053
    );
3054
 
3055
  convert4: entity work.xlconvert
3056
    generic map (
3057
      bool_conversion => 1,
3058
      din_arith => 1,
3059
      din_bin_pt => 0,
3060
      din_width => 1,
3061
      dout_arith => 1,
3062
      dout_bin_pt => 0,
3063
      dout_width => 1,
3064
      latency => 0,
3065
      overflow => xlWrap,
3066
      quantization => xlTruncate
3067
    )
3068
    port map (
3069
      ce => ce_1_sg_x0,
3070
      clk => clk_1_sg_x0,
3071
      clr => '0',
3072
      din(0) => tx_en_in86_q_net,
3073
      en => "1",
3074
      dout(0) => convert4_dout_net
3075
    );
3076
 
3077
  convert5: entity work.xlconvert
3078
    generic map (
3079
      bool_conversion => 1,
3080
      din_arith => 1,
3081
      din_bin_pt => 0,
3082
      din_width => 1,
3083
      dout_arith => 1,
3084
      dout_bin_pt => 0,
3085
      dout_width => 1,
3086
      latency => 0,
3087
      overflow => xlWrap,
3088
      quantization => xlTruncate
3089
    )
3090
    port map (
3091
      ce => ce_1_sg_x0,
3092
      clk => clk_1_sg_x0,
3093
      clr => '0',
3094
      din(0) => tx_en_in58_q_net,
3095
      en => "1",
3096
      dout(0) => convert5_dout_net
3097
    );
3098
 
3099
  convert6: entity work.xlconvert
3100
    generic map (
3101
      bool_conversion => 1,
3102
      din_arith => 1,
3103
      din_bin_pt => 0,
3104
      din_width => 1,
3105
      dout_arith => 1,
3106
      dout_bin_pt => 0,
3107
      dout_width => 1,
3108
      latency => 0,
3109
      overflow => xlWrap,
3110
      quantization => xlTruncate
3111
    )
3112
    port map (
3113
      ce => ce_1_sg_x0,
3114
      clk => clk_1_sg_x0,
3115
      clr => '0',
3116
      din(0) => tx_en_in59_q_net,
3117
      en => "1",
3118
      dout(0) => convert6_dout_net
3119
    );
3120
 
3121
  convert7: entity work.xlconvert
3122
    generic map (
3123
      bool_conversion => 1,
3124
      din_arith => 1,
3125
      din_bin_pt => 0,
3126
      din_width => 1,
3127
      dout_arith => 1,
3128
      dout_bin_pt => 0,
3129
      dout_width => 1,
3130
      latency => 0,
3131
      overflow => xlWrap,
3132
      quantization => xlTruncate
3133
    )
3134
    port map (
3135
      ce => ce_1_sg_x0,
3136
      clk => clk_1_sg_x0,
3137
      clr => '0',
3138
      din(0) => tx_en_in61_q_net,
3139
      en => "1",
3140
      dout(0) => convert7_dout_net
3141
    );
3142
 
3143
  convert8: entity work.xlconvert
3144
    generic map (
3145
      bool_conversion => 1,
3146
      din_arith => 1,
3147
      din_bin_pt => 0,
3148
      din_width => 1,
3149
      dout_arith => 1,
3150
      dout_bin_pt => 0,
3151
      dout_width => 1,
3152
      latency => 0,
3153
      overflow => xlWrap,
3154
      quantization => xlTruncate
3155
    )
3156
    port map (
3157
      ce => ce_1_sg_x0,
3158
      clk => clk_1_sg_x0,
3159
      clr => '0',
3160
      din(0) => tx_en_in67_q_net,
3161
      en => "1",
3162
      dout(0) => convert8_dout_net
3163
    );
3164
 
3165
  convert9: entity work.xlconvert
3166
    generic map (
3167
      bool_conversion => 1,
3168
      din_arith => 1,
3169
      din_bin_pt => 0,
3170
      din_width => 1,
3171
      dout_arith => 1,
3172
      dout_bin_pt => 0,
3173
      dout_width => 1,
3174
      latency => 0,
3175
      overflow => xlWrap,
3176
      quantization => xlTruncate
3177
    )
3178
    port map (
3179
      ce => ce_1_sg_x0,
3180
      clk => clk_1_sg_x0,
3181
      clr => '0',
3182
      din(0) => tx_en_in8_q_net,
3183
      en => "1",
3184
      dout(0) => timecounttrigger
3185
    );
3186
 
3187
  counter4: entity work.xlcounter_free
3188
    generic map (
3189
      core_name0 => "cntr_11_0_1a411d6ef586e892",
3190
      op_arith => xlUnsigned,
3191
      op_width => 12
3192
    )
3193
    port map (
3194
      ce => ce_1_sg_x0,
3195
      clk => clk_1_sg_x0,
3196
      clr => '0',
3197
      en => "1",
3198
      rst => "0",
3199
      op => counter4_op_net
3200
    );
3201
 
3202
  inverter3: entity work.inverter_e5b38cca3b
3203
    port map (
3204
      ce => ce_1_sg_x0,
3205
      clk => clk_1_sg_x0,
3206
      clr => '0',
3207
      ip(0) => rst_i_net,
3208
      op(0) => inverter3_op_net
3209
    );
3210
 
3211
  inverter5: entity work.inverter_e5b38cca3b
3212
    port map (
3213
      ce => ce_1_sg_x0,
3214
      clk => clk_1_sg_x0,
3215
      clr => '0',
3216
      ip(0) => tx_en_in107_q_net,
3217
      op(0) => inverter5_op_net
3218
    );
3219
 
3220
  logical4: entity work.logical_80f90b97d0
3221
    port map (
3222
      ce => '0',
3223
      clk => '0',
3224
      clr => '0',
3225
      d0(0) => constant15_op_net,
3226
      d1(0) => inverter5_op_net,
3227
      y(0) => logical4_y_net
3228
    );
3229
 
3230
  tx_en_in1: entity work.xlregister
3231
    generic map (
3232
      d_width => 1,
3233
      init_value => b"0"
3234
    )
3235
    port map (
3236
      ce => ce_1_sg_x0,
3237
      clk => clk_1_sg_x0,
3238
      d(0) => timecountreset,
3239
      en => "1",
3240
      rst => "0",
3241
      q(0) => data_in_x0_net
3242
    );
3243
 
3244
  tx_en_in10: entity work.xlregister
3245
    generic map (
3246
      d_width => 32,
3247
      init_value => b"00000000000000000000000000000000"
3248
    )
3249
    port map (
3250
      ce => ce_1_sg_x0,
3251
      clk => clk_1_sg_x0,
3252
      d => tx_en_in12_q_net,
3253
      en(0) => timecounttrigger,
3254
      rst(0) => constant3_op_net,
3255
      q => data_in_x20_net
3256
    );
3257
 
3258
  tx_en_in100: entity work.xlregister
3259
    generic map (
3260
      d_width => 1,
3261
      init_value => b"0"
3262
    )
3263
    port map (
3264
      ce => ce_1_sg_x0,
3265
      clk => clk_1_sg_x0,
3266
      d(0) => convert12_dout_net,
3267
      en => "1",
3268
      rst => "0",
3269
      q(0) => data_in_x9_net
3270
    );
3271
 
3272
  tx_en_in105: entity work.xlregister
3273
    generic map (
3274
      d_width => 1,
3275
      init_value => b"0"
3276
    )
3277
    port map (
3278
      ce => ce_1_sg_x0,
3279
      clk => clk_1_sg_x0,
3280
      d(0) => fifo_rd_empty_net,
3281
      en => "1",
3282
      rst => "0",
3283
      q(0) => tx_en_in105_q_net
3284
    );
3285
 
3286
  tx_en_in107: entity work.xlregister
3287
    generic map (
3288
      d_width => 1,
3289
      init_value => b"0"
3290
    )
3291
    port map (
3292
      ce => ce_1_sg_x0,
3293
      clk => clk_1_sg_x0,
3294
      d(0) => tx_en_in105_q_net,
3295
      en => "1",
3296
      rst => "0",
3297
      q(0) => tx_en_in107_q_net
3298
    );
3299
 
3300
  tx_en_in108: entity work.xlregister
3301
    generic map (
3302
      d_width => 1,
3303
      init_value => b"0"
3304
    )
3305
    port map (
3306
      ce => ce_1_sg_x0,
3307
      clk => clk_1_sg_x0,
3308
      d(0) => logical4_y_net,
3309
      en(0) => constant14_op_net,
3310
      rst => "0",
3311
      q(0) => fifo_rd_en_net
3312
    );
3313
 
3314
  tx_en_in109: entity work.xlregister
3315
    generic map (
3316
      d_width => 1,
3317
      init_value => b"0"
3318
    )
3319
    port map (
3320
      ce => ce_1_sg_x0,
3321
      clk => clk_1_sg_x0,
3322
      d(0) => fifo_rd_valid_net,
3323
      en => "1",
3324
      rst => "0",
3325
      q(0) => fifo_wr_en_net
3326
    );
3327
 
3328
  tx_en_in113: entity work.xlregister
3329
    generic map (
3330
      d_width => 1,
3331
      init_value => b"0"
3332
    )
3333
    port map (
3334
      ce => ce_1_sg_x0,
3335
      clk => clk_1_sg_x0,
3336
      d(0) => convert14_dout_net,
3337
      en => "1",
3338
      rst => "0",
3339
      q(0) => data_in_x12_net
3340
    );
3341
 
3342
  tx_en_in114: entity work.xlregister
3343
    generic map (
3344
      d_width => 1,
3345
      init_value => b"0"
3346
    )
3347
    port map (
3348
      ce => ce_1_sg_x0,
3349
      clk => clk_1_sg_x0,
3350
      d(0) => convert15_dout_net,
3351
      en => "1",
3352
      rst => "0",
3353
      q(0) => data_in_x14_net
3354
    );
3355
 
3356
  tx_en_in115: entity work.xlregister
3357
    generic map (
3358
      d_width => 32,
3359
      init_value => b"00000000000000110000110100100011"
3360
    )
3361
    port map (
3362
      ce => ce_1_sg_x0,
3363
      clk => clk_1_sg_x0,
3364
      d => tx_en_in117_q_net,
3365
      en(0) => convert14_dout_net,
3366
      rst(0) => constant19_op_net,
3367
      q => data_in_x13_net
3368
    );
3369
 
3370
  tx_en_in116: entity work.xlregister
3371
    generic map (
3372
      d_width => 1,
3373
      init_value => b"0"
3374
    )
3375
    port map (
3376
      ce => ce_1_sg_x0,
3377
      clk => clk_1_sg_x0,
3378
      d(0) => data_out_x15_net,
3379
      en => "1",
3380
      rst => "0",
3381
      q(0) => tx_en_in116_q_net
3382
    );
3383
 
3384
  tx_en_in117: entity work.xlregister
3385
    generic map (
3386
      d_width => 32,
3387
      init_value => b"00000000000000000000000000000000"
3388
    )
3389
    port map (
3390
      ce => ce_1_sg_x0,
3391
      clk => clk_1_sg_x0,
3392
      d => data_out_x14_net,
3393
      en => "1",
3394
      rst => "0",
3395
      q => tx_en_in117_q_net
3396
    );
3397
 
3398
  tx_en_in118: entity work.xlregister
3399
    generic map (
3400
      d_width => 32,
3401
      init_value => b"00000000000000000100101011000000"
3402
    )
3403
    port map (
3404
      ce => ce_1_sg_x0,
3405
      clk => clk_1_sg_x0,
3406
      d => tx_en_in120_q_net,
3407
      en(0) => convert15_dout_net,
3408
      rst(0) => constant21_op_net,
3409
      q => data_in_x15_net
3410
    );
3411
 
3412
  tx_en_in119: entity work.xlregister
3413
    generic map (
3414
      d_width => 1,
3415
      init_value => b"0"
3416
    )
3417
    port map (
3418
      ce => ce_1_sg_x0,
3419
      clk => clk_1_sg_x0,
3420
      d(0) => data_out_x17_net,
3421
      en => "1",
3422
      rst => "0",
3423
      q(0) => tx_en_in119_q_net
3424
    );
3425
 
3426
  tx_en_in12: entity work.xlregister
3427
    generic map (
3428
      d_width => 32,
3429
      init_value => b"00000000000000000000000000000000"
3430
    )
3431
    port map (
3432
      ce => ce_1_sg_x0,
3433
      clk => clk_1_sg_x0,
3434
      d => data_out_x26_net,
3435
      en => "1",
3436
      rst => "0",
3437
      q => tx_en_in12_q_net
3438
    );
3439
 
3440
  tx_en_in120: entity work.xlregister
3441
    generic map (
3442
      d_width => 32,
3443
      init_value => b"00000000000000000000000000000000"
3444
    )
3445
    port map (
3446
      ce => ce_1_sg_x0,
3447
      clk => clk_1_sg_x0,
3448
      d => data_out_x16_net,
3449
      en => "1",
3450
      rst => "0",
3451
      q => tx_en_in120_q_net
3452
    );
3453
 
3454
  tx_en_in121: entity work.xlregister
3455
    generic map (
3456
      d_width => 1,
3457
      init_value => b"0"
3458
    )
3459
    port map (
3460
      ce => ce_1_sg_x0,
3461
      clk => clk_1_sg_x0,
3462
      d(0) => convert16_dout_net,
3463
      en => "1",
3464
      rst => "0",
3465
      q(0) => data_in_x16_net
3466
    );
3467
 
3468
  tx_en_in122: entity work.xlregister
3469
    generic map (
3470
      d_width => 32,
3471
      init_value => b"00000000000000000000000000000000"
3472
    )
3473
    port map (
3474
      ce => ce_1_sg_x0,
3475
      clk => clk_1_sg_x0,
3476
      d => tx_en_in124_q_net,
3477
      en(0) => convert16_dout_net,
3478
      rst(0) => constant22_op_net,
3479
      q => data_in_x17_net
3480
    );
3481
 
3482
  tx_en_in123: entity work.xlregister
3483
    generic map (
3484
      d_width => 1,
3485
      init_value => b"0"
3486
    )
3487
    port map (
3488
      ce => ce_1_sg_x0,
3489
      clk => clk_1_sg_x0,
3490
      d(0) => data_out_x20_net,
3491
      en => "1",
3492
      rst => "0",
3493
      q(0) => tx_en_in123_q_net
3494
    );
3495
 
3496
  tx_en_in124: entity work.xlregister
3497
    generic map (
3498
      d_width => 32,
3499
      init_value => b"00000000000000000000000000000000"
3500
    )
3501
    port map (
3502
      ce => ce_1_sg_x0,
3503
      clk => clk_1_sg_x0,
3504
      d => data_out_x19_net,
3505
      en => "1",
3506
      rst => "0",
3507
      q => tx_en_in124_q_net
3508
    );
3509
 
3510
  tx_en_in125: entity work.xlregister
3511
    generic map (
3512
      d_width => 1,
3513
      init_value => b"0"
3514
    )
3515
    port map (
3516
      ce => ce_1_sg_x0,
3517
      clk => clk_1_sg_x0,
3518
      d(0) => convert17_dout_net,
3519
      en => "1",
3520
      rst => "0",
3521
      q(0) => data_in_x18_net
3522
    );
3523
 
3524
  tx_en_in126: entity work.xlregister
3525
    generic map (
3526
      d_width => 32,
3527
      init_value => b"00000000000000000000000000000000"
3528
    )
3529
    port map (
3530
      ce => ce_1_sg_x0,
3531
      clk => clk_1_sg_x0,
3532
      d => tx_en_in128_q_net,
3533
      en(0) => convert17_dout_net,
3534
      rst(0) => constant23_op_net,
3535
      q => data_in_x19_net
3536
    );
3537
 
3538
  tx_en_in127: entity work.xlregister
3539
    generic map (
3540
      d_width => 1,
3541
      init_value => b"0"
3542
    )
3543
    port map (
3544
      ce => ce_1_sg_x0,
3545
      clk => clk_1_sg_x0,
3546
      d(0) => data_out_x22_net,
3547
      en => "1",
3548
      rst => "0",
3549
      q(0) => tx_en_in127_q_net
3550
    );
3551
 
3552
  tx_en_in128: entity work.xlregister
3553
    generic map (
3554
      d_width => 32,
3555
      init_value => b"00000000000000000000000000000000"
3556
    )
3557
    port map (
3558
      ce => ce_1_sg_x0,
3559
      clk => clk_1_sg_x0,
3560
      d => data_out_x21_net,
3561
      en => "1",
3562
      rst => "0",
3563
      q => tx_en_in128_q_net
3564
    );
3565
 
3566
  tx_en_in13: entity work.xlregister
3567
    generic map (
3568
      d_width => 1,
3569
      init_value => b"0"
3570
    )
3571
    port map (
3572
      ce => ce_1_sg_x0,
3573
      clk => clk_1_sg_x0,
3574
      d(0) => convert8_dout_net,
3575
      en => "1",
3576
      rst => "0",
3577
      q(0) => data_in_x3_net
3578
    );
3579
 
3580
  tx_en_in15: entity work.xlregister
3581
    generic map (
3582
      d_width => 12,
3583
      init_value => b"000000000000"
3584
    )
3585
    port map (
3586
      ce => ce_1_sg_x0,
3587
      clk => clk_1_sg_x0,
3588
      d => counter4_op_net,
3589
      en => "1",
3590
      rst => "0",
3591
      q => bram_rd_addr_net
3592
    );
3593
 
3594
  tx_en_in16: entity work.xlregister
3595
    generic map (
3596
      d_width => 12,
3597
      init_value => b"000000000000"
3598
    )
3599
    port map (
3600
      ce => ce_1_sg_x0,
3601
      clk => clk_1_sg_x0,
3602
      d => tx_en_in30_q_net,
3603
      en => "1",
3604
      rst => "0",
3605
      q => tx_en_in16_q_net
3606
    );
3607
 
3608
  tx_en_in17: entity work.xlregister
3609
    generic map (
3610
      d_width => 12,
3611
      init_value => b"000000000000"
3612
    )
3613
    port map (
3614
      ce => ce_1_sg_x0,
3615
      clk => clk_1_sg_x0,
3616
      d => counter4_op_net,
3617
      en => "1",
3618
      rst => "0",
3619
      q => tx_en_in17_q_net
3620
    );
3621
 
3622
  tx_en_in18: entity work.xlregister
3623
    generic map (
3624
      d_width => 8,
3625
      init_value => b"00000000"
3626
    )
3627
    port map (
3628
      ce => ce_1_sg_x0,
3629
      clk => clk_1_sg_x0,
3630
      d => constant2_op_net,
3631
      en => "1",
3632
      rst => "0",
3633
      q => tx_en_in18_q_net
3634
    );
3635
 
3636
  tx_en_in19: entity work.xlregister
3637
    generic map (
3638
      d_width => 12,
3639
      init_value => b"000000000000"
3640
    )
3641
    port map (
3642
      ce => ce_1_sg_x0,
3643
      clk => clk_1_sg_x0,
3644
      d => tx_en_in16_q_net,
3645
      en => "1",
3646
      rst => "0",
3647
      q => bram_wr_addr_net
3648
    );
3649
 
3650
  tx_en_in2: entity work.xlregister
3651
    generic map (
3652
      d_width => 32,
3653
      init_value => b"00000000000000000000000000000000"
3654
    )
3655
    port map (
3656
      ce => ce_1_sg_x0,
3657
      clk => clk_1_sg_x0,
3658
      d => dinb_x0,
3659
      en(0) => timecountreset,
3660
      rst(0) => constant1_op_net,
3661
      q => data_in_net
3662
    );
3663
 
3664
  tx_en_in20: entity work.xlregister
3665
    generic map (
3666
      d_width => 64,
3667
      init_value => b"0000000000000000000000000000000000000000000000000000000000000000"
3668
    )
3669
    port map (
3670
      ce => ce_1_sg_x0,
3671
      clk => clk_1_sg_x0,
3672
      d => bram_rd_dout_net,
3673
      en => "1",
3674
      rst => "0",
3675
      q => bram_wr_din_net
3676
    );
3677
 
3678
  tx_en_in26: entity work.xlregister
3679
    generic map (
3680
      d_width => 1,
3681
      init_value => b"0"
3682
    )
3683
    port map (
3684
      ce => ce_1_sg_x0,
3685
      clk => clk_1_sg_x0,
3686
      d(0) => inverter3_op_net,
3687
      en => "1",
3688
      rst => "0",
3689
      q(0) => rst_o_net
3690
    );
3691
 
3692
  tx_en_in3: entity work.xlregister
3693
    generic map (
3694
      d_width => 1,
3695
      init_value => b"0"
3696
    )
3697
    port map (
3698
      ce => ce_1_sg_x0,
3699
      clk => clk_1_sg_x0,
3700
      d(0) => constant8_op_net,
3701
      en => "1",
3702
      rst => "0",
3703
      q(0) => user_int_1o_net
3704
    );
3705
 
3706
  tx_en_in30: entity work.xlregister
3707
    generic map (
3708
      d_width => 12,
3709
      init_value => b"000000000000"
3710
    )
3711
    port map (
3712
      ce => ce_1_sg_x0,
3713
      clk => clk_1_sg_x0,
3714
      d => tx_en_in17_q_net,
3715
      en => "1",
3716
      rst => "0",
3717
      q => tx_en_in30_q_net
3718
    );
3719
 
3720
  tx_en_in33: entity work.xlregister
3721
    generic map (
3722
      d_width => 32,
3723
      init_value => b"00000000000000000000000000000000"
3724
    )
3725
    port map (
3726
      ce => ce_1_sg_x0,
3727
      clk => clk_1_sg_x0,
3728
      d => tx_en_in6_q_net,
3729
      en(0) => convert1_dout_net,
3730
      rst(0) => constant26_op_net,
3731
      q => data_in_x11_net
3732
    );
3733
 
3734
  tx_en_in38: entity work.xlregister
3735
    generic map (
3736
      d_width => 72,
3737
      init_value => b"000000000000000000000000000000000000000000000000000000000000000000000000"
3738
    )
3739
    port map (
3740
      ce => ce_1_sg_x0,
3741
      clk => clk_1_sg_x0,
3742
      d => fifo_rd_dout_net,
3743
      en => "1",
3744
      rst => "0",
3745
      q => fifo_wr_din_net
3746
    );
3747
 
3748
  tx_en_in4: entity work.xlregister
3749
    generic map (
3750
      d_width => 1,
3751
      init_value => b"0"
3752
    )
3753
    port map (
3754
      ce => ce_1_sg_x0,
3755
      clk => clk_1_sg_x0,
3756
      d(0) => data_out_x23_net,
3757
      en => "1",
3758
      rst => "0",
3759
      q(0) => tx_en_in4_q_net
3760
    );
3761
 
3762
  tx_en_in43: entity work.xlregister
3763
    generic map (
3764
      d_width => 8,
3765
      init_value => b"00000000"
3766
    )
3767
    port map (
3768
      ce => ce_1_sg_x0,
3769
      clk => clk_1_sg_x0,
3770
      d => tx_en_in18_q_net,
3771
      en => "1",
3772
      rst => "0",
3773
      q => bram_wr_en_net
3774
    );
3775
 
3776
  tx_en_in5: entity work.xlregister
3777
    generic map (
3778
      d_width => 1,
3779
      init_value => b"0"
3780
    )
3781
    port map (
3782
      ce => ce_1_sg_x0,
3783
      clk => clk_1_sg_x0,
3784
      d(0) => data_out_x25_net,
3785
      en => "1",
3786
      rst => "0",
3787
      q(0) => tx_en_in5_q_net
3788
    );
3789
 
3790
  tx_en_in50: entity work.xlregister
3791
    generic map (
3792
      d_width => 32,
3793
      init_value => b"00000000000000000000000000000000"
3794
    )
3795
    port map (
3796
      ce => ce_1_sg_x0,
3797
      clk => clk_1_sg_x0,
3798
      d => dinb,
3799
      en(0) => convert5_dout_net,
3800
      rst(0) => constant25_op_net,
3801
      q => data_in_x23_net
3802
    );
3803
 
3804
  tx_en_in51: entity work.xlregister
3805
    generic map (
3806
      d_width => 1,
3807
      init_value => b"0"
3808
    )
3809
    port map (
3810
      ce => ce_1_sg_x0,
3811
      clk => clk_1_sg_x0,
3812
      d(0) => constant11_op_net,
3813
      en => "1",
3814
      rst => "0",
3815
      q(0) => user_int_3o_net
3816
    );
3817
 
3818
  tx_en_in52: entity work.xlregister
3819
    generic map (
3820
      d_width => 32,
3821
      init_value => b"00000000000000000000000000000000"
3822
    )
3823
    port map (
3824
      ce => ce_1_sg_x0,
3825
      clk => clk_1_sg_x0,
3826
      d => data_out_x2_net,
3827
      en => "1",
3828
      rst => "0",
3829
      q => tx_en_in52_q_net
3830
    );
3831
 
3832
  tx_en_in53: entity work.xlregister
3833
    generic map (
3834
      d_width => 32,
3835
      init_value => b"00000000000000000000000000000000"
3836
    )
3837
    port map (
3838
      ce => ce_1_sg_x0,
3839
      clk => clk_1_sg_x0,
3840
      d => tx_en_in60_q_net,
3841
      en(0) => convert6_dout_net,
3842
      rst(0) => constant24_op_net,
3843
      q => data_in_x25_net
3844
    );
3845
 
3846
  tx_en_in54: entity work.xlregister
3847
    generic map (
3848
      d_width => 32,
3849
      init_value => b"00000000000000000000000000000000"
3850
    )
3851
    port map (
3852
      ce => ce_1_sg_x0,
3853
      clk => clk_1_sg_x0,
3854
      d => tx_en_in52_q_net,
3855
      en(0) => convert7_dout_net,
3856
      rst(0) => constant20_op_net,
3857
      q => data_in_x26_net
3858
    );
3859
 
3860
  tx_en_in58: entity work.xlregister
3861
    generic map (
3862
      d_width => 1,
3863
      init_value => b"0"
3864
    )
3865
    port map (
3866
      ce => ce_1_sg_x0,
3867
      clk => clk_1_sg_x0,
3868
      d(0) => data_out_net,
3869
      en => "1",
3870
      rst => "0",
3871
      q(0) => tx_en_in58_q_net
3872
    );
3873
 
3874
  tx_en_in59: entity work.xlregister
3875
    generic map (
3876
      d_width => 1,
3877
      init_value => b"0"
3878
    )
3879
    port map (
3880
      ce => ce_1_sg_x0,
3881
      clk => clk_1_sg_x0,
3882
      d(0) => data_out_x1_net,
3883
      en => "1",
3884
      rst => "0",
3885
      q(0) => tx_en_in59_q_net
3886
    );
3887
 
3888
  tx_en_in6: entity work.xlregister
3889
    generic map (
3890
      d_width => 32,
3891
      init_value => b"00000000000000000000000000000000"
3892
    )
3893
    port map (
3894
      ce => ce_1_sg_x0,
3895
      clk => clk_1_sg_x0,
3896
      d => data_out_x24_net,
3897
      en => "1",
3898
      rst => "0",
3899
      q => tx_en_in6_q_net
3900
    );
3901
 
3902
  tx_en_in60: entity work.xlregister
3903
    generic map (
3904
      d_width => 32,
3905
      init_value => b"00000000000000000000000000000000"
3906
    )
3907
    port map (
3908
      ce => ce_1_sg_x0,
3909
      clk => clk_1_sg_x0,
3910
      d => data_out_x0_net,
3911
      en => "1",
3912
      rst => "0",
3913
      q => tx_en_in60_q_net
3914
    );
3915
 
3916
  tx_en_in61: entity work.xlregister
3917
    generic map (
3918
      d_width => 1,
3919
      init_value => b"0"
3920
    )
3921
    port map (
3922
      ce => ce_1_sg_x0,
3923
      clk => clk_1_sg_x0,
3924
      d(0) => data_out_x3_net,
3925
      en => "1",
3926
      rst => "0",
3927
      q(0) => tx_en_in61_q_net
3928
    );
3929
 
3930
  tx_en_in62: entity work.xlregister
3931
    generic map (
3932
      d_width => 32,
3933
      init_value => b"00000000000000000000000000000000"
3934
    )
3935
    port map (
3936
      ce => ce_1_sg_x0,
3937
      clk => clk_1_sg_x0,
3938
      d => data_out_x28_net,
3939
      en => "1",
3940
      rst => "0",
3941
      q => dinb
3942
    );
3943
 
3944
  tx_en_in65: entity work.xlregister
3945
    generic map (
3946
      d_width => 32,
3947
      init_value => b"00000000000000000000000000000000"
3948
    )
3949
    port map (
3950
      ce => ce_1_sg_x0,
3951
      clk => clk_1_sg_x0,
3952
      d => data_out_x6_net,
3953
      en => "1",
3954
      rst => "0",
3955
      q => tx_en_in65_q_net
3956
    );
3957
 
3958
  tx_en_in66: entity work.xlregister
3959
    generic map (
3960
      d_width => 32,
3961
      init_value => b"00000000000000000000000000000000"
3962
    )
3963
    port map (
3964
      ce => ce_1_sg_x0,
3965
      clk => clk_1_sg_x0,
3966
      d => tx_en_in65_q_net,
3967
      en(0) => convert8_dout_net,
3968
      rst(0) => constant12_op_net,
3969
      q => data_in_x4_net
3970
    );
3971
 
3972
  tx_en_in67: entity work.xlregister
3973
    generic map (
3974
      d_width => 1,
3975
      init_value => b"0"
3976
    )
3977
    port map (
3978
      ce => ce_1_sg_x0,
3979
      clk => clk_1_sg_x0,
3980
      d(0) => data_out_x7_net,
3981
      en => "1",
3982
      rst => "0",
3983
      q(0) => tx_en_in67_q_net
3984
    );
3985
 
3986
  tx_en_in7: entity work.xlregister
3987
    generic map (
3988
      d_width => 1,
3989
      init_value => b"0"
3990
    )
3991
    port map (
3992
      ce => ce_1_sg_x0,
3993
      clk => clk_1_sg_x0,
3994
      d(0) => timecounttrigger,
3995
      en => "1",
3996
      rst => "0",
3997
      q(0) => data_in_x22_net
3998
    );
3999
 
4000
  tx_en_in75: entity work.xlregister
4001
    generic map (
4002
      d_width => 1,
4003
      init_value => b"0"
4004
    )
4005
    port map (
4006
      ce => ce_1_sg_x0,
4007
      clk => clk_1_sg_x0,
4008
      d(0) => constant10_op_net,
4009
      en => "1",
4010
      rst => "0",
4011
      q(0) => user_int_2o_net
4012
    );
4013
 
4014
  tx_en_in8: entity work.xlregister
4015
    generic map (
4016
      d_width => 1,
4017
      init_value => b"0"
4018
    )
4019
    port map (
4020
      ce => ce_1_sg_x0,
4021
      clk => clk_1_sg_x0,
4022
      d(0) => data_out_x27_net,
4023
      en => "1",
4024
      rst => "0",
4025
      q(0) => tx_en_in8_q_net
4026
    );
4027
 
4028
  tx_en_in85: entity work.xlregister
4029
    generic map (
4030
      d_width => 32,
4031
      init_value => b"00000000000000000000000000000001"
4032
    )
4033
    port map (
4034
      ce => ce_1_sg_x0,
4035
      clk => clk_1_sg_x0,
4036
      d => tx_en_in87_q_net,
4037
      en(0) => convert4_dout_net,
4038
      rst(0) => constant7_op_net,
4039
      q => data_in_x6_net
4040
    );
4041
 
4042
  tx_en_in86: entity work.xlregister
4043
    generic map (
4044
      d_width => 1,
4045
      init_value => b"0"
4046
    )
4047
    port map (
4048
      ce => ce_1_sg_x0,
4049
      clk => clk_1_sg_x0,
4050
      d(0) => data_out_x9_net,
4051
      en => "1",
4052
      rst => "0",
4053
      q(0) => tx_en_in86_q_net
4054
    );
4055
 
4056
  tx_en_in87: entity work.xlregister
4057
    generic map (
4058
      d_width => 32,
4059
      init_value => b"00000000000000000000000000000000"
4060
    )
4061
    port map (
4062
      ce => ce_1_sg_x0,
4063
      clk => clk_1_sg_x0,
4064
      d => data_out_x8_net,
4065
      en => "1",
4066
      rst => "0",
4067
      q => tx_en_in87_q_net
4068
    );
4069
 
4070
  tx_en_in88: entity work.xlregister
4071
    generic map (
4072
      d_width => 32,
4073
      init_value => b"10000000000000000000000000000000"
4074
    )
4075
    port map (
4076
      ce => ce_1_sg_x0,
4077
      clk => clk_1_sg_x0,
4078
      d => tx_en_in90_q_net,
4079
      en(0) => convert11_dout_net,
4080
      rst(0) => constant4_op_net,
4081
      q => data_in_x8_net
4082
    );
4083
 
4084
  tx_en_in89: entity work.xlregister
4085
    generic map (
4086
      d_width => 1,
4087
      init_value => b"0"
4088
    )
4089
    port map (
4090
      ce => ce_1_sg_x0,
4091
      clk => clk_1_sg_x0,
4092
      d(0) => data_out_x11_net,
4093
      en => "1",
4094
      rst => "0",
4095
      q(0) => tx_en_in89_q_net
4096
    );
4097
 
4098
  tx_en_in9: entity work.xlregister
4099
    generic map (
4100
      d_width => 32,
4101
      init_value => b"00000000000000000000000000000000"
4102
    )
4103
    port map (
4104
      ce => ce_1_sg_x0,
4105
      clk => clk_1_sg_x0,
4106
      d => data_out_x18_net,
4107
      en => "1",
4108
      rst => "0",
4109
      q => dinb_x0
4110
    );
4111
 
4112
  tx_en_in90: entity work.xlregister
4113
    generic map (
4114
      d_width => 32,
4115
      init_value => b"00000000000000000000000000000000"
4116
    )
4117
    port map (
4118
      ce => ce_1_sg_x0,
4119
      clk => clk_1_sg_x0,
4120
      d => data_out_x10_net,
4121
      en => "1",
4122
      rst => "0",
4123
      q => tx_en_in90_q_net
4124
    );
4125
 
4126
  tx_en_in91: entity work.xlregister
4127
    generic map (
4128
      d_width => 32,
4129
      init_value => b"00000000000000000000000000000000"
4130
    )
4131
    port map (
4132
      ce => ce_1_sg_x0,
4133
      clk => clk_1_sg_x0,
4134
      d => tx_en_in93_q_net,
4135
      en(0) => convert12_dout_net,
4136
      rst(0) => constant9_op_net,
4137
      q => data_in_x10_net
4138
    );
4139
 
4140
  tx_en_in92: entity work.xlregister
4141
    generic map (
4142
      d_width => 1,
4143
      init_value => b"0"
4144
    )
4145
    port map (
4146
      ce => ce_1_sg_x0,
4147
      clk => clk_1_sg_x0,
4148
      d(0) => data_out_x13_net,
4149
      en => "1",
4150
      rst => "0",
4151
      q(0) => tx_en_in92_q_net
4152
    );
4153
 
4154
  tx_en_in93: entity work.xlregister
4155
    generic map (
4156
      d_width => 32,
4157
      init_value => b"00000000000000000000000000000000"
4158
    )
4159
    port map (
4160
      ce => ce_1_sg_x0,
4161
      clk => clk_1_sg_x0,
4162
      d => data_out_x12_net,
4163
      en => "1",
4164
      rst => "0",
4165
      q => tx_en_in93_q_net
4166
    );
4167
 
4168
  tx_en_in94: entity work.xlregister
4169
    generic map (
4170
      d_width => 1,
4171
      init_value => b"0"
4172
    )
4173
    port map (
4174
      ce => ce_1_sg_x0,
4175
      clk => clk_1_sg_x0,
4176
      d(0) => convert1_dout_net,
4177
      en => "1",
4178
      rst => "0",
4179
      q(0) => data_in_x21_net
4180
    );
4181
 
4182
  tx_en_in95: entity work.xlregister
4183
    generic map (
4184
      d_width => 1,
4185
      init_value => b"0"
4186
    )
4187
    port map (
4188
      ce => ce_1_sg_x0,
4189
      clk => clk_1_sg_x0,
4190
      d(0) => convert5_dout_net,
4191
      en => "1",
4192
      rst => "0",
4193
      q(0) => data_in_x24_net
4194
    );
4195
 
4196
  tx_en_in96: entity work.xlregister
4197
    generic map (
4198
      d_width => 1,
4199
      init_value => b"0"
4200
    )
4201
    port map (
4202
      ce => ce_1_sg_x0,
4203
      clk => clk_1_sg_x0,
4204
      d(0) => convert6_dout_net,
4205
      en => "1",
4206
      rst => "0",
4207
      q(0) => data_in_x1_net
4208
    );
4209
 
4210
  tx_en_in97: entity work.xlregister
4211
    generic map (
4212
      d_width => 1,
4213
      init_value => b"0"
4214
    )
4215
    port map (
4216
      ce => ce_1_sg_x0,
4217
      clk => clk_1_sg_x0,
4218
      d(0) => convert7_dout_net,
4219
      en => "1",
4220
      rst => "0",
4221
      q(0) => data_in_x2_net
4222
    );
4223
 
4224
  tx_en_in98: entity work.xlregister
4225
    generic map (
4226
      d_width => 1,
4227
      init_value => b"0"
4228
    )
4229
    port map (
4230
      ce => ce_1_sg_x0,
4231
      clk => clk_1_sg_x0,
4232
      d(0) => convert4_dout_net,
4233
      en => "1",
4234
      rst => "0",
4235
      q(0) => data_in_x5_net
4236
    );
4237
 
4238
  tx_en_in99: entity work.xlregister
4239
    generic map (
4240
      d_width => 1,
4241
      init_value => b"0"
4242
    )
4243
    port map (
4244
      ce => ce_1_sg_x0,
4245
      clk => clk_1_sg_x0,
4246
      d(0) => convert11_dout_net,
4247
      en => "1",
4248
      rst => "0",
4249
      q(0) => data_in_x7_net
4250
    );
4251
 
4252
end structural;

powered by: WebSVN 2.1.0

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