OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [src_c/] [jtag/] [test_rtl/] [jtag_ram_test/] [src_verilog/] [lib/] [main_comp.v] - Blame information for rev 38

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 alirezamon
 `timescale  1ns/1ps
2
 
3
 
4
/**********************************************************************
5
**      File:  main_comp.v
6
**
7
**      Copyright (C) 2014-2017  Alireza Monemi
8
**
9
**      This file is part of ProNoC
10
**
11
**      ProNoC ( stands for Prototype Network-on-chip)  is free software:
12
**      you can redistribute it and/or modify it under the terms of the GNU
13
**      Lesser General Public License as published by the Free Software Foundation,
14
**      either version 2 of the License, or (at your option) any later version.
15
**
16
**      ProNoC is distributed in the hope that it will be useful, but WITHOUT
17
**      ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18
**      or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
19
**      Public License for more details.
20
**
21
**      You should have received a copy of the GNU Lesser General Public
22
**      License along with ProNoC. If not, see <http:**www.gnu.org/licenses/>.
23
**
24
**
25
**      Description:
26
**      This file contains several general RTL modules such as
27
**      different types of multiplexors, converters and counters ...
28
**
29
**************************************************************/
30
 
31
 
32
 
33
 
34
 
35
 
36
 
37
/*********************************
38
 
39
 
40
 
41
    multiplexer
42
 
43
 
44
 
45
********************************/
46
 
47
module one_hot_mux #(
48
        parameter   IN_WIDTH      = 20,
49
        parameter   SEL_WIDTH =   5,
50
        parameter   OUT_WIDTH = IN_WIDTH/SEL_WIDTH
51
 
52
    )
53
    (
54
        input [IN_WIDTH-1       :0] mux_in,
55
        output[OUT_WIDTH-1  :0] mux_out,
56
        input[SEL_WIDTH-1   :0] sel
57
 
58
    );
59
 
60
    wire [IN_WIDTH-1    :0] mask;
61
    wire [IN_WIDTH-1    :0] masked_mux_in;
62
    wire [SEL_WIDTH-1:0]    mux_out_gen [OUT_WIDTH-1:0];
63
 
64
    genvar i,j;
65
 
66
    //first selector masking
67
    generate    // first_mask = {sel[0],sel[0],sel[0],....,sel[n],sel[n],sel[n]}
68
        for(i=0; i<SEL_WIDTH; i=i+1) begin : mask_loop
69
            assign mask[(i+1)*OUT_WIDTH-1 : (i)*OUT_WIDTH]  =   {OUT_WIDTH{sel[i]} };
70
        end
71
 
72
        assign masked_mux_in    = mux_in & mask;
73
 
74
        for(i=0; i<OUT_WIDTH; i=i+1) begin : lp1
75
            for(j=0; j<SEL_WIDTH; j=j+1) begin : lp2
76
                assign mux_out_gen [i][j]   =   masked_mux_in[i+OUT_WIDTH*j];
77
            end
78
            assign mux_out[i] = | mux_out_gen [i];
79
        end
80
    endgenerate
81
 
82
endmodule
83
 
84
 
85
 
86
 
87
 
88
 
89
/******************************
90
 
91
    One hot demultiplexer
92
 
93
****************************/
94
 
95
 
96
module one_hot_demux    #(
97
        parameter IN_WIDTH=5,
98
        parameter SEL_WIDTH=4,
99
        parameter OUT_WIDTH=IN_WIDTH*SEL_WIDTH
100
    )
101
    (
102
        input   [SEL_WIDTH-1        :   0] demux_sel,//selectore
103
        input   [IN_WIDTH-1         :   0] demux_in,//repeated
104
        output  [OUT_WIDTH-1        :   0]  demux_out
105
    );
106
 
107
    genvar i,j;
108
    generate
109
    for(i=0;i<SEL_WIDTH;i=i+1)begin :loop1
110
        for(j=0;j<IN_WIDTH;j=j+1)begin :loop2
111
                assign demux_out[i*IN_WIDTH+j] =     demux_sel[i]   &   demux_in[j];
112
        end//for j
113
    end//for i
114
    endgenerate
115
 
116
 
117
 
118
endmodule
119
 
120
/**************************
121
 
122
 
123
    custom_or
124
 
125
 
126
***************************/
127
 
128
 
129
module custom_or #(
130
    parameter IN_NUM        =   4,
131
    parameter OUT_WIDTH =   5
132
)(
133
    or_in,
134
    or_out
135
);
136
 
137
    localparam IN_WIDTH  = IN_NUM*OUT_WIDTH;
138
 
139
    input [IN_WIDTH-1       :   0]  or_in;
140
    output[OUT_WIDTH-1      :   0]  or_out;
141
 
142
    wire        [IN_NUM-1       :   0] in_sep   [OUT_WIDTH-1        :   0];
143
    genvar i,j;
144
    generate
145
    for (i=0;i<OUT_WIDTH;i=i+1) begin: sep_loop
146
        for (j=0;j<IN_NUM;j=j+1) begin: sep_loop
147
            assign in_sep[i][j]= or_in [j*OUT_WIDTH+i];
148
        end
149
        assign or_out[i]= |in_sep[i];
150
    end
151
    endgenerate
152
 
153
 
154
endmodule
155
 
156
 
157
/*****************************************
158
 
159
sum the output of all ports except the output of  port itself
160
 
161
 
162
****************************************/
163
 
164
 
165
module outport_sum #(
166
    parameter IN_ARRAY_WIDTH =10,
167
    parameter IN_NUM     =5,
168
    parameter IN_WIDTH  =   IN_ARRAY_WIDTH/IN_NUM,
169
    parameter CMP_VAL   =   IN_WIDTH/(IN_NUM-1),
170
    parameter OUT_WIDTH = (IN_ARRAY_WIDTH/IN_NUM)+CMP_VAL
171
 
172
    )
173
    (
174
    input   [IN_ARRAY_WIDTH-1       :   0]  in,
175
    output  [OUT_WIDTH-1                :   0]  out
176
);
177
 
178
    genvar i,j;
179
    wire [IN_WIDTH-1        :   0]      in_sep  [IN_NUM-1       :   0];
180
    wire [IN_NUM-2          :   0]      gen         [OUT_WIDTH-1    :   0];
181
    generate
182
        for(i=0;i<IN_NUM; i=i+1      ) begin : lp
183
            assign in_sep[i]  = in[(IN_WIDTH*(i+1))-1   : IN_WIDTH*i];
184
        end
185
        for (j=0;j<IN_NUM-1;j=j+1)begin : loop1
186
                for(i=0;i<OUT_WIDTH; i=i+1  )begin : loop2
187
                    if(i>=CMP_VAL*(j+1))begin : if1
188
                        assign gen[i][j] = in_sep[j][i-CMP_VAL];
189
                    end
190
                    else if( i< CMP_VAL*(j+1) && i>= (CMP_VAL*j)) begin :if2
191
                        assign gen[i][j] = in_sep[IN_NUM-1][i];
192
                    end
193
                    else    begin :els
194
                        assign gen[i][j] = in_sep[j][i];
195
                    end
196
                end// for i
197
            end// for j
198
        for(i=0;i<OUT_WIDTH; i=i+1       ) begin : lp2
199
            assign out[i]               = |  gen[i];
200
        end
201
    endgenerate
202
endmodule
203
 
204
/***********************************
205
 
206
        module bin_to_one_hot
207
 
208
 
209
************************************/
210
 
211
 
212
module bin_to_one_hot #(
213
    parameter BIN_WIDTH     =   2,
214
    parameter ONE_HOT_WIDTH =   2**BIN_WIDTH
215
 
216
)
217
(
218
    input   [BIN_WIDTH-1            :   0]  bin_code,
219
    output  [ONE_HOT_WIDTH-1        :   0] one_hot_code
220
 );
221
 
222
    genvar i;
223
    generate
224
        for(i=0; i<ONE_HOT_WIDTH; i=i+1) begin :one_hot_gen_loop
225
                assign one_hot_code[i] = (bin_code == i[BIN_WIDTH-1         :   0]);
226
        end
227
    endgenerate
228
 
229
endmodule
230
 
231
/***********************************
232
 
233
        one_hot_to_binary
234
 
235
************************************/
236
 
237
 
238
 
239
module one_hot_to_bin #(
240
    parameter ONE_HOT_WIDTH =   4,
241
    parameter BIN_WIDTH     =  (ONE_HOT_WIDTH>1)? log2(ONE_HOT_WIDTH):1
242
)
243
(
244
    input   [ONE_HOT_WIDTH-1        :   0] one_hot_code,
245
    output  [BIN_WIDTH-1            :   0]  bin_code
246
 
247
);
248
 
249
 
250
    function integer log2;
251
      input integer number; begin
252
         log2=(number <=1) ? 1: 0;
253
         while(2**log2<number) begin
254
            log2=log2+1;
255
         end
256
      end
257
    endfunction // log2 
258
 
259
localparam MUX_IN_WIDTH =   BIN_WIDTH* ONE_HOT_WIDTH;
260
 
261
wire [MUX_IN_WIDTH-1        :   0]  bin_temp ;
262
 
263
genvar i;
264
generate
265
    if(ONE_HOT_WIDTH>1)begin :if1
266
        for(i=0; i<ONE_HOT_WIDTH; i=i+1) begin :mux_in_gen_loop
267
            assign bin_temp[(i+1)*BIN_WIDTH-1 : i*BIN_WIDTH] =  i[BIN_WIDTH-1:0];
268
        end
269
 
270
 
271
        one_hot_mux #(
272
            .IN_WIDTH   (MUX_IN_WIDTH),
273
            .SEL_WIDTH  (ONE_HOT_WIDTH)
274
 
275
        )
276
        one_hot_to_bcd_mux
277
        (
278
            .mux_in     (bin_temp),
279
            .mux_out        (bin_code),
280
            .sel            (one_hot_code)
281
 
282
        );
283
     end else begin :els
284
        assign  bin_code = one_hot_code;
285
 
286
     end
287
 
288
endgenerate
289
 
290
endmodule
291
 
292
 
293
 
294
/****************************************
295
 
296
            binary_mux
297
 
298
***************************************/
299
 
300
module binary_mux #(
301
        parameter   IN_WIDTH         =   20,
302
        parameter   OUT_WIDTH       =   5
303
    )
304
    (
305
        mux_in,
306
        mux_out,
307
        sel
308
 
309
    );
310
 
311
 
312
    function integer log2;
313
      input integer number; begin
314
         log2=(number <=1) ? 1: 0;
315
         while(2**log2<number) begin
316
            log2=log2+1;
317
         end
318
      end
319
    endfunction // log2 
320
 
321
     localparam  IN_NUM          =   IN_WIDTH/OUT_WIDTH,
322
                 SEL_WIDTH_BIN   = (IN_NUM>1)?  log2(IN_NUM): 1;
323
 
324
 
325
    input   [IN_WIDTH-1         :0] mux_in;
326
    output  [OUT_WIDTH-1        :0] mux_out;
327
    input   [SEL_WIDTH_BIN-1    :0] sel;
328
    genvar i;
329
 
330
 
331
        generate
332
                if(IN_NUM>1) begin :if1
333
                        wire [OUT_WIDTH-1       :0] mux_in_2d [IN_NUM -1    :0];
334
                        for (i=0; i< IN_NUM; i=i+1) begin : loop
335
                                assign mux_in_2d[i] =mux_in[((i+1)*OUT_WIDTH)-1 :   i*OUT_WIDTH];
336
                        end
337
                        assign mux_out = mux_in_2d[sel];
338
                end else  begin :els
339
                        assign mux_out = mux_in;
340
                end
341
        endgenerate
342
 
343
endmodule
344
 
345
 
346
/******************************
347
 
348
    set_bits_counter
349
 
350
*******************************/
351
 
352
 
353
module set_bits_counter #(
354
    parameter IN_WIDTH =120,
355
    parameter OUT_WIDTH = log2(IN_WIDTH+1)
356
    )
357
    (
358
    input   [IN_WIDTH-1         :   0]  in,
359
    output  [OUT_WIDTH-1        :   0]  out
360
 
361
);
362
 
363
    function integer log2;
364
      input integer number; begin
365
         log2=(number <=1) ? 1: 0;
366
         while(2**log2<number) begin
367
            log2=log2+1;
368
         end
369
      end
370
    endfunction // log2 
371
 
372
 
373
    wire    [IN_WIDTH-2     :   0]  addrin2;
374
    wire    [OUT_WIDTH-1    :   0]  addrout [IN_WIDTH-2         :   0];
375
    wire    [OUT_WIDTH-1    :   0]  addrin1 [IN_WIDTH-1         :   0];
376
 
377
 
378
    assign out          = addrin1 [IN_WIDTH-1];
379
 
380
    genvar i;
381
    //always @(*)begin
382
    assign  addrin1[0] = {{(OUT_WIDTH-1){1'b0}},in[0]};
383
    generate
384
        for (i=0; i<IN_WIDTH-1; i=i+1) begin : loop
385
                assign  addrin1[i+1]  = addrout[i];
386
                assign  addrin2[i]    = in[i+1];
387
                assign  addrout[i]    = addrin1[i] + addrin2 [i];
388
        end
389
    endgenerate
390
 
391
endmodule
392
 
393
 
394
 
395
 
396
 
397
 
398
/******************************
399
 
400
    check_single_bit_assertation
401
 
402
*******************************/
403
 
404
 
405
module check_single_bit_assertation #(
406
    parameter IN_WIDTH =2
407
 
408
    )
409
    (
410
    input   [IN_WIDTH-1         :   0]  in,
411
    output  result
412
 
413
    );
414
 
415
    function integer log2;
416
      input integer number; begin
417
         log2=(number <=1) ? 1: 0;
418
         while(2**log2<number) begin
419
            log2=log2+1;
420
         end
421
      end
422
    endfunction // log2 
423
 
424
 
425
 
426
    localparam OUT_WIDTH = log2(IN_WIDTH+1);
427
 
428
    wire [OUT_WIDTH-1   :   0]  sum;
429
 
430
    parallel_counter #(
431
        .IN_WIDTH (IN_WIDTH)
432
    )counter
433
    (
434
        .in(in),
435
        .out(sum)
436
    );
437
 
438
    assign result = (sum <=1)? 1'b1: 1'b0;
439
 
440
 
441
endmodule
442
 
443
/**********************************
444
 
445
fast_minimum_number
446
 
447
***********************************/
448
 
449
 
450
module fast_minimum_number#(
451
    parameter NUM_OF_INPUTS     =   8,
452
    parameter DATA_WIDTH            =   5,
453
    parameter IN_ARRAY_WIDTH    =   NUM_OF_INPUTS   * DATA_WIDTH
454
)
455
(
456
    input  [IN_ARRAY_WIDTH-1            :   0] in_array,
457
    output [NUM_OF_INPUTS-1             :   0]  min_out
458
);
459
 
460
    genvar i,j;
461
    wire [DATA_WIDTH-1                  :   0]  numbers             [NUM_OF_INPUTS-1            :0];
462
    wire [NUM_OF_INPUTS-2               :   0]  comp_array          [NUM_OF_INPUTS-1            :0];
463
 
464
    generate
465
    if(NUM_OF_INPUTS==1)begin:if1
466
        assign min_out = 1'b1;
467
    end
468
    else begin : els//(vc num >1)
469
        for(i=0; i<NUM_OF_INPUTS;  i=i+1) begin : loop_i
470
                assign numbers[i]   = in_array  [(i+1)* DATA_WIDTH-1: i*DATA_WIDTH];
471
                for(j=0; j<NUM_OF_INPUTS-1;  j=j+1) begin : loop_j
472
                            if(i>j) begin :if1 assign comp_array [i][j] = ~ comp_array [j][i-1]; end
473
                            else   begin :els     assign comp_array [i]   [j] = numbers[i]<= numbers[j+1]; end
474
                end//for j
475
                assign min_out[i]=  & comp_array[i];
476
        end//for i
477
    end//else
478
    endgenerate
479
 
480
endmodule
481
 
482
 
483
/********************************************
484
 
485
        Carry-based reduction parallel counter
486
 
487
 
488
********************************************/
489
module parallel_counter  #(
490
    parameter IN_WIDTH =120 // max 127
491
)
492
(
493
    in,
494
    out
495
);
496
 
497
 
498
 
499
    function integer log2;
500
      input integer number; begin
501
         log2=(number <=1) ? 1: 0;
502
         while(2**log2<number) begin
503
            log2=log2+1;
504
         end
505
      end
506
    endfunction // log2 
507
 
508
  localparam OUT_WIDTH = log2(IN_WIDTH+1);
509
  localparam PCIw      = (IN_WIDTH < 8   )? 7    :
510
                         (IN_WIDTH < 16  )? 15   :
511
                         (IN_WIDTH < 31  )? 31   :
512
                         (IN_WIDTH < 36  )? 63   :   127;
513
 
514
 
515
   localparam PCOw      = (IN_WIDTH < 8  )? 3   :
516
                         (IN_WIDTH < 16  )? 4   :
517
                         (IN_WIDTH < 31  )? 5   :
518
                         (IN_WIDTH < 36  )? 6   :   7;
519
 
520
input   [IN_WIDTH-1         :   0]  in;
521
output  [OUT_WIDTH-1        :   0]  out;
522
 
523
wire [PCIw-1    :   0]  pc_in;
524
wire [PCOw-1    :   0]  pc_out;
525
 
526
generate
527
    if(PCIw > IN_WIDTH ) begin :w1
528
        assign   pc_in = {{(PCIw-IN_WIDTH){1'b0}},in};
529
    end else begin:els
530
         assign   pc_in=in;
531
    end // if 
532
 
533
    if(PCIw == 7) begin :w7
534
 
535
        PC_7_3   pc (
536
            .in(pc_in),
537
            .out(pc_out)
538
        );
539
 
540
    end else if(PCIw == 15) begin :w15
541
          PC_15_4   pc (
542
            .in(pc_in),
543
            .out(pc_out)
544
           );
545
 
546
    end else if(PCIw == 31) begin :w31
547
        PC_31_5   pc (
548
            .in(pc_in),
549
            .out(pc_out)
550
        );
551
    end else if(PCIw == 63) begin :w63
552
         PC_63_6   pc (
553
            .in(pc_in),
554
            .out(pc_out)
555
        );
556
 
557
    end else  begin :w127
558
         PC_127_7 pc (
559
            .in(pc_in),
560
            .out(pc_out)
561
        );
562
    end
563
 
564
 endgenerate
565
 
566
 assign out = pc_out[OUT_WIDTH-1    :   0];
567
 
568
endmodule
569
 
570
 
571
 
572
//carry-sum generation blocks
573
module CS_GEN (
574
    in,
575
    abc,
576
    s
577
);
578
    input   [6  :   0] in;
579
    output  s;
580
    output  [2  :   0] abc;
581
 
582
    wire      a,b,c,s;
583
    wire    [3  :   0] in1;
584
    wire    [2  :   0] in2;
585
    wire    [2  :   0] j1;
586
    wire    [1  :   0] j2;
587
 
588
    assign {in2,in1} =  in;
589
    assign j1= in1[3]+in1[2]+in1[1]+in1[0];
590
    assign j2= in2[2]+in2[1]+in2[0];
591
 
592
    //s is asserted when both in1 and in2 have odd number of ones.
593
    assign s    = j1[0] ^ j2[0];
594
    // a is asserted when there are at least two ones in in1 (i.e., j1 >= 2);
595
    assign  a   =   (j1 >   3'd1);
596
 
597
    //b is asserted when there are at least two ones in in2 (i.e., j2 >= 2);
598
    assign  b   =   (j2 >   2'd1);
599
 
600
    // C is asserted when when j1 equals 4 or when  s is asserted
601
    assign c    =   (j1==4) | (j1[0] & j2[0]);
602
 
603
    assign abc = {a,b,c};
604
endmodule
605
 
606
/*************************
607
 
608
 (7,3) parallel counter
609
 
610
*************************/
611
 
612
module PC_7_3 (
613
    in,
614
    out
615
 
616
);
617
    input   [6    : 0]  in;
618
    output  [2    : 0]  out;
619
 
620
    wire    [2    : 0] abc;
621
 
622
    CS_GEN cs(
623
        .in(in),
624
        .abc(abc),
625
        .s(out[0])
626
    );
627
 
628
    assign out[2:1] = abc[2]+abc[1]+abc[0];
629
 
630
 
631
 
632
 
633
endmodule
634
 
635
/*************************
636
 
637
    (15,4) parallel counter
638
 
639
*************************/
640
 
641
module PC_15_4 (
642
    in,
643
    out
644
 
645
);
646
    input   [14   : 0]  in;
647
    output  [3    : 0]  out;
648
 
649
    wire    [2:0]   abc0,abc1;
650
    wire            s0,s1,b2;
651
 
652
    CS_GEN cs0(
653
        .in     (in  [6  :   0]),
654
        .abc    (abc0),
655
        .s      (s0)
656
    );
657
 
658
     CS_GEN cs1(
659
        .in     (in  [13  :   7]),
660
        .abc    (abc1),
661
        .s      (s1)
662
    );
663
 
664
    assign {b2,out[0]}  =in  [14] + s0 +s1;
665
 
666
    PC_7_3 pc_sub(
667
        .in({abc0,abc1,b2}),
668
        .out(out[3:1])
669
    );
670
 
671
 
672
 
673
 
674
endmodule
675
 
676
 
677
// (31,5) parallel counter
678
module PC_31_5 (
679
    in,
680
    out
681
 
682
);
683
    localparam CS_NUM   =   5;
684
 
685
    input   [30         : 0]  in;
686
    output  [4          : 0]  out;
687
 
688
 
689
    wire    [CS_NUM-1   : 0]   s;
690
    wire    [(CS_NUM*7)-1   :   0]  cs_in;
691
    wire    [14         :   0]  pc_15_in;
692
 
693
    assign cs_in ={s[3:0] ,in };
694
 
695
    genvar i;
696
    generate
697
    for (i=0;i<CS_NUM;i=i+1) begin: lp
698
        CS_GEN cs(
699
            .in     (cs_in     [(i+1)*7-1  :  i*7]),
700
            .abc    (pc_15_in  [(i+1)*3-1  :  i*3]),
701
            .s      (s      [i])
702
        );
703
 
704
    end//for
705
    endgenerate
706
 
707
    PC_15_4 pc_15(
708
        .in    (pc_15_in ),
709
        .out   (out[4:1])
710
    );
711
 
712
    assign out[0] = s[4];
713
 
714
 endmodule
715
 
716
/*************************
717
 
718
 (63,6) parallel counter
719
 
720
**************************/
721
 
722
module PC_63_6 (
723
    in,
724
    out
725
 
726
);
727
    localparam CS_NUM   =   10;
728
 
729
    input   [62         : 0]  in;
730
    output  [5          : 0]  out;
731
 
732
 
733
    wire    [CS_NUM-1   : 0]   s;
734
    wire    [(CS_NUM*7)-1   :   0]  cs_in;
735
    wire    [30         : 0]  pc_31_in;
736
 
737
    assign cs_in ={s[7:0] ,in };
738
 
739
    genvar i;
740
    generate
741
    for (i=0;i<CS_NUM;i=i+1) begin:lp
742
        CS_GEN cs(
743
            .in     (cs_in     [(i+1)*7-1  :  i*7]),
744
            .abc    (pc_31_in  [(i+1)*3-1  :  i*3]),
745
            .s      (s      [i])
746
        );
747
 
748
    end//for
749
    endgenerate
750
 
751
    assign {pc_31_in[30],out[0]}    =   s[7]+s[8]+s[9];
752
 
753
    PC_31_5 pc_31(
754
        .in(pc_31_in ),
755
        .out(out[5:1])
756
    );
757
 endmodule
758
 
759
/*************************
760
 
761
 (127,7) parallel counter
762
 
763
*************************/
764
 
765
module PC_127_7 (
766
    in,
767
    out
768
 
769
);
770
    localparam CS_NUM   =   21;
771
 
772
    input   [126        : 0]  in;
773
    output  [6          : 0]  out;
774
 
775
 
776
    wire    [CS_NUM-1       : 0]   s;
777
    wire    [(CS_NUM*7)-1   : 0]  cs_in;//147
778
    wire    [62             : 0]  pc_63_in;
779
 
780
    assign cs_in ={s[19:0] ,in };
781
 
782
    genvar i;
783
    generate
784
    for (i=0;i<CS_NUM;i=i+1) begin :lp
785
        CS_GEN cs(
786
            .in     (cs_in     [(i+1)*7-1  :  i*7]),
787
            .abc    (pc_63_in  [(i+1)*3-1  :  i*3]),
788
            .s      (s      [i])
789
        );
790
 
791
    end//for
792
    endgenerate
793
 
794
    assign {out[0]}    =   s[20];
795
 
796
    PC_63_6 pc63(
797
        .in(pc_63_in),
798
        .out(out[6:1])
799
    );
800
 
801
 
802
 endmodule
803
 
804
 
805
 
806
 
807
 

powered by: WebSVN 2.1.0

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