Changeset 65 for PROJECT_CORE_MPI


Ignore:
Timestamp:
Apr 22, 2013, 11:35:33 AM (12 years ago)
Author:
rolagamo
Message:
 
Location:
PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/Arbiter.vhd

    r22 r65  
    4646signal grant_signal : STD_LOGIC;
    4747--signal not_fifo_full : STD_LOGIC;
    48 signal Mask : STD_LOGIC;
     48signal Mask : STD_LOGIC:='0';
     49signal RNW : std_logic:='0';
    4950begin
    5051--Grant<=grant_signal; -- Grant n'a pas été déclarée InOut
    5152Mask <= P AND (not Fifo_full);
    52 process(Mask, Request, North, West)-- genere de la logique purement combinatoire
     53RNW<= Request And North And West;
     54process(Mask, RNW, North, West)-- genere de la logique purement combinatoire
    5355begin
    5456if Mask ='0' then --cellule inactive
     
    5759East <= '1';
    5860   else
    59         Grant <= Request And North And West;
    60         South <= (North) And (Not (Request And North And West));       
    61         East  <= (West)  And (Not (Request And North And West));
     61        Grant <= RNW;
     62        South <= (North) And (Not (RNW));       
     63        East  <= (West)  And (Not (RNW));
    6264end if;
    6365end process;
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/CoreTypes.vhd

    r45 r65  
    2424CONSTANT CORE_WWAIT_ADR : natural := CORE_BASE_ADR+566;
    2525CONSTANT CORE_Rank2port_BASE :NATURAL:=32;
     26CONSTANT CORE_RANK_ADR : NATURAL:=CORE_BASE_ADR+CORE_Rank2Port_Base;
    2627CONSTANT WIN0_ADR :natural :=4;
    2728CONSTANT WIN1_ADR :natural :=14;
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/Crossbar.vhd

    r22 r65  
    11----------------------------------------------------------------------------------
    22-- Company:
    3 -- Engineer: KIEGAING EMMANUEL
     3-- Engineer: KIEGAING EMMANUEL / GAMOM NGOUNOU
    44--
    55-- Create Date:    11:48:18 06/19/2011
     
    1616-- a été retiré les signaux inutilisées comme fp, port_source, etc...
    1717-- Revision 0.01 - File Created
    18 -- Additional Comments:
     18-- Revision 0.02 Ajout des signaux clk et reset
     19-- Additional Comments: pour la gestion du pipeline
    1920--
    2021----------------------------------------------------------------------------------
     
    3334    generic
    3435              (
    35                           number_of_crossbar_ports: positive := 4
     36                          number_of_crossbar_ports: positive := 8
    3637                        );
    37     Port ( Port1_in : in  STD_LOGIC_VECTOR (Word-1 downto 0);
     38    Port ( clk : in  STD_LOGIC;
     39                          reset : in  STD_LOGIC; --pour gérer le pipeline
     40                          Port1_in : in  STD_LOGIC_VECTOR (Word-1 downto 0);
    3841           Port2_in : in  STD_LOGIC_VECTOR (Word-1 downto 0);
    3942           Port3_in : in  STD_LOGIC_VECTOR (Word-1 downto 0);
     
    115118                          number_of_ports : positive := 4
    116119                        );
    117     Port ( Control : in  STD_LOGIC_VECTOR (number_of_ports*number_of_ports downto 1);
     120    Port ( clk,reset : in std_logic;
     121                          Control : in  STD_LOGIC_VECTOR (number_of_ports*number_of_ports downto 1);
    118122           Data_In : in  STD_LOGIC_VECTOR (number_of_ports downto 1);
    119123           Data_out : out  STD_LOGIC_VECTOR (number_of_ports downto 1));
    120124        END COMPONENT; 
    121        
     125signal ctrl_buf:        STD_LOGIC_VECTOR (number_of_crossbar_ports*number_of_crossbar_ports downto 1):=(others=>'0');
     126--signal ctrl_chg:std_logic:='0';
    122127begin
    123128-- La matrice interconnectee
    124129-- le circuit genere depend du parametre generique nombre de ports
    125 
     130--ctrl_chg<=all_zeros(ctrl_buf xor ctrl); --sur chaque changement du mot de contrôle, mettre à jour ce registre
     131--ctrl_proc:process(ctrl)
     132--      begin
     133        ctrl_buf<=ctrl;
     134--      end process;
    126135--======================crossbar 2 ports=======================
    127136
     
    133142      GENERIC MAP(number_of_ports => 2)
    134143      PORT MAP(
    135 
    136       Control => Ctrl,
     144                reset => reset,
     145                clk =>clk,
     146     
     147                 Control => Ctrl_buf,
    137148       Data_In(1) => Port1_in(0),
    138149       Data_In(2) => Port2_in(0),
     
    146157      GENERIC MAP(number_of_ports => 2)
    147158      PORT MAP(
    148 
    149       Control => Ctrl,
     159                reset => reset,
     160                clk =>clk,
     161
     162                 Control => Ctrl_buf,
    150163       Data_In(1) => Port1_in(1),
    151164       Data_In(2) => Port2_in(1),
     
    159172      GENERIC MAP(number_of_ports => 2)
    160173      PORT MAP(
    161 
    162       Control => Ctrl,
     174                reset => reset,
     175                clk =>clk,
     176
     177                 Control => Ctrl_buf,
    163178       Data_In(1) => Port1_in(2),
    164179       Data_In(2) => Port2_in(2),
     
    172187      GENERIC MAP(number_of_ports => 2)
    173188      PORT MAP(
    174 
    175       Control => Ctrl,
     189                reset => reset,
     190                clk =>clk,
     191
     192                 Control => Ctrl_buf,
    176193       Data_In(1) => Port1_in(3),
    177194       Data_In(2) => Port2_in(3),
     
    186203      PORT MAP(
    187204
    188       Control => Ctrl,
     205                reset => reset,
     206                clk =>clk,
     207
     208                 Control => Ctrl_buf,
    189209       Data_In(1) => Port1_in(4),
    190210       Data_In(2) => Port2_in(4),
     
    199219      PORT MAP(
    200220
    201       Control => Ctrl,
     221      reset => reset,
     222                 clk=>clk,
     223                 Control => Ctrl_buf,
    202224       Data_In(1) => Port1_in(5),
    203225       Data_In(2) => Port2_in(5),
     
    212234      PORT MAP(
    213235
    214       Control => Ctrl,
     236      reset => reset,
     237                 clk=>clk,
     238                 Control => Ctrl_buf,
    215239       Data_In(1) => Port1_in(6),
    216240       Data_In(2) => Port2_in(6),
     
    225249      PORT MAP(
    226250
    227       Control => Ctrl,
     251      reset => reset,
     252                 clk=>clk,
     253                 Control => Ctrl_buf,
    228254       Data_In(1) => Port1_in(7),
    229255       Data_In(2) => Port2_in(7),
     
    237263      GENERIC MAP(number_of_ports => 2)
    238264      PORT MAP(
    239 
    240       Control => Ctrl,
     265                reset => reset,
     266                clk =>clk,
     267
     268                 Control => Ctrl_buf,
    241269       Data_In(1) => Port1_pulse_in,
    242270       Data_In(2) => Port2_pulse_in,
     
    258286      PORT MAP(
    259287
    260       Control => Ctrl,
     288                reset => reset,
     289                clk =>clk,
     290
     291                 Control => Ctrl_buf,
    261292       Data_In(1) => Port1_in(0),
    262293       Data_In(2) => Port2_in(0),
     
    272303      GENERIC MAP(number_of_ports => 3)
    273304      PORT MAP(
    274 
    275       Control => Ctrl,
     305                reset => reset,
     306                clk =>clk,
     307     
     308                 Control => Ctrl_buf,
    276309       Data_In(1) => Port1_in(1),
    277310       Data_In(2) => Port2_in(1),
     
    288321      PORT MAP(
    289322
    290       Control => Ctrl,
     323      reset => reset,
     324                 clk=>clk,
     325                 Control => Ctrl_buf,
    291326       Data_In(1) => Port1_in(2),
    292327       Data_In(2) => Port2_in(2),
     
    302337      GENERIC MAP(number_of_ports => 3)
    303338      PORT MAP(
    304 
    305       Control => Ctrl,
     339                reset => reset,
     340                clk =>clk,
     341     
     342                 Control => Ctrl_buf,
    306343       Data_In(1) => Port1_in(3),
    307344       Data_In(2) => Port2_in(3),
     
    318355      PORT MAP(
    319356
    320       Control => Ctrl,
     357      reset => reset,
     358                 clk=>clk,
     359                 Control => Ctrl_buf,
    321360       Data_In(1) => Port1_in(4),
    322361       Data_In(2) => Port2_in(4),
     
    333372      PORT MAP(
    334373
    335       Control => Ctrl,
     374      reset => reset,
     375                 clk=>clk,
     376                 Control => Ctrl_buf,
    336377       Data_In(1) => Port1_in(5),
    337378       Data_In(2) => Port2_in(5),
     
    348389      PORT MAP(
    349390
    350       Control => Ctrl,
     391                reset => reset,
     392                clk =>clk,
     393     
     394                 Control => Ctrl_buf,
    351395       Data_In(1) => Port1_in(6),
    352396       Data_In(2) => Port2_in(6),
     
    362406      GENERIC MAP(number_of_ports => 3)
    363407      PORT MAP(
    364 
    365       Control => Ctrl,
     408                reset => reset,
     409                clk =>clk,
     410
     411                 Control => Ctrl_buf,
    366412       Data_In(1) => Port1_in(7),
    367413       Data_In(2) => Port2_in(7),
     
    377423      GENERIC MAP(number_of_ports => 3)
    378424      PORT MAP(
    379 
    380       Control => Ctrl,
     425                reset => reset,
     426                clk =>clk,
     427
     428                 Control => Ctrl_buf,
    381429       Data_In(1) => Port1_pulse_in,
    382430       Data_In(2) => Port2_pulse_in,
     
    400448      PORT MAP(
    401449
    402       Control => Ctrl,
     450      reset => reset,
     451                 clk=>clk,
     452                 Control => Ctrl_buf,
    403453       Data_In(1) => Port1_in(0),
    404454       Data_In(2) => Port2_in(0),
     
    417467      PORT MAP(
    418468
    419       Control => Ctrl,
     469      reset => reset,
     470                 clk=>clk,
     471                 Control => Ctrl_buf,
    420472       Data_In(1) => Port1_in(1),
    421473       Data_In(2) => Port2_in(1),
     
    434486      PORT MAP(
    435487
    436       Control => Ctrl,
     488      reset => reset,
     489                 clk=>clk,
     490                 Control => Ctrl_buf,
    437491       Data_In(1) => Port1_in(2),
    438492       Data_In(2) => Port2_in(2),
     
    451505      PORT MAP(
    452506
    453       Control => Ctrl,
     507      reset => reset,
     508                 clk=>clk,
     509                 Control => Ctrl_buf,
    454510       Data_In(1) => Port1_in(3),
    455511       Data_In(2) => Port2_in(3),
     
    468524      PORT MAP(
    469525
    470       Control => Ctrl,
     526      reset => reset,
     527                 clk=>clk,
     528                 Control => Ctrl_buf,
    471529       Data_In(1) => Port1_in(4),
    472530       Data_In(2) => Port2_in(4),
     
    485543      PORT MAP(
    486544
    487       Control => Ctrl,
     545      reset => reset,
     546                 clk=>clk,
     547                 Control => Ctrl_buf,
    488548       Data_In(1) => Port1_in(5),
    489549       Data_In(2) => Port2_in(5),
     
    502562      PORT MAP(
    503563
    504       Control => Ctrl,
     564      reset => reset,
     565                 clk=>clk,
     566                 Control => Ctrl_buf,
    505567       Data_In(1) => Port1_in(6),
    506568       Data_In(2) => Port2_in(6),
     
    519581      PORT MAP(
    520582
    521       Control => Ctrl,
     583      reset => reset,
     584                 clk=>clk,
     585                 Control => Ctrl_buf,
    522586       Data_In(1) => Port1_in(7),
    523587       Data_In(2) => Port2_in(7),
     
    536600      PORT MAP(
    537601
    538       Control => Ctrl,
     602      reset => reset,
     603                 clk=>clk,
     604                 Control => Ctrl_buf,
    539605       Data_In(1) => Port1_pulse_in,
    540606       Data_In(2) => Port2_pulse_in,
     
    560626      PORT MAP(
    561627
    562       Control => Ctrl,
     628      reset => reset,
     629                 clk=>clk,
     630                 Control => Ctrl_buf,
    563631       Data_In(1) => Port1_in(0),
    564632       Data_In(2) => Port2_in(0),
     
    579647      PORT MAP(
    580648
    581       Control => Ctrl,
     649      reset => reset,
     650                 clk=>clk,
     651                 Control => Ctrl_buf,
    582652       Data_In(1) => Port1_in(1),
    583653       Data_In(2) => Port2_in(1),
     
    598668      PORT MAP(
    599669
    600       Control => Ctrl,
     670      reset => reset,
     671                 clk=>clk,
     672                 Control => Ctrl_buf,
    601673       Data_In(1) => Port1_in(2),
    602674       Data_In(2) => Port2_in(2),
     
    617689      PORT MAP(
    618690
    619       Control => Ctrl,
     691      reset => reset,
     692                 clk=>clk,
     693                 Control => Ctrl_buf,
    620694       Data_In(1) => Port1_in(3),
    621695       Data_In(2) => Port2_in(3),
     
    636710      PORT MAP(
    637711
    638       Control => Ctrl,
     712      reset => reset,
     713                 clk=>clk,
     714                 Control => Ctrl_buf,
    639715       Data_In(1) => Port1_in(4),
    640716       Data_In(2) => Port2_in(4),
     
    655731      PORT MAP(
    656732
    657       Control => Ctrl,
     733      reset => reset,
     734                 clk=>clk,
     735                 Control => Ctrl_buf,
    658736       Data_In(1) => Port1_in(5),
    659737       Data_In(2) => Port2_in(5),
     
    674752      PORT MAP(
    675753
    676       Control => Ctrl,
     754      reset => reset,
     755                 clk=>clk,
     756                 Control => Ctrl_buf,
    677757       Data_In(1) => Port1_in(6),
    678758       Data_In(2) => Port2_in(6),
     
    693773      PORT MAP(
    694774
    695       Control => Ctrl,
     775      reset => reset,
     776                 clk=>clk,
     777                 Control => Ctrl_buf,
    696778       Data_In(1) => Port1_in(7),
    697779       Data_In(2) => Port2_in(7),
     
    712794      PORT MAP(
    713795
    714       Control => Ctrl,
     796      reset => reset,
     797                 clk=>clk,
     798                 Control => Ctrl_buf,
    715799       Data_In(1) => Port1_pulse_in,
    716800       Data_In(2) => Port2_pulse_in,
     
    738822      PORT MAP(
    739823
    740       Control => Ctrl,
     824      reset => reset,
     825                 clk=>clk,
     826                 Control => Ctrl_buf,
    741827       Data_In(1) => Port1_in(0),
    742828       Data_In(2) => Port2_in(0),
     
    759845      PORT MAP(
    760846
    761       Control => Ctrl,
     847      reset => reset,
     848                 clk=>clk,
     849                 Control => Ctrl_buf,
    762850       Data_In(1) => Port1_in(1),
    763851       Data_In(2) => Port2_in(1),
     
    780868      PORT MAP(
    781869
    782       Control => Ctrl,
     870      reset => reset,
     871                 clk=>clk,
     872                 Control => Ctrl_buf,
    783873       Data_In(1) => Port1_in(2),
    784874       Data_In(2) => Port2_in(2),
     
    801891      PORT MAP(
    802892
    803       Control => Ctrl,
     893      reset => reset,
     894                 clk=>clk,
     895                 Control => Ctrl_buf,
    804896       Data_In(1) => Port1_in(3),
    805897       Data_In(2) => Port2_in(3),
     
    822914      PORT MAP(
    823915
    824       Control => Ctrl,
     916      reset => reset,
     917                 clk=>clk,
     918                 Control => Ctrl_buf,
    825919       Data_In(1) => Port1_in(4),
    826920       Data_In(2) => Port2_in(4),
     
    843937      PORT MAP(
    844938
    845       Control => Ctrl,
     939      reset => reset,
     940                 clk=>clk,
     941                 Control => Ctrl_buf,
    846942       Data_In(1) => Port1_in(5),
    847943       Data_In(2) => Port2_in(5),
     
    864960      PORT MAP(
    865961
    866       Control => Ctrl,
     962      reset => reset,
     963                 clk=>clk,
     964                 Control => Ctrl_buf,
    867965       Data_In(1) => Port1_in(6),
    868966       Data_In(2) => Port2_in(6),
     
    885983      PORT MAP(
    886984
    887       Control => Ctrl,
     985      reset => reset,
     986                 clk=>clk,
     987                 Control => Ctrl_buf,
    888988       Data_In(1) => Port1_in(7),
    889989       Data_In(2) => Port2_in(7),
     
    9061006      PORT MAP(
    9071007
    908       Control => Ctrl,
     1008      reset => reset,
     1009                 clk=>clk,
     1010                 Control => Ctrl_buf,
    9091011       Data_In(1) => Port1_pulse_in,
    9101012       Data_In(2) => Port2_pulse_in,
     
    9341036      PORT MAP(
    9351037
    936       Control => Ctrl,
     1038      reset => reset,
     1039                 clk=>clk,
     1040                 Control => Ctrl_buf,
    9371041       Data_In(1) => Port1_in(0),
    9381042       Data_In(2) => Port2_in(0),
     
    9571061      PORT MAP(
    9581062
    959       Control => Ctrl,
     1063      reset => reset,
     1064                 clk=>clk,
     1065                 Control => Ctrl_buf,
    9601066       Data_In(1) => Port1_in(1),
    9611067       Data_In(2) => Port2_in(1),
     
    9801086      PORT MAP(
    9811087
    982       Control => Ctrl,
     1088      reset => reset,
     1089                 clk=>clk,
     1090                 Control => Ctrl_buf,
    9831091       Data_In(1) => Port1_in(2),
    9841092       Data_In(2) => Port2_in(2),
     
    10031111      PORT MAP(
    10041112
    1005       Control => Ctrl,
     1113      reset => reset,
     1114                 clk=>clk,
     1115                 Control => Ctrl_buf,
    10061116       Data_In(1) => Port1_in(3),
    10071117       Data_In(2) => Port2_in(3),
     
    10261136      PORT MAP(
    10271137
    1028       Control => Ctrl,
     1138      reset => reset,
     1139                 clk=>clk,
     1140                 Control => Ctrl_buf,
    10291141       Data_In(1) => Port1_in(4),
    10301142       Data_In(2) => Port2_in(4),
     
    10491161      PORT MAP(
    10501162
    1051       Control => Ctrl,
     1163      reset => reset,
     1164                 clk=>clk,
     1165                 Control => Ctrl_buf,
    10521166       Data_In(1) => Port1_in(5),
    10531167       Data_In(2) => Port2_in(5),
     
    10721186      PORT MAP(
    10731187
    1074       Control => Ctrl,
     1188      reset => reset,
     1189                 clk=>clk,
     1190                 Control => Ctrl_buf,
    10751191       Data_In(1) => Port1_in(6),
    10761192       Data_In(2) => Port2_in(6),
     
    10951211      PORT MAP(
    10961212
    1097       Control => Ctrl,
     1213      reset => reset,
     1214                 clk=>clk,
     1215                 Control => Ctrl_buf,
    10981216       Data_In(1) => Port1_in(7),
    10991217       Data_In(2) => Port2_in(7),
     
    11181236      PORT MAP(
    11191237
    1120       Control => Ctrl,
     1238      reset => reset,
     1239                 clk=>clk,
     1240                 Control => Ctrl_buf,
    11211241       Data_In(1) => Port1_pulse_in,
    11221242       Data_In(2) => Port2_pulse_in,
     
    11471267      GENERIC MAP(number_of_ports => 8)
    11481268      PORT MAP(
    1149 
    1150       Control => Ctrl,
     1269                clk =>clk,
     1270                reset =>reset,
     1271   
     1272                 Control => Ctrl_buf,
    11511273       Data_In(1) => Port1_in(0),
    11521274       Data_In(2) => Port2_in(0),
     
    11721294      GENERIC MAP(number_of_ports => 8)
    11731295      PORT MAP(
    1174 
    1175       Control => Ctrl,
     1296                clk =>clk,
     1297                reset =>reset,
     1298     
     1299                 Control => Ctrl_buf,
    11761300       Data_In(1) => Port1_in(1),
    11771301       Data_In(2) => Port2_in(1),
     
    11971321      GENERIC MAP(number_of_ports => 8)
    11981322      PORT MAP(
    1199 
    1200       Control => Ctrl,
     1323                clk =>clk,
     1324                reset =>reset,
     1325     
     1326                 Control => Ctrl_buf,
    12011327       Data_In(1) => Port1_in(2),
    12021328       Data_In(2) => Port2_in(2),
     
    12221348      GENERIC MAP(number_of_ports => 8)
    12231349      PORT MAP(
    1224 
    1225       Control => Ctrl,
     1350                clk =>clk,
     1351                reset =>reset,
     1352
     1353                 Control => Ctrl_buf,
    12261354       Data_In(1) => Port1_in(3),
    12271355       Data_In(2) => Port2_in(3),
     
    12471375      GENERIC MAP(number_of_ports => 8)
    12481376      PORT MAP(
    1249 
    1250       Control => Ctrl,
     1377                clk =>clk,
     1378                reset =>reset,
     1379
     1380                 Control => Ctrl_buf,
    12511381       Data_In(1) => Port1_in(4),
    12521382       Data_In(2) => Port2_in(4),
     
    12721402      GENERIC MAP(number_of_ports => 8)
    12731403      PORT MAP(
    1274 
    1275       Control => Ctrl,
     1404                clk =>clk,
     1405                reset =>reset,
     1406
     1407                 Control => Ctrl_buf,
    12761408       Data_In(1) => Port1_in(5),
    12771409       Data_In(2) => Port2_in(5),
     
    12971429      GENERIC MAP(number_of_ports => 8)
    12981430      PORT MAP(
    1299 
    1300       Control => Ctrl,
     1431                clk =>clk,
     1432                reset =>reset,
     1433
     1434                 Control => Ctrl_buf,
    13011435       Data_In(1) => Port1_in(6),
    13021436       Data_In(2) => Port2_in(6),
     
    13221456      GENERIC MAP(number_of_ports => 8)
    13231457      PORT MAP(
    1324 
    1325       Control => Ctrl,
     1458                clk =>clk,
     1459                reset =>reset,
     1460 
     1461                 Control => Ctrl_buf,
    13261462       Data_In(1) => Port1_in(7),
    13271463       Data_In(2) => Port2_in(7),
     
    13471483      GENERIC MAP(number_of_ports => 8)
    13481484      PORT MAP(
    1349 
    1350       Control => Ctrl,
     1485                clk =>clk,
     1486                reset =>reset,
     1487
     1488                 Control => Ctrl_buf,
    13511489       Data_In(1) => Port1_pulse_in,
    13521490       Data_In(2) => Port2_pulse_in,
     
    13791517      GENERIC MAP(number_of_ports => 9)
    13801518      PORT MAP(
    1381 
    1382       Control => Ctrl,
     1519                clk =>clk,
     1520                reset =>reset,
     1521
     1522                 Control => Ctrl_buf,
    13831523       Data_In(1) => Port1_in(0),
    13841524       Data_In(2) => Port2_in(0),
     
    14061546      GENERIC MAP(number_of_ports => 9)
    14071547      PORT MAP(
    1408 
    1409       Control => Ctrl,
     1548                clk =>clk,
     1549                reset =>reset,
     1550   
     1551                 Control => Ctrl_buf,
    14101552       Data_In(1) => Port1_in(1),
    14111553       Data_In(2) => Port2_in(1),
     
    14331575      GENERIC MAP(number_of_ports => 9)
    14341576      PORT MAP(
    1435 
    1436       Control => Ctrl,
     1577                clk =>clk,
     1578                reset =>reset,
     1579
     1580                 Control => Ctrl_buf,
    14371581       Data_In(1) => Port1_in(2),
    14381582       Data_In(2) => Port2_in(2),
     
    14601604      GENERIC MAP(number_of_ports => 9)
    14611605      PORT MAP(
    1462 
    1463       Control => Ctrl,
     1606                clk =>clk,
     1607                reset =>reset,
     1608 
     1609                 Control => Ctrl_buf,
    14641610       Data_In(1) => Port1_in(3),
    14651611       Data_In(2) => Port2_in(3),
     
    14871633      GENERIC MAP(number_of_ports => 9)
    14881634      PORT MAP(
    1489 
    1490       Control => Ctrl,
     1635                clk =>clk,
     1636                reset =>reset,
     1637 
     1638                 Control => Ctrl_buf,
    14911639       Data_In(1) => Port1_in(4),
    14921640       Data_In(2) => Port2_in(4),
     
    15141662      GENERIC MAP(number_of_ports => 9)
    15151663      PORT MAP(
    1516 
    1517       Control => Ctrl,
     1664                clk =>clk,
     1665                reset =>reset,
     1666 
     1667                 Control => Ctrl_buf,
    15181668       Data_In(1) => Port1_in(5),
    15191669       Data_In(2) => Port2_in(5),
     
    15411691      GENERIC MAP(number_of_ports => 9)
    15421692      PORT MAP(
    1543 
    1544       Control => Ctrl,
     1693                clk =>clk,
     1694                reset =>reset,
     1695 
     1696                 Control => Ctrl_buf,
    15451697       Data_In(1) => Port1_in(6),
    15461698       Data_In(2) => Port2_in(6),
     
    15681720      GENERIC MAP(number_of_ports => 9)
    15691721      PORT MAP(
    1570 
    1571       Control => Ctrl,
     1722                clk =>clk,
     1723                reset =>reset,
     1724     
     1725                 Control => Ctrl_buf,
    15721726       Data_In(1) => Port1_in(7),
    15731727       Data_In(2) => Port2_in(7),
     
    15951749      GENERIC MAP(number_of_ports => 9)
    15961750      PORT MAP(
    1597 
    1598       Control => Ctrl,
     1751                clk =>clk,
     1752                reset =>reset,
     1753   
     1754                 Control => Ctrl_buf,
    15991755       Data_In(1) => Port1_pulse_in,
    16001756       Data_In(2) => Port2_pulse_in,
     
    16301786      PORT MAP(
    16311787
    1632       Control => Ctrl,
     1788      reset => reset,
     1789                 clk=>clk,
     1790                 Control => Ctrl_buf,
    16331791       Data_In(1) => Port1_in(0),
    16341792       Data_In(2) => Port2_in(0),
     
    16591817      PORT MAP(
    16601818
    1661       Control => Ctrl,
     1819      reset => reset,
     1820                 clk=>clk,
     1821                 Control => Ctrl_buf,
    16621822       Data_In(1) => Port1_in(1),
    16631823       Data_In(2) => Port2_in(1),
     
    16881848      PORT MAP(
    16891849
    1690       Control => Ctrl,
     1850      reset => reset,
     1851                 clk=>clk,
     1852                 Control => Ctrl_buf,
    16911853       Data_In(1) => Port1_in(2),
    16921854       Data_In(2) => Port2_in(2),
     
    17171879      PORT MAP(
    17181880
    1719       Control => Ctrl,
     1881      reset => reset,
     1882                 clk=>clk,
     1883                 Control => Ctrl_buf,
    17201884       Data_In(1) => Port1_in(3),
    17211885       Data_In(2) => Port2_in(3),
     
    17461910      PORT MAP(
    17471911
    1748       Control => Ctrl,
     1912      reset => reset,
     1913                 clk=>clk,
     1914                 Control => Ctrl_buf,
    17491915       Data_In(1) => Port1_in(4),
    17501916       Data_In(2) => Port2_in(4),
     
    17751941      PORT MAP(
    17761942
    1777       Control => Ctrl,
     1943      reset => reset,
     1944                 clk=>clk,
     1945                 Control => Ctrl_buf,
    17781946       Data_In(1) => Port1_in(5),
    17791947       Data_In(2) => Port2_in(5),
     
    18041972      PORT MAP(
    18051973
    1806       Control => Ctrl,
     1974      reset => reset,
     1975                 clk=>clk,
     1976                 Control => Ctrl_buf,
    18071977       Data_In(1) => Port1_in(6),
    18081978       Data_In(2) => Port2_in(6),
     
    18332003      PORT MAP(
    18342004
    1835       Control => Ctrl,
     2005      reset => reset,
     2006                 clk=>clk,
     2007                 Control => Ctrl_buf,
    18362008       Data_In(1) => Port1_in(7),
    18372009       Data_In(2) => Port2_in(7),
     
    18622034      PORT MAP(
    18632035
    1864       Control => Ctrl,
     2036      reset => reset,
     2037                 clk=>clk,
     2038                 Control => Ctrl_buf,
    18652039       Data_In(1) => Port1_pulse_in,
    18662040       Data_In(2) => Port2_pulse_in,
     
    18982072      PORT MAP(
    18992073
    1900       Control => Ctrl,
     2074      reset => reset,
     2075                 clk=>clk,
     2076                 Control => Ctrl_buf,
    19012077       Data_In(1) => Port1_in(0),
    19022078       Data_In(2) => Port2_in(0),
     
    19292105      PORT MAP(
    19302106
    1931       Control => Ctrl,
     2107      reset => reset,
     2108                 clk=>clk,
     2109                 Control => Ctrl_buf,
    19322110       Data_In(1) => Port1_in(1),
    19332111       Data_In(2) => Port2_in(1),
     
    19602138      PORT MAP(
    19612139
    1962       Control => Ctrl,
     2140      reset => reset,
     2141                 clk=>clk,
     2142                 Control => Ctrl_buf,
    19632143       Data_In(1) => Port1_in(2),
    19642144       Data_In(2) => Port2_in(2),
     
    19912171      PORT MAP(
    19922172
    1993       Control => Ctrl,
     2173      reset => reset,
     2174 clk=>clk,
     2175
     2176                 Control => Ctrl_buf,
    19942177       Data_In(1) => Port1_in(3),
    19952178       Data_In(2) => Port2_in(3),
     
    20222205      PORT MAP(
    20232206
    2024       Control => Ctrl,
     2207      reset => reset,
     2208                 clk=>clk,
     2209                 Control => Ctrl_buf,
    20252210       Data_In(1) => Port1_in(4),
    20262211       Data_In(2) => Port2_in(4),
     
    20532238      PORT MAP(
    20542239
    2055       Control => Ctrl,
     2240      reset => reset,
     2241                 clk=>clk,
     2242
     2243                 Control => Ctrl_buf,
    20562244       Data_In(1) => Port1_in(5),
    20572245       Data_In(2) => Port2_in(5),
     
    20842272      PORT MAP(
    20852273
    2086       Control => Ctrl,
     2274      reset => reset,
     2275                 clk=>clk,
     2276
     2277                 Control => Ctrl_buf,
    20872278       Data_In(1) => Port1_in(6),
    20882279       Data_In(2) => Port2_in(6),
     
    21152306      PORT MAP(
    21162307
    2117       Control => Ctrl,
     2308      reset => reset,
     2309                 clk=>clk,
     2310
     2311                 Control => Ctrl_buf,
    21182312       Data_In(1) => Port1_in(7),
    21192313       Data_In(2) => Port2_in(7),
     
    21462340      PORT MAP(
    21472341
    2148       Control => Ctrl,
     2342      reset => reset,
     2343                 clk=>clk,
     2344
     2345                 Control => Ctrl_buf,
    21492346       Data_In(1) => Port1_pulse_in,
    21502347       Data_In(2) => Port2_pulse_in,
     
    21842381      PORT MAP(
    21852382
    2186       Control => Ctrl,
     2383      reset => reset,
     2384                 clk=>clk,
     2385
     2386                 Control => Ctrl_buf,
    21872387       Data_In(1) => Port1_in(0),
    21882388       Data_In(2) => Port2_in(0),
     
    22172417      PORT MAP(
    22182418
    2219       Control => Ctrl,
     2419      reset => reset,
     2420                 clk=>clk,
     2421 
     2422                 Control => Ctrl_buf,
    22202423       Data_In(1) => Port1_in(1),
    22212424       Data_In(2) => Port2_in(1),
     
    22502453      PORT MAP(
    22512454
    2252       Control => Ctrl,
     2455      reset => reset,
     2456                 clk=>clk,
     2457
     2458                 Control => Ctrl_buf,
    22532459       Data_In(1) => Port1_in(2),
    22542460       Data_In(2) => Port2_in(2),
     
    22832489      PORT MAP(
    22842490
    2285       Control => Ctrl,
     2491      reset => reset,
     2492                 clk=>clk,
     2493
     2494                 Control => Ctrl_buf,
    22862495       Data_In(1) => Port1_in(3),
    22872496       Data_In(2) => Port2_in(3),
     
    23162525      PORT MAP(
    23172526
    2318       Control => Ctrl,
     2527      reset => reset,
     2528                 clk=>clk,
     2529               
     2530                 Control => Ctrl_buf,
    23192531       Data_In(1) => Port1_in(4),
    23202532       Data_In(2) => Port2_in(4),
     
    23492561      PORT MAP(
    23502562
    2351       Control => Ctrl,
     2563      reset => reset,
     2564                 clk=>clk,
     2565               
     2566                 Control => Ctrl_buf,
    23522567       Data_In(1) => Port1_in(5),
    23532568       Data_In(2) => Port2_in(5),
     
    23822597      PORT MAP(
    23832598
    2384       Control => Ctrl,
     2599      reset => reset,
     2600                 clk=>clk,
     2601               
     2602                 Control => Ctrl_buf,
    23852603       Data_In(1) => Port1_in(6),
    23862604       Data_In(2) => Port2_in(6),
     
    24152633      PORT MAP(
    24162634
    2417       Control => Ctrl,
     2635      reset => reset,
     2636                 clk=>clk,
     2637
     2638                 Control => Ctrl_buf,
    24182639       Data_In(1) => Port1_in(7),
    24192640       Data_In(2) => Port2_in(7),
     
    24482669      PORT MAP(
    24492670
    2450       Control => Ctrl,
     2671      reset => reset,
     2672                 clk=>clk,
     2673
     2674                 Control => Ctrl_buf,
    24512675       Data_In(1) => Port1_pulse_in,
    24522676       Data_In(2) => Port2_pulse_in,
     
    24882712      PORT MAP(
    24892713
    2490       Control => Ctrl,
     2714      reset => reset,
     2715                 clk=>clk,
     2716                 Control => Ctrl_buf,
    24912717       Data_In(1) => Port1_in(0),
    24922718       Data_In(2) => Port2_in(0),
     
    25232749      PORT MAP(
    25242750
    2525       Control => Ctrl,
     2751      reset => reset,
     2752                 clk=>clk,
     2753
     2754                 Control => Ctrl_buf,
    25262755       Data_In(1) => Port1_in(1),
    25272756       Data_In(2) => Port2_in(1),
     
    25582787      PORT MAP(
    25592788
    2560       Control => Ctrl,
     2789      reset => reset,
     2790                 clk=>clk,
     2791                 
     2792                 Control => Ctrl_buf,
    25612793       Data_In(1) => Port1_in(2),
    25622794       Data_In(2) => Port2_in(2),
     
    25932825      PORT MAP(
    25942826
    2595       Control => Ctrl,
     2827      reset => reset,
     2828                 clk=>clk,
     2829                 Control => Ctrl_buf,
    25962830       Data_In(1) => Port1_in(3),
    25972831       Data_In(2) => Port2_in(3),
     
    26282862      PORT MAP(
    26292863
    2630       Control => Ctrl,
     2864      reset => reset,
     2865                 clk=>clk,
     2866                 Control => Ctrl_buf,
    26312867       Data_In(1) => Port1_in(4),
    26322868       Data_In(2) => Port2_in(4),
     
    26632899      PORT MAP(
    26642900
    2665       Control => Ctrl,
     2901      reset => reset,
     2902                 clk=>clk,
     2903                 Control => Ctrl_buf,
    26662904       Data_In(1) => Port1_in(5),
    26672905       Data_In(2) => Port2_in(5),
     
    26982936      PORT MAP(
    26992937
    2700       Control => Ctrl,
     2938      reset => reset,
     2939                 clk=>clk,
     2940                 Control => Ctrl_buf,
    27012941       Data_In(1) => Port1_in(6),
    27022942       Data_In(2) => Port2_in(6),
     
    27332973      PORT MAP(
    27342974
    2735       Control => Ctrl,
     2975      reset => reset,
     2976                 clk=>clk,
     2977                 Control => Ctrl_buf,
    27362978       Data_In(1) => Port1_in(7),
    27372979       Data_In(2) => Port2_in(7),
     
    27683010      PORT MAP(
    27693011
    2770       Control => Ctrl,
     3012      reset => reset,
     3013                 clk=>clk,
     3014                 Control => Ctrl_buf,
    27713015       Data_In(1) => Port1_pulse_in,
    27723016       Data_In(2) => Port2_pulse_in,
     
    28103054      PORT MAP(
    28113055
    2812       Control => Ctrl,
     3056      reset => reset,
     3057                 clk=>clk,
     3058                 Control => Ctrl_buf,
    28133059       Data_In(1) => Port1_in(0),
    28143060       Data_In(2) => Port2_in(0),
     
    28473093      PORT MAP(
    28483094
    2849       Control => Ctrl,
     3095      reset => reset,
     3096                 clk=>clk,
     3097                 Control => Ctrl_buf,
    28503098       Data_In(1) => Port1_in(1),
    28513099       Data_In(2) => Port2_in(1),
     
    28843132      PORT MAP(
    28853133
    2886       Control => Ctrl,
     3134      reset => reset,
     3135                 clk=>clk,
     3136                 Control => Ctrl_buf,
    28873137       Data_In(1) => Port1_in(2),
    28883138       Data_In(2) => Port2_in(2),
     
    29213171      PORT MAP(
    29223172
    2923       Control => Ctrl,
     3173      reset => reset,
     3174                 clk=>clk,
     3175                 Control => Ctrl_buf,
    29243176       Data_In(1) => Port1_in(3),
    29253177       Data_In(2) => Port2_in(3),
     
    29583210      PORT MAP(
    29593211
    2960       Control => Ctrl,
     3212      reset => reset,
     3213                 clk=>clk,
     3214                 Control => Ctrl_buf,
    29613215       Data_In(1) => Port1_in(4),
    29623216       Data_In(2) => Port2_in(4),
     
    29953249      PORT MAP(
    29963250
    2997       Control => Ctrl,
     3251      reset => reset,
     3252                 clk=>clk,
     3253                 Control => Ctrl_buf,
    29983254       Data_In(1) => Port1_in(5),
    29993255       Data_In(2) => Port2_in(5),
     
    30323288      PORT MAP(
    30333289
    3034       Control => Ctrl,
     3290      reset => reset,
     3291                 clk=>clk,
     3292                 Control => Ctrl_buf,
    30353293       Data_In(1) => Port1_in(6),
    30363294       Data_In(2) => Port2_in(6),
     
    30693327      PORT MAP(
    30703328
    3071       Control => Ctrl,
     3329      reset => reset,
     3330                 clk=>clk,
     3331                 Control => Ctrl_buf,
    30723332       Data_In(1) => Port1_in(7),
    30733333       Data_In(2) => Port2_in(7),
     
    31063366      PORT MAP(
    31073367
    3108       Control => Ctrl,
     3368      reset => reset,
     3369                 clk=>clk,
     3370                 Control => Ctrl_buf,
    31093371       Data_In(1) => Port1_pulse_in,
    31103372       Data_In(2) => Port2_pulse_in,
     
    31503412      PORT MAP(
    31513413
    3152       Control => Ctrl,
     3414      reset => reset,
     3415                 clk=>clk,
     3416                 Control => Ctrl_buf,
    31533417       Data_In(1) => Port1_in(0),
    31543418       Data_In(2) => Port2_in(0),
     
    31893453      PORT MAP(
    31903454
    3191       Control => Ctrl,
     3455      reset => reset,
     3456                 clk=>clk,
     3457                 Control => Ctrl_buf,
    31923458       Data_In(1) => Port1_in(1),
    31933459       Data_In(2) => Port2_in(1),
     
    32283494      PORT MAP(
    32293495
    3230       Control => Ctrl,
     3496      reset => reset,
     3497                 clk=>clk,
     3498                 Control => Ctrl_buf,
    32313499       Data_In(1) => Port1_in(2),
    32323500       Data_In(2) => Port2_in(2),
     
    32673535      PORT MAP(
    32683536
    3269       Control => Ctrl,
     3537      reset => reset,
     3538                 clk=>clk,
     3539                 Control => Ctrl_buf,
    32703540       Data_In(1) => Port1_in(3),
    32713541       Data_In(2) => Port2_in(3),
     
    33063576      PORT MAP(
    33073577
    3308       Control => Ctrl,
     3578      reset => reset,
     3579                 clk=>clk,
     3580                 Control => Ctrl_buf,
    33093581       Data_In(1) => Port1_in(4),
    33103582       Data_In(2) => Port2_in(4),
     
    33453617      PORT MAP(
    33463618
    3347       Control => Ctrl,
     3619      reset => reset,
     3620                 clk=>clk,
     3621                 Control => Ctrl_buf,
    33483622       Data_In(1) => Port1_in(5),
    33493623       Data_In(2) => Port2_in(5),
     
    33843658      PORT MAP(
    33853659
    3386       Control => Ctrl,
     3660      reset => reset,
     3661                 clk=>clk,
     3662                 Control => Ctrl_buf,
    33873663       Data_In(1) => Port1_in(6),
    33883664       Data_In(2) => Port2_in(6),
     
    34233699      PORT MAP(
    34243700
    3425       Control => Ctrl,
     3701      reset => reset,
     3702                 clk=>clk,
     3703                 Control => Ctrl_buf,
    34263704       Data_In(1) => Port1_in(7),
    34273705       Data_In(2) => Port2_in(7),
     
    34623740      PORT MAP(
    34633741
    3464       Control => Ctrl,
     3742      reset => reset,
     3743                 clk=>clk,
     3744                 Control => Ctrl_buf,
    34653745       Data_In(1) => Port1_pulse_in,
    34663746       Data_In(2) => Port2_pulse_in,
     
    35083788      PORT MAP(
    35093789
    3510       Control => Ctrl,
     3790      reset => reset,
     3791                 clk=>clk,
     3792                 Control => Ctrl_buf,
    35113793       Data_In(1) => Port1_in(0),
    35123794       Data_In(2) => Port2_in(0),
     
    35493831      PORT MAP(
    35503832
    3551       Control => Ctrl,
     3833      reset => reset,
     3834                 clk=>clk,
     3835                 Control => Ctrl_buf,
    35523836       Data_In(1) => Port1_in(1),
    35533837       Data_In(2) => Port2_in(1),
     
    35903874      PORT MAP(
    35913875
    3592       Control => Ctrl,
     3876      reset => reset,
     3877                 clk=>clk,
     3878                 Control => Ctrl_buf,
    35933879       Data_In(1) => Port1_in(2),
    35943880       Data_In(2) => Port2_in(2),
     
    36313917      PORT MAP(
    36323918
    3633       Control => Ctrl,
     3919      reset => reset,
     3920                 clk=>clk,
     3921                 Control => Ctrl_buf,
    36343922       Data_In(1) => Port1_in(3),
    36353923       Data_In(2) => Port2_in(3),
     
    36723960      PORT MAP(
    36733961
    3674       Control => Ctrl,
     3962      reset => reset,
     3963                 clk=>clk,
     3964                 Control => Ctrl_buf,
    36753965       Data_In(1) => Port1_in(4),
    36763966       Data_In(2) => Port2_in(4),
     
    37134003      PORT MAP(
    37144004
    3715       Control => Ctrl,
     4005      reset => reset,
     4006                 clk=>clk,
     4007                 Control => Ctrl_buf,
    37164008       Data_In(1) => Port1_in(5),
    37174009       Data_In(2) => Port2_in(5),
     
    37544046      PORT MAP(
    37554047
    3756       Control => Ctrl,
     4048      reset => reset,
     4049                 clk=>clk,
     4050                 Control => Ctrl_buf,
    37574051       Data_In(1) => Port1_in(6),
    37584052       Data_In(2) => Port2_in(6),
     
    37954089      PORT MAP(
    37964090
    3797       Control => Ctrl,
     4091      reset => reset,
     4092                 clk=>clk,
     4093                 Control => Ctrl_buf,
    37984094       Data_In(1) => Port1_in(7),
    37994095       Data_In(2) => Port2_in(7),
     
    38364132      PORT MAP(
    38374133
    3838       Control => Ctrl,
     4134      reset => reset,
     4135                 clk=>clk,
     4136                 Control => Ctrl_buf,
    38394137       Data_In(1) => Port1_pulse_in,
    38404138       Data_In(2) => Port2_pulse_in,
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/Crossbit.vhd

    r22 r65  
    11----------------------------------------------------------------------------------
    22-- Company:
    3 -- Engineer: Kiegaing Emmanuel GEL EN 5
     3-- Engineer: Kiegaing Emmanuel /GAMOM Roland Christian
    44--
    55-- Create Date:    01:47 05/06/2011
     
    1414-- Dependencies:
    1515--
    16 -- Revision:
     16-- Revision: 11-01-2013
     17-- AJOUT DU CLK pour créer un pipeline dans l'architecture.
    1718-- Revision 0.01 - File Created
    1819-- Additional Comments:
     
    3435                          number_of_ports: positive := 4
    3536                        );
    36     Port ( Control : in  STD_LOGIC_VECTOR (number_of_ports*number_of_ports downto 1);
     37    Port ( clk,reset : in std_logic;
     38                                Control : in  STD_LOGIC_VECTOR (number_of_ports*number_of_ports downto 1);
    3739                          Data_In : in  STD_LOGIC_VECTOR (number_of_ports downto 1);
    3840           Data_out : out  STD_LOGIC_VECTOR (number_of_ports downto 1)
     41                         
    3942                          );
    4043end Crossbit;
    4144
    4245architecture Behavioral of Crossbit is
    43 
     46signal dout :STD_LOGIC_VECTOR (number_of_ports downto 1):=(others=>'0');
    4447begin
    4548-- element de commutation utilisee dans la matrice interconnecte
     
    4952crossbit2x2 : if number_of_ports = 2 generate
    5053
    51   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(3)));
    52   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(4)));
     54  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(3)));
     55  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(4)));
    5356end generate crossbit2x2;
    5457
     
    5962
    6063 
    61   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(4)) OR (Data_in(3) And Control(7)));
    62   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(5)) OR (Data_in(3) And Control(8)));
    63   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(6)) OR (Data_in(3) And Control(9)));
     64  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(4)) OR (Data_in(3) And Control(7)));
     65  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(5)) OR (Data_in(3) And Control(8)));
     66  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(6)) OR (Data_in(3) And Control(9)));
    6467end generate crossbit3x3;
    6568
     
    6972crossbit4x4 : if number_of_ports = 4 generate
    7073
    71   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(5)) OR (Data_in(3) And Control(9)) OR (Data_in(4) And Control(13)));
    72   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(6)) OR (Data_in(3) And Control(10)) OR (Data_in(4) And Control(14)));
    73   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(7)) OR (Data_in(3) And Control(11)) OR (Data_in(4) And Control(15)));
    74   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(8)) OR (Data_in(3) And Control(12)) OR (Data_in(4) And Control(16)));
     74  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(5)) OR (Data_in(3) And Control(9)) OR (Data_in(4) And Control(13)));
     75  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(6)) OR (Data_in(3) And Control(10)) OR (Data_in(4) And Control(14)));
     76  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(7)) OR (Data_in(3) And Control(11)) OR (Data_in(4) And Control(15)));
     77  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(8)) OR (Data_in(3) And Control(12)) OR (Data_in(4) And Control(16)));
    7578end generate crossbit4x4;
    7679
     
    8083crossbit5x5 : if number_of_ports = 5 generate
    8184
    82   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(6)) OR (Data_in(3) And Control(11)) OR (Data_in(4) And Control(16)) OR (Data_in(5) And Control(21)));
    83   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(7)) OR (Data_in(3) And Control(12)) OR (Data_in(4) And Control(17)) OR (Data_in(5) And Control(22)));
    84   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(8)) OR (Data_in(3) And Control(13)) OR (Data_in(4) And Control(18)) OR (Data_in(5) And Control(23)));
    85   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(9)) OR (Data_in(3) And Control(14)) OR (Data_in(4) And Control(19)) OR (Data_in(5) And Control(24)));
    86   Data_out(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(10)) OR (Data_in(3) And Control(15)) OR (Data_in(4) And Control(20)) OR (Data_in(5) And Control(25)));
     85  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(6)) OR (Data_in(3) And Control(11)) OR (Data_in(4) And Control(16)) OR (Data_in(5) And Control(21)));
     86  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(7)) OR (Data_in(3) And Control(12)) OR (Data_in(4) And Control(17)) OR (Data_in(5) And Control(22)));
     87  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(8)) OR (Data_in(3) And Control(13)) OR (Data_in(4) And Control(18)) OR (Data_in(5) And Control(23)));
     88  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(9)) OR (Data_in(3) And Control(14)) OR (Data_in(4) And Control(19)) OR (Data_in(5) And Control(24)));
     89  Dout(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(10)) OR (Data_in(3) And Control(15)) OR (Data_in(4) And Control(20)) OR (Data_in(5) And Control(25)));
    8790end generate crossbit5x5;
    8891
     
    9295crossbit6x6 : if number_of_ports = 6 generate
    9396
    94   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(7)) OR (Data_in(3) And Control(13)) OR (Data_in(4) And Control(19)) OR (Data_in(5) And Control(25)) OR (Data_in(6) And Control(31)));
    95   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(8)) OR (Data_in(3) And Control(14)) OR (Data_in(4) And Control(20)) OR (Data_in(5) And Control(26)) OR (Data_in(6) And Control(32)));
    96   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(9)) OR (Data_in(3) And Control(15)) OR (Data_in(4) And Control(21)) OR (Data_in(5) And Control(27)) OR (Data_in(6) And Control(33)));
    97   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(10)) OR (Data_in(3) And Control(16)) OR (Data_in(4) And Control(22)) OR (Data_in(5) And Control(28)) OR (Data_in(6) And Control(34)));
    98   Data_out(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(11)) OR (Data_in(3) And Control(17)) OR (Data_in(4) And Control(23)) OR (Data_in(5) And Control(29)) OR (Data_in(6) And Control(35)));
    99   Data_out(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(12)) OR (Data_in(3) And Control(18)) OR (Data_in(4) And Control(24)) OR (Data_in(5) And Control(30)) OR (Data_in(6) And Control(36)));
     97  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(7)) OR (Data_in(3) And Control(13)) OR (Data_in(4) And Control(19)) OR (Data_in(5) And Control(25)) OR (Data_in(6) And Control(31)));
     98  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(8)) OR (Data_in(3) And Control(14)) OR (Data_in(4) And Control(20)) OR (Data_in(5) And Control(26)) OR (Data_in(6) And Control(32)));
     99  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(9)) OR (Data_in(3) And Control(15)) OR (Data_in(4) And Control(21)) OR (Data_in(5) And Control(27)) OR (Data_in(6) And Control(33)));
     100  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(10)) OR (Data_in(3) And Control(16)) OR (Data_in(4) And Control(22)) OR (Data_in(5) And Control(28)) OR (Data_in(6) And Control(34)));
     101  Dout(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(11)) OR (Data_in(3) And Control(17)) OR (Data_in(4) And Control(23)) OR (Data_in(5) And Control(29)) OR (Data_in(6) And Control(35)));
     102  Dout(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(12)) OR (Data_in(3) And Control(18)) OR (Data_in(4) And Control(24)) OR (Data_in(5) And Control(30)) OR (Data_in(6) And Control(36)));
    100103end generate crossbit6x6;
    101104
     
    105108crossbit7x7 : if number_of_ports = 7 generate
    106109
    107   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(8)) OR (Data_in(3) And Control(15)) OR (Data_in(4) And Control(22)) OR (Data_in(5) And Control(29)) OR (Data_in(6) And Control(36)) OR (Data_in(7) And Control(43)));
    108   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(9)) OR (Data_in(3) And Control(16)) OR (Data_in(4) And Control(23)) OR (Data_in(5) And Control(30)) OR (Data_in(6) And Control(37)) OR (Data_in(7) And Control(44)));
    109   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(10)) OR (Data_in(3) And Control(17)) OR (Data_in(4) And Control(24)) OR (Data_in(5) And Control(31)) OR (Data_in(6) And Control(38)) OR (Data_in(7) And Control(45)));
    110   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(11)) OR (Data_in(3) And Control(18)) OR (Data_in(4) And Control(25)) OR (Data_in(5) And Control(32)) OR (Data_in(6) And Control(39)) OR (Data_in(7) And Control(46)));
    111   Data_out(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(12)) OR (Data_in(3) And Control(19)) OR (Data_in(4) And Control(26)) OR (Data_in(5) And Control(33)) OR (Data_in(6) And Control(40)) OR (Data_in(7) And Control(47)));
    112   Data_out(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(13)) OR (Data_in(3) And Control(20)) OR (Data_in(4) And Control(27)) OR (Data_in(5) And Control(34)) OR (Data_in(6) And Control(41)) OR (Data_in(7) And Control(48)));
    113   Data_out(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(21)) OR (Data_in(4) And Control(28)) OR (Data_in(5) And Control(35)) OR (Data_in(6) And Control(42)) OR (Data_in(7) And Control(49)));
     110  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(8)) OR (Data_in(3) And Control(15)) OR (Data_in(4) And Control(22)) OR (Data_in(5) And Control(29)) OR (Data_in(6) And Control(36)) OR (Data_in(7) And Control(43)));
     111  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(9)) OR (Data_in(3) And Control(16)) OR (Data_in(4) And Control(23)) OR (Data_in(5) And Control(30)) OR (Data_in(6) And Control(37)) OR (Data_in(7) And Control(44)));
     112  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(10)) OR (Data_in(3) And Control(17)) OR (Data_in(4) And Control(24)) OR (Data_in(5) And Control(31)) OR (Data_in(6) And Control(38)) OR (Data_in(7) And Control(45)));
     113  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(11)) OR (Data_in(3) And Control(18)) OR (Data_in(4) And Control(25)) OR (Data_in(5) And Control(32)) OR (Data_in(6) And Control(39)) OR (Data_in(7) And Control(46)));
     114  Dout(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(12)) OR (Data_in(3) And Control(19)) OR (Data_in(4) And Control(26)) OR (Data_in(5) And Control(33)) OR (Data_in(6) And Control(40)) OR (Data_in(7) And Control(47)));
     115  Dout(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(13)) OR (Data_in(3) And Control(20)) OR (Data_in(4) And Control(27)) OR (Data_in(5) And Control(34)) OR (Data_in(6) And Control(41)) OR (Data_in(7) And Control(48)));
     116  Dout(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(21)) OR (Data_in(4) And Control(28)) OR (Data_in(5) And Control(35)) OR (Data_in(6) And Control(42)) OR (Data_in(7) And Control(49)));
    114117end generate crossbit7x7;
    115118
     
    119122crossbit8x8 : if number_of_ports = 8 generate
    120123
    121   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(9)) OR (Data_in(3) And Control(17)) OR (Data_in(4) And Control(25)) OR (Data_in(5) And Control(33)) OR (Data_in(6) And Control(41)) OR (Data_in(7) And Control(49)) OR (Data_in(8) And Control(57)));
    122   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(10)) OR (Data_in(3) And Control(18)) OR (Data_in(4) And Control(26)) OR (Data_in(5) And Control(34)) OR (Data_in(6) And Control(42)) OR (Data_in(7) And Control(50)) OR (Data_in(8) And Control(58)));
    123   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(11)) OR (Data_in(3) And Control(19)) OR (Data_in(4) And Control(27)) OR (Data_in(5) And Control(35)) OR (Data_in(6) And Control(43)) OR (Data_in(7) And Control(51)) OR (Data_in(8) And Control(59)));
    124   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(12)) OR (Data_in(3) And Control(20)) OR (Data_in(4) And Control(28)) OR (Data_in(5) And Control(36)) OR (Data_in(6) And Control(44)) OR (Data_in(7) And Control(52)) OR (Data_in(8) And Control(60)));
    125   Data_out(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(13)) OR (Data_in(3) And Control(21)) OR (Data_in(4) And Control(29)) OR (Data_in(5) And Control(37)) OR (Data_in(6) And Control(45)) OR (Data_in(7) And Control(53)) OR (Data_in(8) And Control(61)));
    126   Data_out(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(22)) OR (Data_in(4) And Control(30)) OR (Data_in(5) And Control(38)) OR (Data_in(6) And Control(46)) OR (Data_in(7) And Control(54)) OR (Data_in(8) And Control(62)));
    127   Data_out(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(23)) OR (Data_in(4) And Control(31)) OR (Data_in(5) And Control(39)) OR (Data_in(6) And Control(47)) OR (Data_in(7) And Control(55)) OR (Data_in(8) And Control(63)));
    128   Data_out(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(24)) OR (Data_in(4) And Control(32)) OR (Data_in(5) And Control(40)) OR (Data_in(6) And Control(48)) OR (Data_in(7) And Control(56)) OR (Data_in(8) And Control(64)));
     124  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(9)) OR (Data_in(3) And Control(17)) OR (Data_in(4) And Control(25)) OR (Data_in(5) And Control(33)) OR (Data_in(6) And Control(41)) OR (Data_in(7) And Control(49)) OR (Data_in(8) And Control(57)));
     125  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(10)) OR (Data_in(3) And Control(18)) OR (Data_in(4) And Control(26)) OR (Data_in(5) And Control(34)) OR (Data_in(6) And Control(42)) OR (Data_in(7) And Control(50)) OR (Data_in(8) And Control(58)));
     126  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(11)) OR (Data_in(3) And Control(19)) OR (Data_in(4) And Control(27)) OR (Data_in(5) And Control(35)) OR (Data_in(6) And Control(43)) OR (Data_in(7) And Control(51)) OR (Data_in(8) And Control(59)));
     127  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(12)) OR (Data_in(3) And Control(20)) OR (Data_in(4) And Control(28)) OR (Data_in(5) And Control(36)) OR (Data_in(6) And Control(44)) OR (Data_in(7) And Control(52)) OR (Data_in(8) And Control(60)));
     128  Dout(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(13)) OR (Data_in(3) And Control(21)) OR (Data_in(4) And Control(29)) OR (Data_in(5) And Control(37)) OR (Data_in(6) And Control(45)) OR (Data_in(7) And Control(53)) OR (Data_in(8) And Control(61)));
     129  Dout(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(22)) OR (Data_in(4) And Control(30)) OR (Data_in(5) And Control(38)) OR (Data_in(6) And Control(46)) OR (Data_in(7) And Control(54)) OR (Data_in(8) And Control(62)));
     130  Dout(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(23)) OR (Data_in(4) And Control(31)) OR (Data_in(5) And Control(39)) OR (Data_in(6) And Control(47)) OR (Data_in(7) And Control(55)) OR (Data_in(8) And Control(63)));
     131  Dout(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(24)) OR (Data_in(4) And Control(32)) OR (Data_in(5) And Control(40)) OR (Data_in(6) And Control(48)) OR (Data_in(7) And Control(56)) OR (Data_in(8) And Control(64)));
    129132end generate crossbit8x8;
    130133
     
    134137crossbit9x9 : if number_of_ports = 9 generate
    135138
    136   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(10)) OR (Data_in(3) And Control(19)) OR (Data_in(4) And Control(28)) OR (Data_in(5) And Control(37)) OR (Data_in(6) And Control(46)) OR (Data_in(7) And Control(55)) OR (Data_in(8) And Control(64)) OR (Data_in(9) And Control(73)));
    137   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(11)) OR (Data_in(3) And Control(20)) OR (Data_in(4) And Control(29)) OR (Data_in(5) And Control(38)) OR (Data_in(6) And Control(47)) OR (Data_in(7) And Control(56)) OR (Data_in(8) And Control(65)) OR (Data_in(9) And Control(74)));
    138   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(12)) OR (Data_in(3) And Control(21)) OR (Data_in(4) And Control(30)) OR (Data_in(5) And Control(39)) OR (Data_in(6) And Control(48)) OR (Data_in(7) And Control(57)) OR (Data_in(8) And Control(66)) OR (Data_in(9) And Control(75)));
    139   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(13)) OR (Data_in(3) And Control(22)) OR (Data_in(4) And Control(31)) OR (Data_in(5) And Control(40)) OR (Data_in(6) And Control(49)) OR (Data_in(7) And Control(58)) OR (Data_in(8) And Control(67)) OR (Data_in(9) And Control(76)));
    140   Data_out(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(23)) OR (Data_in(4) And Control(32)) OR (Data_in(5) And Control(41)) OR (Data_in(6) And Control(50)) OR (Data_in(7) And Control(59)) OR (Data_in(8) And Control(68)) OR (Data_in(9) And Control(77)));
    141   Data_out(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(24)) OR (Data_in(4) And Control(33)) OR (Data_in(5) And Control(42)) OR (Data_in(6) And Control(51)) OR (Data_in(7) And Control(60)) OR (Data_in(8) And Control(69)) OR (Data_in(9) And Control(78)));
    142   Data_out(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(25)) OR (Data_in(4) And Control(34)) OR (Data_in(5) And Control(43)) OR (Data_in(6) And Control(52)) OR (Data_in(7) And Control(61)) OR (Data_in(8) And Control(70)) OR (Data_in(9) And Control(79)));
    143   Data_out(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(26)) OR (Data_in(4) And Control(35)) OR (Data_in(5) And Control(44)) OR (Data_in(6) And Control(53)) OR (Data_in(7) And Control(62)) OR (Data_in(8) And Control(71)) OR (Data_in(9) And Control(80)));
    144   Data_out(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(27)) OR (Data_in(4) And Control(36)) OR (Data_in(5) And Control(45)) OR (Data_in(6) And Control(54)) OR (Data_in(7) And Control(63)) OR (Data_in(8) And Control(72)) OR (Data_in(9) And Control(81)));
     139  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(10)) OR (Data_in(3) And Control(19)) OR (Data_in(4) And Control(28)) OR (Data_in(5) And Control(37)) OR (Data_in(6) And Control(46)) OR (Data_in(7) And Control(55)) OR (Data_in(8) And Control(64)) OR (Data_in(9) And Control(73)));
     140  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(11)) OR (Data_in(3) And Control(20)) OR (Data_in(4) And Control(29)) OR (Data_in(5) And Control(38)) OR (Data_in(6) And Control(47)) OR (Data_in(7) And Control(56)) OR (Data_in(8) And Control(65)) OR (Data_in(9) And Control(74)));
     141  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(12)) OR (Data_in(3) And Control(21)) OR (Data_in(4) And Control(30)) OR (Data_in(5) And Control(39)) OR (Data_in(6) And Control(48)) OR (Data_in(7) And Control(57)) OR (Data_in(8) And Control(66)) OR (Data_in(9) And Control(75)));
     142  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(13)) OR (Data_in(3) And Control(22)) OR (Data_in(4) And Control(31)) OR (Data_in(5) And Control(40)) OR (Data_in(6) And Control(49)) OR (Data_in(7) And Control(58)) OR (Data_in(8) And Control(67)) OR (Data_in(9) And Control(76)));
     143  Dout(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(23)) OR (Data_in(4) And Control(32)) OR (Data_in(5) And Control(41)) OR (Data_in(6) And Control(50)) OR (Data_in(7) And Control(59)) OR (Data_in(8) And Control(68)) OR (Data_in(9) And Control(77)));
     144  Dout(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(24)) OR (Data_in(4) And Control(33)) OR (Data_in(5) And Control(42)) OR (Data_in(6) And Control(51)) OR (Data_in(7) And Control(60)) OR (Data_in(8) And Control(69)) OR (Data_in(9) And Control(78)));
     145  Dout(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(25)) OR (Data_in(4) And Control(34)) OR (Data_in(5) And Control(43)) OR (Data_in(6) And Control(52)) OR (Data_in(7) And Control(61)) OR (Data_in(8) And Control(70)) OR (Data_in(9) And Control(79)));
     146  Dout(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(26)) OR (Data_in(4) And Control(35)) OR (Data_in(5) And Control(44)) OR (Data_in(6) And Control(53)) OR (Data_in(7) And Control(62)) OR (Data_in(8) And Control(71)) OR (Data_in(9) And Control(80)));
     147  Dout(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(27)) OR (Data_in(4) And Control(36)) OR (Data_in(5) And Control(45)) OR (Data_in(6) And Control(54)) OR (Data_in(7) And Control(63)) OR (Data_in(8) And Control(72)) OR (Data_in(9) And Control(81)));
    145148end generate crossbit9x9;
    146149
     
    150153crossbit10x10 : if number_of_ports = 10 generate
    151154
    152   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(11)) OR (Data_in(3) And Control(21)) OR (Data_in(4) And Control(31)) OR (Data_in(5) And Control(41)) OR (Data_in(6) And Control(51)) OR (Data_in(7) And Control(61)) OR (Data_in(8) And Control(71)) OR (Data_in(9) And Control(81)) OR (Data_in(10) And Control(91)));
    153   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(12)) OR (Data_in(3) And Control(22)) OR (Data_in(4) And Control(32)) OR (Data_in(5) And Control(42)) OR (Data_in(6) And Control(52)) OR (Data_in(7) And Control(62)) OR (Data_in(8) And Control(72)) OR (Data_in(9) And Control(82)) OR (Data_in(10) And Control(92)));
    154   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(13)) OR (Data_in(3) And Control(23)) OR (Data_in(4) And Control(33)) OR (Data_in(5) And Control(43)) OR (Data_in(6) And Control(53)) OR (Data_in(7) And Control(63)) OR (Data_in(8) And Control(73)) OR (Data_in(9) And Control(83)) OR (Data_in(10) And Control(93)));
    155   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(24)) OR (Data_in(4) And Control(34)) OR (Data_in(5) And Control(44)) OR (Data_in(6) And Control(54)) OR (Data_in(7) And Control(64)) OR (Data_in(8) And Control(74)) OR (Data_in(9) And Control(84)) OR (Data_in(10) And Control(94)));
    156   Data_out(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(25)) OR (Data_in(4) And Control(35)) OR (Data_in(5) And Control(45)) OR (Data_in(6) And Control(55)) OR (Data_in(7) And Control(65)) OR (Data_in(8) And Control(75)) OR (Data_in(9) And Control(85)) OR (Data_in(10) And Control(95)));
    157   Data_out(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(26)) OR (Data_in(4) And Control(36)) OR (Data_in(5) And Control(46)) OR (Data_in(6) And Control(56)) OR (Data_in(7) And Control(66)) OR (Data_in(8) And Control(76)) OR (Data_in(9) And Control(86)) OR (Data_in(10) And Control(96)));
    158   Data_out(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(27)) OR (Data_in(4) And Control(37)) OR (Data_in(5) And Control(47)) OR (Data_in(6) And Control(57)) OR (Data_in(7) And Control(67)) OR (Data_in(8) And Control(77)) OR (Data_in(9) And Control(87)) OR (Data_in(10) And Control(97)));
    159   Data_out(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(28)) OR (Data_in(4) And Control(38)) OR (Data_in(5) And Control(48)) OR (Data_in(6) And Control(58)) OR (Data_in(7) And Control(68)) OR (Data_in(8) And Control(78)) OR (Data_in(9) And Control(88)) OR (Data_in(10) And Control(98)));
    160   Data_out(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(29)) OR (Data_in(4) And Control(39)) OR (Data_in(5) And Control(49)) OR (Data_in(6) And Control(59)) OR (Data_in(7) And Control(69)) OR (Data_in(8) And Control(79)) OR (Data_in(9) And Control(89)) OR (Data_in(10) And Control(99)));
    161   Data_out(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(30)) OR (Data_in(4) And Control(40)) OR (Data_in(5) And Control(50)) OR (Data_in(6) And Control(60)) OR (Data_in(7) And Control(70)) OR (Data_in(8) And Control(80)) OR (Data_in(9) And Control(90)) OR (Data_in(10) And Control(100)));
     155  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(11)) OR (Data_in(3) And Control(21)) OR (Data_in(4) And Control(31)) OR (Data_in(5) And Control(41)) OR (Data_in(6) And Control(51)) OR (Data_in(7) And Control(61)) OR (Data_in(8) And Control(71)) OR (Data_in(9) And Control(81)) OR (Data_in(10) And Control(91)));
     156  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(12)) OR (Data_in(3) And Control(22)) OR (Data_in(4) And Control(32)) OR (Data_in(5) And Control(42)) OR (Data_in(6) And Control(52)) OR (Data_in(7) And Control(62)) OR (Data_in(8) And Control(72)) OR (Data_in(9) And Control(82)) OR (Data_in(10) And Control(92)));
     157  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(13)) OR (Data_in(3) And Control(23)) OR (Data_in(4) And Control(33)) OR (Data_in(5) And Control(43)) OR (Data_in(6) And Control(53)) OR (Data_in(7) And Control(63)) OR (Data_in(8) And Control(73)) OR (Data_in(9) And Control(83)) OR (Data_in(10) And Control(93)));
     158  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(24)) OR (Data_in(4) And Control(34)) OR (Data_in(5) And Control(44)) OR (Data_in(6) And Control(54)) OR (Data_in(7) And Control(64)) OR (Data_in(8) And Control(74)) OR (Data_in(9) And Control(84)) OR (Data_in(10) And Control(94)));
     159  Dout(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(25)) OR (Data_in(4) And Control(35)) OR (Data_in(5) And Control(45)) OR (Data_in(6) And Control(55)) OR (Data_in(7) And Control(65)) OR (Data_in(8) And Control(75)) OR (Data_in(9) And Control(85)) OR (Data_in(10) And Control(95)));
     160  Dout(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(26)) OR (Data_in(4) And Control(36)) OR (Data_in(5) And Control(46)) OR (Data_in(6) And Control(56)) OR (Data_in(7) And Control(66)) OR (Data_in(8) And Control(76)) OR (Data_in(9) And Control(86)) OR (Data_in(10) And Control(96)));
     161  Dout(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(27)) OR (Data_in(4) And Control(37)) OR (Data_in(5) And Control(47)) OR (Data_in(6) And Control(57)) OR (Data_in(7) And Control(67)) OR (Data_in(8) And Control(77)) OR (Data_in(9) And Control(87)) OR (Data_in(10) And Control(97)));
     162  Dout(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(28)) OR (Data_in(4) And Control(38)) OR (Data_in(5) And Control(48)) OR (Data_in(6) And Control(58)) OR (Data_in(7) And Control(68)) OR (Data_in(8) And Control(78)) OR (Data_in(9) And Control(88)) OR (Data_in(10) And Control(98)));
     163  Dout(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(29)) OR (Data_in(4) And Control(39)) OR (Data_in(5) And Control(49)) OR (Data_in(6) And Control(59)) OR (Data_in(7) And Control(69)) OR (Data_in(8) And Control(79)) OR (Data_in(9) And Control(89)) OR (Data_in(10) And Control(99)));
     164  Dout(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(30)) OR (Data_in(4) And Control(40)) OR (Data_in(5) And Control(50)) OR (Data_in(6) And Control(60)) OR (Data_in(7) And Control(70)) OR (Data_in(8) And Control(80)) OR (Data_in(9) And Control(90)) OR (Data_in(10) And Control(100)));
    162165end generate crossbit10x10;
    163166
     
    167170crossbit11x11 : if number_of_ports = 11 generate
    168171
    169   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(12)) OR (Data_in(3) And Control(23)) OR (Data_in(4) And Control(34)) OR (Data_in(5) And Control(45)) OR (Data_in(6) And Control(56)) OR (Data_in(7) And Control(67)) OR (Data_in(8) And Control(78)) OR (Data_in(9) And Control(89)) OR (Data_in(10) And Control(100)) OR (Data_in(11) And Control(111)));
    170   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(13)) OR (Data_in(3) And Control(24)) OR (Data_in(4) And Control(35)) OR (Data_in(5) And Control(46)) OR (Data_in(6) And Control(57)) OR (Data_in(7) And Control(68)) OR (Data_in(8) And Control(79)) OR (Data_in(9) And Control(90)) OR (Data_in(10) And Control(101)) OR (Data_in(11) And Control(112)));
    171   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(25)) OR (Data_in(4) And Control(36)) OR (Data_in(5) And Control(47)) OR (Data_in(6) And Control(58)) OR (Data_in(7) And Control(69)) OR (Data_in(8) And Control(80)) OR (Data_in(9) And Control(91)) OR (Data_in(10) And Control(102)) OR (Data_in(11) And Control(113)));
    172   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(26)) OR (Data_in(4) And Control(37)) OR (Data_in(5) And Control(48)) OR (Data_in(6) And Control(59)) OR (Data_in(7) And Control(70)) OR (Data_in(8) And Control(81)) OR (Data_in(9) And Control(92)) OR (Data_in(10) And Control(103)) OR (Data_in(11) And Control(114)));
    173   Data_out(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(27)) OR (Data_in(4) And Control(38)) OR (Data_in(5) And Control(49)) OR (Data_in(6) And Control(60)) OR (Data_in(7) And Control(71)) OR (Data_in(8) And Control(82)) OR (Data_in(9) And Control(93)) OR (Data_in(10) And Control(104)) OR (Data_in(11) And Control(115)));
    174   Data_out(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(28)) OR (Data_in(4) And Control(39)) OR (Data_in(5) And Control(50)) OR (Data_in(6) And Control(61)) OR (Data_in(7) And Control(72)) OR (Data_in(8) And Control(83)) OR (Data_in(9) And Control(94)) OR (Data_in(10) And Control(105)) OR (Data_in(11) And Control(116)));
    175   Data_out(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(29)) OR (Data_in(4) And Control(40)) OR (Data_in(5) And Control(51)) OR (Data_in(6) And Control(62)) OR (Data_in(7) And Control(73)) OR (Data_in(8) And Control(84)) OR (Data_in(9) And Control(95)) OR (Data_in(10) And Control(106)) OR (Data_in(11) And Control(117)));
    176   Data_out(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(30)) OR (Data_in(4) And Control(41)) OR (Data_in(5) And Control(52)) OR (Data_in(6) And Control(63)) OR (Data_in(7) And Control(74)) OR (Data_in(8) And Control(85)) OR (Data_in(9) And Control(96)) OR (Data_in(10) And Control(107)) OR (Data_in(11) And Control(118)));
    177   Data_out(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(31)) OR (Data_in(4) And Control(42)) OR (Data_in(5) And Control(53)) OR (Data_in(6) And Control(64)) OR (Data_in(7) And Control(75)) OR (Data_in(8) And Control(86)) OR (Data_in(9) And Control(97)) OR (Data_in(10) And Control(108)) OR (Data_in(11) And Control(119)));
    178   Data_out(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(21)) OR (Data_in(3) And Control(32)) OR (Data_in(4) And Control(43)) OR (Data_in(5) And Control(54)) OR (Data_in(6) And Control(65)) OR (Data_in(7) And Control(76)) OR (Data_in(8) And Control(87)) OR (Data_in(9) And Control(98)) OR (Data_in(10) And Control(109)) OR (Data_in(11) And Control(120)));
    179   Data_out(11) <= ((Data_in(1) And Control(11)) OR (Data_in(2) And Control(22)) OR (Data_in(3) And Control(33)) OR (Data_in(4) And Control(44)) OR (Data_in(5) And Control(55)) OR (Data_in(6) And Control(66)) OR (Data_in(7) And Control(77)) OR (Data_in(8) And Control(88)) OR (Data_in(9) And Control(99)) OR (Data_in(10) And Control(110)) OR (Data_in(11) And Control(121)));
     172  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(12)) OR (Data_in(3) And Control(23)) OR (Data_in(4) And Control(34)) OR (Data_in(5) And Control(45)) OR (Data_in(6) And Control(56)) OR (Data_in(7) And Control(67)) OR (Data_in(8) And Control(78)) OR (Data_in(9) And Control(89)) OR (Data_in(10) And Control(100)) OR (Data_in(11) And Control(111)));
     173  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(13)) OR (Data_in(3) And Control(24)) OR (Data_in(4) And Control(35)) OR (Data_in(5) And Control(46)) OR (Data_in(6) And Control(57)) OR (Data_in(7) And Control(68)) OR (Data_in(8) And Control(79)) OR (Data_in(9) And Control(90)) OR (Data_in(10) And Control(101)) OR (Data_in(11) And Control(112)));
     174  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(25)) OR (Data_in(4) And Control(36)) OR (Data_in(5) And Control(47)) OR (Data_in(6) And Control(58)) OR (Data_in(7) And Control(69)) OR (Data_in(8) And Control(80)) OR (Data_in(9) And Control(91)) OR (Data_in(10) And Control(102)) OR (Data_in(11) And Control(113)));
     175  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(26)) OR (Data_in(4) And Control(37)) OR (Data_in(5) And Control(48)) OR (Data_in(6) And Control(59)) OR (Data_in(7) And Control(70)) OR (Data_in(8) And Control(81)) OR (Data_in(9) And Control(92)) OR (Data_in(10) And Control(103)) OR (Data_in(11) And Control(114)));
     176  Dout(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(27)) OR (Data_in(4) And Control(38)) OR (Data_in(5) And Control(49)) OR (Data_in(6) And Control(60)) OR (Data_in(7) And Control(71)) OR (Data_in(8) And Control(82)) OR (Data_in(9) And Control(93)) OR (Data_in(10) And Control(104)) OR (Data_in(11) And Control(115)));
     177  Dout(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(28)) OR (Data_in(4) And Control(39)) OR (Data_in(5) And Control(50)) OR (Data_in(6) And Control(61)) OR (Data_in(7) And Control(72)) OR (Data_in(8) And Control(83)) OR (Data_in(9) And Control(94)) OR (Data_in(10) And Control(105)) OR (Data_in(11) And Control(116)));
     178  Dout(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(29)) OR (Data_in(4) And Control(40)) OR (Data_in(5) And Control(51)) OR (Data_in(6) And Control(62)) OR (Data_in(7) And Control(73)) OR (Data_in(8) And Control(84)) OR (Data_in(9) And Control(95)) OR (Data_in(10) And Control(106)) OR (Data_in(11) And Control(117)));
     179  Dout(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(30)) OR (Data_in(4) And Control(41)) OR (Data_in(5) And Control(52)) OR (Data_in(6) And Control(63)) OR (Data_in(7) And Control(74)) OR (Data_in(8) And Control(85)) OR (Data_in(9) And Control(96)) OR (Data_in(10) And Control(107)) OR (Data_in(11) And Control(118)));
     180  Dout(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(31)) OR (Data_in(4) And Control(42)) OR (Data_in(5) And Control(53)) OR (Data_in(6) And Control(64)) OR (Data_in(7) And Control(75)) OR (Data_in(8) And Control(86)) OR (Data_in(9) And Control(97)) OR (Data_in(10) And Control(108)) OR (Data_in(11) And Control(119)));
     181  Dout(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(21)) OR (Data_in(3) And Control(32)) OR (Data_in(4) And Control(43)) OR (Data_in(5) And Control(54)) OR (Data_in(6) And Control(65)) OR (Data_in(7) And Control(76)) OR (Data_in(8) And Control(87)) OR (Data_in(9) And Control(98)) OR (Data_in(10) And Control(109)) OR (Data_in(11) And Control(120)));
     182  Dout(11) <= ((Data_in(1) And Control(11)) OR (Data_in(2) And Control(22)) OR (Data_in(3) And Control(33)) OR (Data_in(4) And Control(44)) OR (Data_in(5) And Control(55)) OR (Data_in(6) And Control(66)) OR (Data_in(7) And Control(77)) OR (Data_in(8) And Control(88)) OR (Data_in(9) And Control(99)) OR (Data_in(10) And Control(110)) OR (Data_in(11) And Control(121)));
    180183end generate crossbit11x11;
    181184
     
    185188crossbit12x12 : if number_of_ports = 12 generate
    186189
    187   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(13)) OR (Data_in(3) And Control(25)) OR (Data_in(4) And Control(37)) OR (Data_in(5) And Control(49)) OR (Data_in(6) And Control(61)) OR (Data_in(7) And Control(73)) OR (Data_in(8) And Control(85)) OR (Data_in(9) And Control(97)) OR (Data_in(10) And Control(109)) OR (Data_in(11) And Control(121)) OR (Data_in(12) And Control(133)));
    188   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(26)) OR (Data_in(4) And Control(38)) OR (Data_in(5) And Control(50)) OR (Data_in(6) And Control(62)) OR (Data_in(7) And Control(74)) OR (Data_in(8) And Control(86)) OR (Data_in(9) And Control(98)) OR (Data_in(10) And Control(110)) OR (Data_in(11) And Control(122)) OR (Data_in(12) And Control(134)));
    189   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(27)) OR (Data_in(4) And Control(39)) OR (Data_in(5) And Control(51)) OR (Data_in(6) And Control(63)) OR (Data_in(7) And Control(75)) OR (Data_in(8) And Control(87)) OR (Data_in(9) And Control(99)) OR (Data_in(10) And Control(111)) OR (Data_in(11) And Control(123)) OR (Data_in(12) And Control(135)));
    190   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(28)) OR (Data_in(4) And Control(40)) OR (Data_in(5) And Control(52)) OR (Data_in(6) And Control(64)) OR (Data_in(7) And Control(76)) OR (Data_in(8) And Control(88)) OR (Data_in(9) And Control(100)) OR (Data_in(10) And Control(112)) OR (Data_in(11) And Control(124)) OR (Data_in(12) And Control(136)));
    191   Data_out(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(29)) OR (Data_in(4) And Control(41)) OR (Data_in(5) And Control(53)) OR (Data_in(6) And Control(65)) OR (Data_in(7) And Control(77)) OR (Data_in(8) And Control(89)) OR (Data_in(9) And Control(101)) OR (Data_in(10) And Control(113)) OR (Data_in(11) And Control(125)) OR (Data_in(12) And Control(137)));
    192   Data_out(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(30)) OR (Data_in(4) And Control(42)) OR (Data_in(5) And Control(54)) OR (Data_in(6) And Control(66)) OR (Data_in(7) And Control(78)) OR (Data_in(8) And Control(90)) OR (Data_in(9) And Control(102)) OR (Data_in(10) And Control(114)) OR (Data_in(11) And Control(126)) OR (Data_in(12) And Control(138)));
    193   Data_out(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(31)) OR (Data_in(4) And Control(43)) OR (Data_in(5) And Control(55)) OR (Data_in(6) And Control(67)) OR (Data_in(7) And Control(79)) OR (Data_in(8) And Control(91)) OR (Data_in(9) And Control(103)) OR (Data_in(10) And Control(115)) OR (Data_in(11) And Control(127)) OR (Data_in(12) And Control(139)));
    194   Data_out(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(32)) OR (Data_in(4) And Control(44)) OR (Data_in(5) And Control(56)) OR (Data_in(6) And Control(68)) OR (Data_in(7) And Control(80)) OR (Data_in(8) And Control(92)) OR (Data_in(9) And Control(104)) OR (Data_in(10) And Control(116)) OR (Data_in(11) And Control(128)) OR (Data_in(12) And Control(140)));
    195   Data_out(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(21)) OR (Data_in(3) And Control(33)) OR (Data_in(4) And Control(45)) OR (Data_in(5) And Control(57)) OR (Data_in(6) And Control(69)) OR (Data_in(7) And Control(81)) OR (Data_in(8) And Control(93)) OR (Data_in(9) And Control(105)) OR (Data_in(10) And Control(117)) OR (Data_in(11) And Control(129)) OR (Data_in(12) And Control(141)));
    196   Data_out(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(22)) OR (Data_in(3) And Control(34)) OR (Data_in(4) And Control(46)) OR (Data_in(5) And Control(58)) OR (Data_in(6) And Control(70)) OR (Data_in(7) And Control(82)) OR (Data_in(8) And Control(94)) OR (Data_in(9) And Control(106)) OR (Data_in(10) And Control(118)) OR (Data_in(11) And Control(130)) OR (Data_in(12) And Control(142)));
    197   Data_out(11) <= ((Data_in(1) And Control(11)) OR (Data_in(2) And Control(23)) OR (Data_in(3) And Control(35)) OR (Data_in(4) And Control(47)) OR (Data_in(5) And Control(59)) OR (Data_in(6) And Control(71)) OR (Data_in(7) And Control(83)) OR (Data_in(8) And Control(95)) OR (Data_in(9) And Control(107)) OR (Data_in(10) And Control(119)) OR (Data_in(11) And Control(131)) OR (Data_in(12) And Control(143)));
    198   Data_out(12) <= ((Data_in(1) And Control(12)) OR (Data_in(2) And Control(24)) OR (Data_in(3) And Control(36)) OR (Data_in(4) And Control(48)) OR (Data_in(5) And Control(60)) OR (Data_in(6) And Control(72)) OR (Data_in(7) And Control(84)) OR (Data_in(8) And Control(96)) OR (Data_in(9) And Control(108)) OR (Data_in(10) And Control(120)) OR (Data_in(11) And Control(132)) OR (Data_in(12) And Control(144)));
     190  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(13)) OR (Data_in(3) And Control(25)) OR (Data_in(4) And Control(37)) OR (Data_in(5) And Control(49)) OR (Data_in(6) And Control(61)) OR (Data_in(7) And Control(73)) OR (Data_in(8) And Control(85)) OR (Data_in(9) And Control(97)) OR (Data_in(10) And Control(109)) OR (Data_in(11) And Control(121)) OR (Data_in(12) And Control(133)));
     191  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(26)) OR (Data_in(4) And Control(38)) OR (Data_in(5) And Control(50)) OR (Data_in(6) And Control(62)) OR (Data_in(7) And Control(74)) OR (Data_in(8) And Control(86)) OR (Data_in(9) And Control(98)) OR (Data_in(10) And Control(110)) OR (Data_in(11) And Control(122)) OR (Data_in(12) And Control(134)));
     192  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(27)) OR (Data_in(4) And Control(39)) OR (Data_in(5) And Control(51)) OR (Data_in(6) And Control(63)) OR (Data_in(7) And Control(75)) OR (Data_in(8) And Control(87)) OR (Data_in(9) And Control(99)) OR (Data_in(10) And Control(111)) OR (Data_in(11) And Control(123)) OR (Data_in(12) And Control(135)));
     193  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(28)) OR (Data_in(4) And Control(40)) OR (Data_in(5) And Control(52)) OR (Data_in(6) And Control(64)) OR (Data_in(7) And Control(76)) OR (Data_in(8) And Control(88)) OR (Data_in(9) And Control(100)) OR (Data_in(10) And Control(112)) OR (Data_in(11) And Control(124)) OR (Data_in(12) And Control(136)));
     194  Dout(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(29)) OR (Data_in(4) And Control(41)) OR (Data_in(5) And Control(53)) OR (Data_in(6) And Control(65)) OR (Data_in(7) And Control(77)) OR (Data_in(8) And Control(89)) OR (Data_in(9) And Control(101)) OR (Data_in(10) And Control(113)) OR (Data_in(11) And Control(125)) OR (Data_in(12) And Control(137)));
     195  Dout(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(30)) OR (Data_in(4) And Control(42)) OR (Data_in(5) And Control(54)) OR (Data_in(6) And Control(66)) OR (Data_in(7) And Control(78)) OR (Data_in(8) And Control(90)) OR (Data_in(9) And Control(102)) OR (Data_in(10) And Control(114)) OR (Data_in(11) And Control(126)) OR (Data_in(12) And Control(138)));
     196  Dout(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(31)) OR (Data_in(4) And Control(43)) OR (Data_in(5) And Control(55)) OR (Data_in(6) And Control(67)) OR (Data_in(7) And Control(79)) OR (Data_in(8) And Control(91)) OR (Data_in(9) And Control(103)) OR (Data_in(10) And Control(115)) OR (Data_in(11) And Control(127)) OR (Data_in(12) And Control(139)));
     197  Dout(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(32)) OR (Data_in(4) And Control(44)) OR (Data_in(5) And Control(56)) OR (Data_in(6) And Control(68)) OR (Data_in(7) And Control(80)) OR (Data_in(8) And Control(92)) OR (Data_in(9) And Control(104)) OR (Data_in(10) And Control(116)) OR (Data_in(11) And Control(128)) OR (Data_in(12) And Control(140)));
     198  Dout(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(21)) OR (Data_in(3) And Control(33)) OR (Data_in(4) And Control(45)) OR (Data_in(5) And Control(57)) OR (Data_in(6) And Control(69)) OR (Data_in(7) And Control(81)) OR (Data_in(8) And Control(93)) OR (Data_in(9) And Control(105)) OR (Data_in(10) And Control(117)) OR (Data_in(11) And Control(129)) OR (Data_in(12) And Control(141)));
     199  Dout(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(22)) OR (Data_in(3) And Control(34)) OR (Data_in(4) And Control(46)) OR (Data_in(5) And Control(58)) OR (Data_in(6) And Control(70)) OR (Data_in(7) And Control(82)) OR (Data_in(8) And Control(94)) OR (Data_in(9) And Control(106)) OR (Data_in(10) And Control(118)) OR (Data_in(11) And Control(130)) OR (Data_in(12) And Control(142)));
     200  Dout(11) <= ((Data_in(1) And Control(11)) OR (Data_in(2) And Control(23)) OR (Data_in(3) And Control(35)) OR (Data_in(4) And Control(47)) OR (Data_in(5) And Control(59)) OR (Data_in(6) And Control(71)) OR (Data_in(7) And Control(83)) OR (Data_in(8) And Control(95)) OR (Data_in(9) And Control(107)) OR (Data_in(10) And Control(119)) OR (Data_in(11) And Control(131)) OR (Data_in(12) And Control(143)));
     201  Dout(12) <= ((Data_in(1) And Control(12)) OR (Data_in(2) And Control(24)) OR (Data_in(3) And Control(36)) OR (Data_in(4) And Control(48)) OR (Data_in(5) And Control(60)) OR (Data_in(6) And Control(72)) OR (Data_in(7) And Control(84)) OR (Data_in(8) And Control(96)) OR (Data_in(9) And Control(108)) OR (Data_in(10) And Control(120)) OR (Data_in(11) And Control(132)) OR (Data_in(12) And Control(144)));
    199202end generate crossbit12x12;
    200203
     
    204207crossbit13x13 : if number_of_ports = 13 generate
    205208
    206   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(27)) OR (Data_in(4) And Control(40)) OR (Data_in(5) And Control(53)) OR (Data_in(6) And Control(66)) OR (Data_in(7) And Control(79)) OR (Data_in(8) And Control(92)) OR (Data_in(9) And Control(105)) OR (Data_in(10) And Control(118)) OR (Data_in(11) And Control(131)) OR (Data_in(12) And Control(144)) OR (Data_in(13) And Control(157)));
    207   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(28)) OR (Data_in(4) And Control(41)) OR (Data_in(5) And Control(54)) OR (Data_in(6) And Control(67)) OR (Data_in(7) And Control(80)) OR (Data_in(8) And Control(93)) OR (Data_in(9) And Control(106)) OR (Data_in(10) And Control(119)) OR (Data_in(11) And Control(132)) OR (Data_in(12) And Control(145)) OR (Data_in(13) And Control(158)));
    208   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(29)) OR (Data_in(4) And Control(42)) OR (Data_in(5) And Control(55)) OR (Data_in(6) And Control(68)) OR (Data_in(7) And Control(81)) OR (Data_in(8) And Control(94)) OR (Data_in(9) And Control(107)) OR (Data_in(10) And Control(120)) OR (Data_in(11) And Control(133)) OR (Data_in(12) And Control(146)) OR (Data_in(13) And Control(159)));
    209   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(30)) OR (Data_in(4) And Control(43)) OR (Data_in(5) And Control(56)) OR (Data_in(6) And Control(69)) OR (Data_in(7) And Control(82)) OR (Data_in(8) And Control(95)) OR (Data_in(9) And Control(108)) OR (Data_in(10) And Control(121)) OR (Data_in(11) And Control(134)) OR (Data_in(12) And Control(147)) OR (Data_in(13) And Control(160)));
    210   Data_out(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(31)) OR (Data_in(4) And Control(44)) OR (Data_in(5) And Control(57)) OR (Data_in(6) And Control(70)) OR (Data_in(7) And Control(83)) OR (Data_in(8) And Control(96)) OR (Data_in(9) And Control(109)) OR (Data_in(10) And Control(122)) OR (Data_in(11) And Control(135)) OR (Data_in(12) And Control(148)) OR (Data_in(13) And Control(161)));
    211   Data_out(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(32)) OR (Data_in(4) And Control(45)) OR (Data_in(5) And Control(58)) OR (Data_in(6) And Control(71)) OR (Data_in(7) And Control(84)) OR (Data_in(8) And Control(97)) OR (Data_in(9) And Control(110)) OR (Data_in(10) And Control(123)) OR (Data_in(11) And Control(136)) OR (Data_in(12) And Control(149)) OR (Data_in(13) And Control(162)));
    212   Data_out(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(33)) OR (Data_in(4) And Control(46)) OR (Data_in(5) And Control(59)) OR (Data_in(6) And Control(72)) OR (Data_in(7) And Control(85)) OR (Data_in(8) And Control(98)) OR (Data_in(9) And Control(111)) OR (Data_in(10) And Control(124)) OR (Data_in(11) And Control(137)) OR (Data_in(12) And Control(150)) OR (Data_in(13) And Control(163)));
    213   Data_out(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(21)) OR (Data_in(3) And Control(34)) OR (Data_in(4) And Control(47)) OR (Data_in(5) And Control(60)) OR (Data_in(6) And Control(73)) OR (Data_in(7) And Control(86)) OR (Data_in(8) And Control(99)) OR (Data_in(9) And Control(112)) OR (Data_in(10) And Control(125)) OR (Data_in(11) And Control(138)) OR (Data_in(12) And Control(151)) OR (Data_in(13) And Control(164)));
    214   Data_out(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(22)) OR (Data_in(3) And Control(35)) OR (Data_in(4) And Control(48)) OR (Data_in(5) And Control(61)) OR (Data_in(6) And Control(74)) OR (Data_in(7) And Control(87)) OR (Data_in(8) And Control(100)) OR (Data_in(9) And Control(113)) OR (Data_in(10) And Control(126)) OR (Data_in(11) And Control(139)) OR (Data_in(12) And Control(152)) OR (Data_in(13) And Control(165)));
    215   Data_out(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(23)) OR (Data_in(3) And Control(36)) OR (Data_in(4) And Control(49)) OR (Data_in(5) And Control(62)) OR (Data_in(6) And Control(75)) OR (Data_in(7) And Control(88)) OR (Data_in(8) And Control(101)) OR (Data_in(9) And Control(114)) OR (Data_in(10) And Control(127)) OR (Data_in(11) And Control(140)) OR (Data_in(12) And Control(153)) OR (Data_in(13) And Control(166)));
    216   Data_out(11) <= ((Data_in(1) And Control(11)) OR (Data_in(2) And Control(24)) OR (Data_in(3) And Control(37)) OR (Data_in(4) And Control(50)) OR (Data_in(5) And Control(63)) OR (Data_in(6) And Control(76)) OR (Data_in(7) And Control(89)) OR (Data_in(8) And Control(102)) OR (Data_in(9) And Control(115)) OR (Data_in(10) And Control(128)) OR (Data_in(11) And Control(141)) OR (Data_in(12) And Control(154)) OR (Data_in(13) And Control(167)));
    217   Data_out(12) <= ((Data_in(1) And Control(12)) OR (Data_in(2) And Control(25)) OR (Data_in(3) And Control(38)) OR (Data_in(4) And Control(51)) OR (Data_in(5) And Control(64)) OR (Data_in(6) And Control(77)) OR (Data_in(7) And Control(90)) OR (Data_in(8) And Control(103)) OR (Data_in(9) And Control(116)) OR (Data_in(10) And Control(129)) OR (Data_in(11) And Control(142)) OR (Data_in(12) And Control(155)) OR (Data_in(13) And Control(168)));
    218   Data_out(13) <= ((Data_in(1) And Control(13)) OR (Data_in(2) And Control(26)) OR (Data_in(3) And Control(39)) OR (Data_in(4) And Control(52)) OR (Data_in(5) And Control(65)) OR (Data_in(6) And Control(78)) OR (Data_in(7) And Control(91)) OR (Data_in(8) And Control(104)) OR (Data_in(9) And Control(117)) OR (Data_in(10) And Control(130)) OR (Data_in(11) And Control(143)) OR (Data_in(12) And Control(156)) OR (Data_in(13) And Control(169)));
     209  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(14)) OR (Data_in(3) And Control(27)) OR (Data_in(4) And Control(40)) OR (Data_in(5) And Control(53)) OR (Data_in(6) And Control(66)) OR (Data_in(7) And Control(79)) OR (Data_in(8) And Control(92)) OR (Data_in(9) And Control(105)) OR (Data_in(10) And Control(118)) OR (Data_in(11) And Control(131)) OR (Data_in(12) And Control(144)) OR (Data_in(13) And Control(157)));
     210  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(28)) OR (Data_in(4) And Control(41)) OR (Data_in(5) And Control(54)) OR (Data_in(6) And Control(67)) OR (Data_in(7) And Control(80)) OR (Data_in(8) And Control(93)) OR (Data_in(9) And Control(106)) OR (Data_in(10) And Control(119)) OR (Data_in(11) And Control(132)) OR (Data_in(12) And Control(145)) OR (Data_in(13) And Control(158)));
     211  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(29)) OR (Data_in(4) And Control(42)) OR (Data_in(5) And Control(55)) OR (Data_in(6) And Control(68)) OR (Data_in(7) And Control(81)) OR (Data_in(8) And Control(94)) OR (Data_in(9) And Control(107)) OR (Data_in(10) And Control(120)) OR (Data_in(11) And Control(133)) OR (Data_in(12) And Control(146)) OR (Data_in(13) And Control(159)));
     212  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(30)) OR (Data_in(4) And Control(43)) OR (Data_in(5) And Control(56)) OR (Data_in(6) And Control(69)) OR (Data_in(7) And Control(82)) OR (Data_in(8) And Control(95)) OR (Data_in(9) And Control(108)) OR (Data_in(10) And Control(121)) OR (Data_in(11) And Control(134)) OR (Data_in(12) And Control(147)) OR (Data_in(13) And Control(160)));
     213  Dout(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(31)) OR (Data_in(4) And Control(44)) OR (Data_in(5) And Control(57)) OR (Data_in(6) And Control(70)) OR (Data_in(7) And Control(83)) OR (Data_in(8) And Control(96)) OR (Data_in(9) And Control(109)) OR (Data_in(10) And Control(122)) OR (Data_in(11) And Control(135)) OR (Data_in(12) And Control(148)) OR (Data_in(13) And Control(161)));
     214  Dout(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(32)) OR (Data_in(4) And Control(45)) OR (Data_in(5) And Control(58)) OR (Data_in(6) And Control(71)) OR (Data_in(7) And Control(84)) OR (Data_in(8) And Control(97)) OR (Data_in(9) And Control(110)) OR (Data_in(10) And Control(123)) OR (Data_in(11) And Control(136)) OR (Data_in(12) And Control(149)) OR (Data_in(13) And Control(162)));
     215  Dout(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(33)) OR (Data_in(4) And Control(46)) OR (Data_in(5) And Control(59)) OR (Data_in(6) And Control(72)) OR (Data_in(7) And Control(85)) OR (Data_in(8) And Control(98)) OR (Data_in(9) And Control(111)) OR (Data_in(10) And Control(124)) OR (Data_in(11) And Control(137)) OR (Data_in(12) And Control(150)) OR (Data_in(13) And Control(163)));
     216  Dout(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(21)) OR (Data_in(3) And Control(34)) OR (Data_in(4) And Control(47)) OR (Data_in(5) And Control(60)) OR (Data_in(6) And Control(73)) OR (Data_in(7) And Control(86)) OR (Data_in(8) And Control(99)) OR (Data_in(9) And Control(112)) OR (Data_in(10) And Control(125)) OR (Data_in(11) And Control(138)) OR (Data_in(12) And Control(151)) OR (Data_in(13) And Control(164)));
     217  Dout(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(22)) OR (Data_in(3) And Control(35)) OR (Data_in(4) And Control(48)) OR (Data_in(5) And Control(61)) OR (Data_in(6) And Control(74)) OR (Data_in(7) And Control(87)) OR (Data_in(8) And Control(100)) OR (Data_in(9) And Control(113)) OR (Data_in(10) And Control(126)) OR (Data_in(11) And Control(139)) OR (Data_in(12) And Control(152)) OR (Data_in(13) And Control(165)));
     218  Dout(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(23)) OR (Data_in(3) And Control(36)) OR (Data_in(4) And Control(49)) OR (Data_in(5) And Control(62)) OR (Data_in(6) And Control(75)) OR (Data_in(7) And Control(88)) OR (Data_in(8) And Control(101)) OR (Data_in(9) And Control(114)) OR (Data_in(10) And Control(127)) OR (Data_in(11) And Control(140)) OR (Data_in(12) And Control(153)) OR (Data_in(13) And Control(166)));
     219  Dout(11) <= ((Data_in(1) And Control(11)) OR (Data_in(2) And Control(24)) OR (Data_in(3) And Control(37)) OR (Data_in(4) And Control(50)) OR (Data_in(5) And Control(63)) OR (Data_in(6) And Control(76)) OR (Data_in(7) And Control(89)) OR (Data_in(8) And Control(102)) OR (Data_in(9) And Control(115)) OR (Data_in(10) And Control(128)) OR (Data_in(11) And Control(141)) OR (Data_in(12) And Control(154)) OR (Data_in(13) And Control(167)));
     220  Dout(12) <= ((Data_in(1) And Control(12)) OR (Data_in(2) And Control(25)) OR (Data_in(3) And Control(38)) OR (Data_in(4) And Control(51)) OR (Data_in(5) And Control(64)) OR (Data_in(6) And Control(77)) OR (Data_in(7) And Control(90)) OR (Data_in(8) And Control(103)) OR (Data_in(9) And Control(116)) OR (Data_in(10) And Control(129)) OR (Data_in(11) And Control(142)) OR (Data_in(12) And Control(155)) OR (Data_in(13) And Control(168)));
     221  Dout(13) <= ((Data_in(1) And Control(13)) OR (Data_in(2) And Control(26)) OR (Data_in(3) And Control(39)) OR (Data_in(4) And Control(52)) OR (Data_in(5) And Control(65)) OR (Data_in(6) And Control(78)) OR (Data_in(7) And Control(91)) OR (Data_in(8) And Control(104)) OR (Data_in(9) And Control(117)) OR (Data_in(10) And Control(130)) OR (Data_in(11) And Control(143)) OR (Data_in(12) And Control(156)) OR (Data_in(13) And Control(169)));
    219222end generate crossbit13x13;
    220223
     
    224227crossbit14x14 : if number_of_ports = 14 generate
    225228
    226   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(29)) OR (Data_in(4) And Control(43)) OR (Data_in(5) And Control(57)) OR (Data_in(6) And Control(71)) OR (Data_in(7) And Control(85)) OR (Data_in(8) And Control(99)) OR (Data_in(9) And Control(113)) OR (Data_in(10) And Control(127)) OR (Data_in(11) And Control(141)) OR (Data_in(12) And Control(155)) OR (Data_in(13) And Control(169)) OR (Data_in(14) And Control(183)));
    227   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(30)) OR (Data_in(4) And Control(44)) OR (Data_in(5) And Control(58)) OR (Data_in(6) And Control(72)) OR (Data_in(7) And Control(86)) OR (Data_in(8) And Control(100)) OR (Data_in(9) And Control(114)) OR (Data_in(10) And Control(128)) OR (Data_in(11) And Control(142)) OR (Data_in(12) And Control(156)) OR (Data_in(13) And Control(170)) OR (Data_in(14) And Control(184)));
    228   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(31)) OR (Data_in(4) And Control(45)) OR (Data_in(5) And Control(59)) OR (Data_in(6) And Control(73)) OR (Data_in(7) And Control(87)) OR (Data_in(8) And Control(101)) OR (Data_in(9) And Control(115)) OR (Data_in(10) And Control(129)) OR (Data_in(11) And Control(143)) OR (Data_in(12) And Control(157)) OR (Data_in(13) And Control(171)) OR (Data_in(14) And Control(185)));
    229   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(32)) OR (Data_in(4) And Control(46)) OR (Data_in(5) And Control(60)) OR (Data_in(6) And Control(74)) OR (Data_in(7) And Control(88)) OR (Data_in(8) And Control(102)) OR (Data_in(9) And Control(116)) OR (Data_in(10) And Control(130)) OR (Data_in(11) And Control(144)) OR (Data_in(12) And Control(158)) OR (Data_in(13) And Control(172)) OR (Data_in(14) And Control(186)));
    230   Data_out(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(33)) OR (Data_in(4) And Control(47)) OR (Data_in(5) And Control(61)) OR (Data_in(6) And Control(75)) OR (Data_in(7) And Control(89)) OR (Data_in(8) And Control(103)) OR (Data_in(9) And Control(117)) OR (Data_in(10) And Control(131)) OR (Data_in(11) And Control(145)) OR (Data_in(12) And Control(159)) OR (Data_in(13) And Control(173)) OR (Data_in(14) And Control(187)));
    231   Data_out(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(34)) OR (Data_in(4) And Control(48)) OR (Data_in(5) And Control(62)) OR (Data_in(6) And Control(76)) OR (Data_in(7) And Control(90)) OR (Data_in(8) And Control(104)) OR (Data_in(9) And Control(118)) OR (Data_in(10) And Control(132)) OR (Data_in(11) And Control(146)) OR (Data_in(12) And Control(160)) OR (Data_in(13) And Control(174)) OR (Data_in(14) And Control(188)));
    232   Data_out(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(21)) OR (Data_in(3) And Control(35)) OR (Data_in(4) And Control(49)) OR (Data_in(5) And Control(63)) OR (Data_in(6) And Control(77)) OR (Data_in(7) And Control(91)) OR (Data_in(8) And Control(105)) OR (Data_in(9) And Control(119)) OR (Data_in(10) And Control(133)) OR (Data_in(11) And Control(147)) OR (Data_in(12) And Control(161)) OR (Data_in(13) And Control(175)) OR (Data_in(14) And Control(189)));
    233   Data_out(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(22)) OR (Data_in(3) And Control(36)) OR (Data_in(4) And Control(50)) OR (Data_in(5) And Control(64)) OR (Data_in(6) And Control(78)) OR (Data_in(7) And Control(92)) OR (Data_in(8) And Control(106)) OR (Data_in(9) And Control(120)) OR (Data_in(10) And Control(134)) OR (Data_in(11) And Control(148)) OR (Data_in(12) And Control(162)) OR (Data_in(13) And Control(176)) OR (Data_in(14) And Control(190)));
    234   Data_out(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(23)) OR (Data_in(3) And Control(37)) OR (Data_in(4) And Control(51)) OR (Data_in(5) And Control(65)) OR (Data_in(6) And Control(79)) OR (Data_in(7) And Control(93)) OR (Data_in(8) And Control(107)) OR (Data_in(9) And Control(121)) OR (Data_in(10) And Control(135)) OR (Data_in(11) And Control(149)) OR (Data_in(12) And Control(163)) OR (Data_in(13) And Control(177)) OR (Data_in(14) And Control(191)));
    235   Data_out(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(24)) OR (Data_in(3) And Control(38)) OR (Data_in(4) And Control(52)) OR (Data_in(5) And Control(66)) OR (Data_in(6) And Control(80)) OR (Data_in(7) And Control(94)) OR (Data_in(8) And Control(108)) OR (Data_in(9) And Control(122)) OR (Data_in(10) And Control(136)) OR (Data_in(11) And Control(150)) OR (Data_in(12) And Control(164)) OR (Data_in(13) And Control(178)) OR (Data_in(14) And Control(192)));
    236   Data_out(11) <= ((Data_in(1) And Control(11)) OR (Data_in(2) And Control(25)) OR (Data_in(3) And Control(39)) OR (Data_in(4) And Control(53)) OR (Data_in(5) And Control(67)) OR (Data_in(6) And Control(81)) OR (Data_in(7) And Control(95)) OR (Data_in(8) And Control(109)) OR (Data_in(9) And Control(123)) OR (Data_in(10) And Control(137)) OR (Data_in(11) And Control(151)) OR (Data_in(12) And Control(165)) OR (Data_in(13) And Control(179)) OR (Data_in(14) And Control(193)));
    237   Data_out(12) <= ((Data_in(1) And Control(12)) OR (Data_in(2) And Control(26)) OR (Data_in(3) And Control(40)) OR (Data_in(4) And Control(54)) OR (Data_in(5) And Control(68)) OR (Data_in(6) And Control(82)) OR (Data_in(7) And Control(96)) OR (Data_in(8) And Control(110)) OR (Data_in(9) And Control(124)) OR (Data_in(10) And Control(138)) OR (Data_in(11) And Control(152)) OR (Data_in(12) And Control(166)) OR (Data_in(13) And Control(180)) OR (Data_in(14) And Control(194)));
    238   Data_out(13) <= ((Data_in(1) And Control(13)) OR (Data_in(2) And Control(27)) OR (Data_in(3) And Control(41)) OR (Data_in(4) And Control(55)) OR (Data_in(5) And Control(69)) OR (Data_in(6) And Control(83)) OR (Data_in(7) And Control(97)) OR (Data_in(8) And Control(111)) OR (Data_in(9) And Control(125)) OR (Data_in(10) And Control(139)) OR (Data_in(11) And Control(153)) OR (Data_in(12) And Control(167)) OR (Data_in(13) And Control(181)) OR (Data_in(14) And Control(195)));
    239   Data_out(14) <= ((Data_in(1) And Control(14)) OR (Data_in(2) And Control(28)) OR (Data_in(3) And Control(42)) OR (Data_in(4) And Control(56)) OR (Data_in(5) And Control(70)) OR (Data_in(6) And Control(84)) OR (Data_in(7) And Control(98)) OR (Data_in(8) And Control(112)) OR (Data_in(9) And Control(126)) OR (Data_in(10) And Control(140)) OR (Data_in(11) And Control(154)) OR (Data_in(12) And Control(168)) OR (Data_in(13) And Control(182)) OR (Data_in(14) And Control(196)));
     229  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(15)) OR (Data_in(3) And Control(29)) OR (Data_in(4) And Control(43)) OR (Data_in(5) And Control(57)) OR (Data_in(6) And Control(71)) OR (Data_in(7) And Control(85)) OR (Data_in(8) And Control(99)) OR (Data_in(9) And Control(113)) OR (Data_in(10) And Control(127)) OR (Data_in(11) And Control(141)) OR (Data_in(12) And Control(155)) OR (Data_in(13) And Control(169)) OR (Data_in(14) And Control(183)));
     230  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(30)) OR (Data_in(4) And Control(44)) OR (Data_in(5) And Control(58)) OR (Data_in(6) And Control(72)) OR (Data_in(7) And Control(86)) OR (Data_in(8) And Control(100)) OR (Data_in(9) And Control(114)) OR (Data_in(10) And Control(128)) OR (Data_in(11) And Control(142)) OR (Data_in(12) And Control(156)) OR (Data_in(13) And Control(170)) OR (Data_in(14) And Control(184)));
     231  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(31)) OR (Data_in(4) And Control(45)) OR (Data_in(5) And Control(59)) OR (Data_in(6) And Control(73)) OR (Data_in(7) And Control(87)) OR (Data_in(8) And Control(101)) OR (Data_in(9) And Control(115)) OR (Data_in(10) And Control(129)) OR (Data_in(11) And Control(143)) OR (Data_in(12) And Control(157)) OR (Data_in(13) And Control(171)) OR (Data_in(14) And Control(185)));
     232  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(32)) OR (Data_in(4) And Control(46)) OR (Data_in(5) And Control(60)) OR (Data_in(6) And Control(74)) OR (Data_in(7) And Control(88)) OR (Data_in(8) And Control(102)) OR (Data_in(9) And Control(116)) OR (Data_in(10) And Control(130)) OR (Data_in(11) And Control(144)) OR (Data_in(12) And Control(158)) OR (Data_in(13) And Control(172)) OR (Data_in(14) And Control(186)));
     233  Dout(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(33)) OR (Data_in(4) And Control(47)) OR (Data_in(5) And Control(61)) OR (Data_in(6) And Control(75)) OR (Data_in(7) And Control(89)) OR (Data_in(8) And Control(103)) OR (Data_in(9) And Control(117)) OR (Data_in(10) And Control(131)) OR (Data_in(11) And Control(145)) OR (Data_in(12) And Control(159)) OR (Data_in(13) And Control(173)) OR (Data_in(14) And Control(187)));
     234  Dout(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(34)) OR (Data_in(4) And Control(48)) OR (Data_in(5) And Control(62)) OR (Data_in(6) And Control(76)) OR (Data_in(7) And Control(90)) OR (Data_in(8) And Control(104)) OR (Data_in(9) And Control(118)) OR (Data_in(10) And Control(132)) OR (Data_in(11) And Control(146)) OR (Data_in(12) And Control(160)) OR (Data_in(13) And Control(174)) OR (Data_in(14) And Control(188)));
     235  Dout(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(21)) OR (Data_in(3) And Control(35)) OR (Data_in(4) And Control(49)) OR (Data_in(5) And Control(63)) OR (Data_in(6) And Control(77)) OR (Data_in(7) And Control(91)) OR (Data_in(8) And Control(105)) OR (Data_in(9) And Control(119)) OR (Data_in(10) And Control(133)) OR (Data_in(11) And Control(147)) OR (Data_in(12) And Control(161)) OR (Data_in(13) And Control(175)) OR (Data_in(14) And Control(189)));
     236  Dout(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(22)) OR (Data_in(3) And Control(36)) OR (Data_in(4) And Control(50)) OR (Data_in(5) And Control(64)) OR (Data_in(6) And Control(78)) OR (Data_in(7) And Control(92)) OR (Data_in(8) And Control(106)) OR (Data_in(9) And Control(120)) OR (Data_in(10) And Control(134)) OR (Data_in(11) And Control(148)) OR (Data_in(12) And Control(162)) OR (Data_in(13) And Control(176)) OR (Data_in(14) And Control(190)));
     237  Dout(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(23)) OR (Data_in(3) And Control(37)) OR (Data_in(4) And Control(51)) OR (Data_in(5) And Control(65)) OR (Data_in(6) And Control(79)) OR (Data_in(7) And Control(93)) OR (Data_in(8) And Control(107)) OR (Data_in(9) And Control(121)) OR (Data_in(10) And Control(135)) OR (Data_in(11) And Control(149)) OR (Data_in(12) And Control(163)) OR (Data_in(13) And Control(177)) OR (Data_in(14) And Control(191)));
     238  Dout(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(24)) OR (Data_in(3) And Control(38)) OR (Data_in(4) And Control(52)) OR (Data_in(5) And Control(66)) OR (Data_in(6) And Control(80)) OR (Data_in(7) And Control(94)) OR (Data_in(8) And Control(108)) OR (Data_in(9) And Control(122)) OR (Data_in(10) And Control(136)) OR (Data_in(11) And Control(150)) OR (Data_in(12) And Control(164)) OR (Data_in(13) And Control(178)) OR (Data_in(14) And Control(192)));
     239  Dout(11) <= ((Data_in(1) And Control(11)) OR (Data_in(2) And Control(25)) OR (Data_in(3) And Control(39)) OR (Data_in(4) And Control(53)) OR (Data_in(5) And Control(67)) OR (Data_in(6) And Control(81)) OR (Data_in(7) And Control(95)) OR (Data_in(8) And Control(109)) OR (Data_in(9) And Control(123)) OR (Data_in(10) And Control(137)) OR (Data_in(11) And Control(151)) OR (Data_in(12) And Control(165)) OR (Data_in(13) And Control(179)) OR (Data_in(14) And Control(193)));
     240  Dout(12) <= ((Data_in(1) And Control(12)) OR (Data_in(2) And Control(26)) OR (Data_in(3) And Control(40)) OR (Data_in(4) And Control(54)) OR (Data_in(5) And Control(68)) OR (Data_in(6) And Control(82)) OR (Data_in(7) And Control(96)) OR (Data_in(8) And Control(110)) OR (Data_in(9) And Control(124)) OR (Data_in(10) And Control(138)) OR (Data_in(11) And Control(152)) OR (Data_in(12) And Control(166)) OR (Data_in(13) And Control(180)) OR (Data_in(14) And Control(194)));
     241  Dout(13) <= ((Data_in(1) And Control(13)) OR (Data_in(2) And Control(27)) OR (Data_in(3) And Control(41)) OR (Data_in(4) And Control(55)) OR (Data_in(5) And Control(69)) OR (Data_in(6) And Control(83)) OR (Data_in(7) And Control(97)) OR (Data_in(8) And Control(111)) OR (Data_in(9) And Control(125)) OR (Data_in(10) And Control(139)) OR (Data_in(11) And Control(153)) OR (Data_in(12) And Control(167)) OR (Data_in(13) And Control(181)) OR (Data_in(14) And Control(195)));
     242  Dout(14) <= ((Data_in(1) And Control(14)) OR (Data_in(2) And Control(28)) OR (Data_in(3) And Control(42)) OR (Data_in(4) And Control(56)) OR (Data_in(5) And Control(70)) OR (Data_in(6) And Control(84)) OR (Data_in(7) And Control(98)) OR (Data_in(8) And Control(112)) OR (Data_in(9) And Control(126)) OR (Data_in(10) And Control(140)) OR (Data_in(11) And Control(154)) OR (Data_in(12) And Control(168)) OR (Data_in(13) And Control(182)) OR (Data_in(14) And Control(196)));
    240243end generate crossbit14x14;
    241244
     
    245248crossbit15x15 : if number_of_ports = 15 generate
    246249
    247   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(31)) OR (Data_in(4) And Control(46)) OR (Data_in(5) And Control(61)) OR (Data_in(6) And Control(76)) OR (Data_in(7) And Control(91)) OR (Data_in(8) And Control(106)) OR (Data_in(9) And Control(121)) OR (Data_in(10) And Control(136)) OR (Data_in(11) And Control(151)) OR (Data_in(12) And Control(166)) OR (Data_in(13) And Control(181)) OR (Data_in(14) And Control(196)) OR (Data_in(15) And Control(211)));
    248   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(32)) OR (Data_in(4) And Control(47)) OR (Data_in(5) And Control(62)) OR (Data_in(6) And Control(77)) OR (Data_in(7) And Control(92)) OR (Data_in(8) And Control(107)) OR (Data_in(9) And Control(122)) OR (Data_in(10) And Control(137)) OR (Data_in(11) And Control(152)) OR (Data_in(12) And Control(167)) OR (Data_in(13) And Control(182)) OR (Data_in(14) And Control(197)) OR (Data_in(15) And Control(212)));
    249   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(33)) OR (Data_in(4) And Control(48)) OR (Data_in(5) And Control(63)) OR (Data_in(6) And Control(78)) OR (Data_in(7) And Control(93)) OR (Data_in(8) And Control(108)) OR (Data_in(9) And Control(123)) OR (Data_in(10) And Control(138)) OR (Data_in(11) And Control(153)) OR (Data_in(12) And Control(168)) OR (Data_in(13) And Control(183)) OR (Data_in(14) And Control(198)) OR (Data_in(15) And Control(213)));
    250   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(34)) OR (Data_in(4) And Control(49)) OR (Data_in(5) And Control(64)) OR (Data_in(6) And Control(79)) OR (Data_in(7) And Control(94)) OR (Data_in(8) And Control(109)) OR (Data_in(9) And Control(124)) OR (Data_in(10) And Control(139)) OR (Data_in(11) And Control(154)) OR (Data_in(12) And Control(169)) OR (Data_in(13) And Control(184)) OR (Data_in(14) And Control(199)) OR (Data_in(15) And Control(214)));
    251   Data_out(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(35)) OR (Data_in(4) And Control(50)) OR (Data_in(5) And Control(65)) OR (Data_in(6) And Control(80)) OR (Data_in(7) And Control(95)) OR (Data_in(8) And Control(110)) OR (Data_in(9) And Control(125)) OR (Data_in(10) And Control(140)) OR (Data_in(11) And Control(155)) OR (Data_in(12) And Control(170)) OR (Data_in(13) And Control(185)) OR (Data_in(14) And Control(200)) OR (Data_in(15) And Control(215)));
    252   Data_out(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(21)) OR (Data_in(3) And Control(36)) OR (Data_in(4) And Control(51)) OR (Data_in(5) And Control(66)) OR (Data_in(6) And Control(81)) OR (Data_in(7) And Control(96)) OR (Data_in(8) And Control(111)) OR (Data_in(9) And Control(126)) OR (Data_in(10) And Control(141)) OR (Data_in(11) And Control(156)) OR (Data_in(12) And Control(171)) OR (Data_in(13) And Control(186)) OR (Data_in(14) And Control(201)) OR (Data_in(15) And Control(216)));
    253   Data_out(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(22)) OR (Data_in(3) And Control(37)) OR (Data_in(4) And Control(52)) OR (Data_in(5) And Control(67)) OR (Data_in(6) And Control(82)) OR (Data_in(7) And Control(97)) OR (Data_in(8) And Control(112)) OR (Data_in(9) And Control(127)) OR (Data_in(10) And Control(142)) OR (Data_in(11) And Control(157)) OR (Data_in(12) And Control(172)) OR (Data_in(13) And Control(187)) OR (Data_in(14) And Control(202)) OR (Data_in(15) And Control(217)));
    254   Data_out(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(23)) OR (Data_in(3) And Control(38)) OR (Data_in(4) And Control(53)) OR (Data_in(5) And Control(68)) OR (Data_in(6) And Control(83)) OR (Data_in(7) And Control(98)) OR (Data_in(8) And Control(113)) OR (Data_in(9) And Control(128)) OR (Data_in(10) And Control(143)) OR (Data_in(11) And Control(158)) OR (Data_in(12) And Control(173)) OR (Data_in(13) And Control(188)) OR (Data_in(14) And Control(203)) OR (Data_in(15) And Control(218)));
    255   Data_out(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(24)) OR (Data_in(3) And Control(39)) OR (Data_in(4) And Control(54)) OR (Data_in(5) And Control(69)) OR (Data_in(6) And Control(84)) OR (Data_in(7) And Control(99)) OR (Data_in(8) And Control(114)) OR (Data_in(9) And Control(129)) OR (Data_in(10) And Control(144)) OR (Data_in(11) And Control(159)) OR (Data_in(12) And Control(174)) OR (Data_in(13) And Control(189)) OR (Data_in(14) And Control(204)) OR (Data_in(15) And Control(219)));
    256   Data_out(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(25)) OR (Data_in(3) And Control(40)) OR (Data_in(4) And Control(55)) OR (Data_in(5) And Control(70)) OR (Data_in(6) And Control(85)) OR (Data_in(7) And Control(100)) OR (Data_in(8) And Control(115)) OR (Data_in(9) And Control(130)) OR (Data_in(10) And Control(145)) OR (Data_in(11) And Control(160)) OR (Data_in(12) And Control(175)) OR (Data_in(13) And Control(190)) OR (Data_in(14) And Control(205)) OR (Data_in(15) And Control(220)));
    257   Data_out(11) <= ((Data_in(1) And Control(11)) OR (Data_in(2) And Control(26)) OR (Data_in(3) And Control(41)) OR (Data_in(4) And Control(56)) OR (Data_in(5) And Control(71)) OR (Data_in(6) And Control(86)) OR (Data_in(7) And Control(101)) OR (Data_in(8) And Control(116)) OR (Data_in(9) And Control(131)) OR (Data_in(10) And Control(146)) OR (Data_in(11) And Control(161)) OR (Data_in(12) And Control(176)) OR (Data_in(13) And Control(191)) OR (Data_in(14) And Control(206)) OR (Data_in(15) And Control(221)));
    258   Data_out(12) <= ((Data_in(1) And Control(12)) OR (Data_in(2) And Control(27)) OR (Data_in(3) And Control(42)) OR (Data_in(4) And Control(57)) OR (Data_in(5) And Control(72)) OR (Data_in(6) And Control(87)) OR (Data_in(7) And Control(102)) OR (Data_in(8) And Control(117)) OR (Data_in(9) And Control(132)) OR (Data_in(10) And Control(147)) OR (Data_in(11) And Control(162)) OR (Data_in(12) And Control(177)) OR (Data_in(13) And Control(192)) OR (Data_in(14) And Control(207)) OR (Data_in(15) And Control(222)));
    259   Data_out(13) <= ((Data_in(1) And Control(13)) OR (Data_in(2) And Control(28)) OR (Data_in(3) And Control(43)) OR (Data_in(4) And Control(58)) OR (Data_in(5) And Control(73)) OR (Data_in(6) And Control(88)) OR (Data_in(7) And Control(103)) OR (Data_in(8) And Control(118)) OR (Data_in(9) And Control(133)) OR (Data_in(10) And Control(148)) OR (Data_in(11) And Control(163)) OR (Data_in(12) And Control(178)) OR (Data_in(13) And Control(193)) OR (Data_in(14) And Control(208)) OR (Data_in(15) And Control(223)));
    260   Data_out(14) <= ((Data_in(1) And Control(14)) OR (Data_in(2) And Control(29)) OR (Data_in(3) And Control(44)) OR (Data_in(4) And Control(59)) OR (Data_in(5) And Control(74)) OR (Data_in(6) And Control(89)) OR (Data_in(7) And Control(104)) OR (Data_in(8) And Control(119)) OR (Data_in(9) And Control(134)) OR (Data_in(10) And Control(149)) OR (Data_in(11) And Control(164)) OR (Data_in(12) And Control(179)) OR (Data_in(13) And Control(194)) OR (Data_in(14) And Control(209)) OR (Data_in(15) And Control(224)));
    261   Data_out(15) <= ((Data_in(1) And Control(15)) OR (Data_in(2) And Control(30)) OR (Data_in(3) And Control(45)) OR (Data_in(4) And Control(60)) OR (Data_in(5) And Control(75)) OR (Data_in(6) And Control(90)) OR (Data_in(7) And Control(105)) OR (Data_in(8) And Control(120)) OR (Data_in(9) And Control(135)) OR (Data_in(10) And Control(150)) OR (Data_in(11) And Control(165)) OR (Data_in(12) And Control(180)) OR (Data_in(13) And Control(195)) OR (Data_in(14) And Control(210)) OR (Data_in(15) And Control(225)));
     250  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(16)) OR (Data_in(3) And Control(31)) OR (Data_in(4) And Control(46)) OR (Data_in(5) And Control(61)) OR (Data_in(6) And Control(76)) OR (Data_in(7) And Control(91)) OR (Data_in(8) And Control(106)) OR (Data_in(9) And Control(121)) OR (Data_in(10) And Control(136)) OR (Data_in(11) And Control(151)) OR (Data_in(12) And Control(166)) OR (Data_in(13) And Control(181)) OR (Data_in(14) And Control(196)) OR (Data_in(15) And Control(211)));
     251  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(32)) OR (Data_in(4) And Control(47)) OR (Data_in(5) And Control(62)) OR (Data_in(6) And Control(77)) OR (Data_in(7) And Control(92)) OR (Data_in(8) And Control(107)) OR (Data_in(9) And Control(122)) OR (Data_in(10) And Control(137)) OR (Data_in(11) And Control(152)) OR (Data_in(12) And Control(167)) OR (Data_in(13) And Control(182)) OR (Data_in(14) And Control(197)) OR (Data_in(15) And Control(212)));
     252  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(33)) OR (Data_in(4) And Control(48)) OR (Data_in(5) And Control(63)) OR (Data_in(6) And Control(78)) OR (Data_in(7) And Control(93)) OR (Data_in(8) And Control(108)) OR (Data_in(9) And Control(123)) OR (Data_in(10) And Control(138)) OR (Data_in(11) And Control(153)) OR (Data_in(12) And Control(168)) OR (Data_in(13) And Control(183)) OR (Data_in(14) And Control(198)) OR (Data_in(15) And Control(213)));
     253  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(34)) OR (Data_in(4) And Control(49)) OR (Data_in(5) And Control(64)) OR (Data_in(6) And Control(79)) OR (Data_in(7) And Control(94)) OR (Data_in(8) And Control(109)) OR (Data_in(9) And Control(124)) OR (Data_in(10) And Control(139)) OR (Data_in(11) And Control(154)) OR (Data_in(12) And Control(169)) OR (Data_in(13) And Control(184)) OR (Data_in(14) And Control(199)) OR (Data_in(15) And Control(214)));
     254  Dout(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(35)) OR (Data_in(4) And Control(50)) OR (Data_in(5) And Control(65)) OR (Data_in(6) And Control(80)) OR (Data_in(7) And Control(95)) OR (Data_in(8) And Control(110)) OR (Data_in(9) And Control(125)) OR (Data_in(10) And Control(140)) OR (Data_in(11) And Control(155)) OR (Data_in(12) And Control(170)) OR (Data_in(13) And Control(185)) OR (Data_in(14) And Control(200)) OR (Data_in(15) And Control(215)));
     255  Dout(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(21)) OR (Data_in(3) And Control(36)) OR (Data_in(4) And Control(51)) OR (Data_in(5) And Control(66)) OR (Data_in(6) And Control(81)) OR (Data_in(7) And Control(96)) OR (Data_in(8) And Control(111)) OR (Data_in(9) And Control(126)) OR (Data_in(10) And Control(141)) OR (Data_in(11) And Control(156)) OR (Data_in(12) And Control(171)) OR (Data_in(13) And Control(186)) OR (Data_in(14) And Control(201)) OR (Data_in(15) And Control(216)));
     256  Dout(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(22)) OR (Data_in(3) And Control(37)) OR (Data_in(4) And Control(52)) OR (Data_in(5) And Control(67)) OR (Data_in(6) And Control(82)) OR (Data_in(7) And Control(97)) OR (Data_in(8) And Control(112)) OR (Data_in(9) And Control(127)) OR (Data_in(10) And Control(142)) OR (Data_in(11) And Control(157)) OR (Data_in(12) And Control(172)) OR (Data_in(13) And Control(187)) OR (Data_in(14) And Control(202)) OR (Data_in(15) And Control(217)));
     257  Dout(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(23)) OR (Data_in(3) And Control(38)) OR (Data_in(4) And Control(53)) OR (Data_in(5) And Control(68)) OR (Data_in(6) And Control(83)) OR (Data_in(7) And Control(98)) OR (Data_in(8) And Control(113)) OR (Data_in(9) And Control(128)) OR (Data_in(10) And Control(143)) OR (Data_in(11) And Control(158)) OR (Data_in(12) And Control(173)) OR (Data_in(13) And Control(188)) OR (Data_in(14) And Control(203)) OR (Data_in(15) And Control(218)));
     258  Dout(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(24)) OR (Data_in(3) And Control(39)) OR (Data_in(4) And Control(54)) OR (Data_in(5) And Control(69)) OR (Data_in(6) And Control(84)) OR (Data_in(7) And Control(99)) OR (Data_in(8) And Control(114)) OR (Data_in(9) And Control(129)) OR (Data_in(10) And Control(144)) OR (Data_in(11) And Control(159)) OR (Data_in(12) And Control(174)) OR (Data_in(13) And Control(189)) OR (Data_in(14) And Control(204)) OR (Data_in(15) And Control(219)));
     259  Dout(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(25)) OR (Data_in(3) And Control(40)) OR (Data_in(4) And Control(55)) OR (Data_in(5) And Control(70)) OR (Data_in(6) And Control(85)) OR (Data_in(7) And Control(100)) OR (Data_in(8) And Control(115)) OR (Data_in(9) And Control(130)) OR (Data_in(10) And Control(145)) OR (Data_in(11) And Control(160)) OR (Data_in(12) And Control(175)) OR (Data_in(13) And Control(190)) OR (Data_in(14) And Control(205)) OR (Data_in(15) And Control(220)));
     260  Dout(11) <= ((Data_in(1) And Control(11)) OR (Data_in(2) And Control(26)) OR (Data_in(3) And Control(41)) OR (Data_in(4) And Control(56)) OR (Data_in(5) And Control(71)) OR (Data_in(6) And Control(86)) OR (Data_in(7) And Control(101)) OR (Data_in(8) And Control(116)) OR (Data_in(9) And Control(131)) OR (Data_in(10) And Control(146)) OR (Data_in(11) And Control(161)) OR (Data_in(12) And Control(176)) OR (Data_in(13) And Control(191)) OR (Data_in(14) And Control(206)) OR (Data_in(15) And Control(221)));
     261  Dout(12) <= ((Data_in(1) And Control(12)) OR (Data_in(2) And Control(27)) OR (Data_in(3) And Control(42)) OR (Data_in(4) And Control(57)) OR (Data_in(5) And Control(72)) OR (Data_in(6) And Control(87)) OR (Data_in(7) And Control(102)) OR (Data_in(8) And Control(117)) OR (Data_in(9) And Control(132)) OR (Data_in(10) And Control(147)) OR (Data_in(11) And Control(162)) OR (Data_in(12) And Control(177)) OR (Data_in(13) And Control(192)) OR (Data_in(14) And Control(207)) OR (Data_in(15) And Control(222)));
     262  Dout(13) <= ((Data_in(1) And Control(13)) OR (Data_in(2) And Control(28)) OR (Data_in(3) And Control(43)) OR (Data_in(4) And Control(58)) OR (Data_in(5) And Control(73)) OR (Data_in(6) And Control(88)) OR (Data_in(7) And Control(103)) OR (Data_in(8) And Control(118)) OR (Data_in(9) And Control(133)) OR (Data_in(10) And Control(148)) OR (Data_in(11) And Control(163)) OR (Data_in(12) And Control(178)) OR (Data_in(13) And Control(193)) OR (Data_in(14) And Control(208)) OR (Data_in(15) And Control(223)));
     263  Dout(14) <= ((Data_in(1) And Control(14)) OR (Data_in(2) And Control(29)) OR (Data_in(3) And Control(44)) OR (Data_in(4) And Control(59)) OR (Data_in(5) And Control(74)) OR (Data_in(6) And Control(89)) OR (Data_in(7) And Control(104)) OR (Data_in(8) And Control(119)) OR (Data_in(9) And Control(134)) OR (Data_in(10) And Control(149)) OR (Data_in(11) And Control(164)) OR (Data_in(12) And Control(179)) OR (Data_in(13) And Control(194)) OR (Data_in(14) And Control(209)) OR (Data_in(15) And Control(224)));
     264  Dout(15) <= ((Data_in(1) And Control(15)) OR (Data_in(2) And Control(30)) OR (Data_in(3) And Control(45)) OR (Data_in(4) And Control(60)) OR (Data_in(5) And Control(75)) OR (Data_in(6) And Control(90)) OR (Data_in(7) And Control(105)) OR (Data_in(8) And Control(120)) OR (Data_in(9) And Control(135)) OR (Data_in(10) And Control(150)) OR (Data_in(11) And Control(165)) OR (Data_in(12) And Control(180)) OR (Data_in(13) And Control(195)) OR (Data_in(14) And Control(210)) OR (Data_in(15) And Control(225)));
    262265end generate crossbit15x15;
    263266
     
    267270crossbit16x16 : if number_of_ports = 16 generate
    268271
    269   Data_out(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(33)) OR (Data_in(4) And Control(49)) OR (Data_in(5) And Control(65)) OR (Data_in(6) And Control(81)) OR (Data_in(7) And Control(97)) OR (Data_in(8) And Control(113)) OR (Data_in(9) And Control(129)) OR (Data_in(10) And Control(145)) OR (Data_in(11) And Control(161)) OR (Data_in(12) And Control(177)) OR (Data_in(13) And Control(193)) OR (Data_in(14) And Control(209)) OR (Data_in(15) And Control(225)) OR (Data_in(16) And Control(241)));
    270   Data_out(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(34)) OR (Data_in(4) And Control(50)) OR (Data_in(5) And Control(66)) OR (Data_in(6) And Control(82)) OR (Data_in(7) And Control(98)) OR (Data_in(8) And Control(114)) OR (Data_in(9) And Control(130)) OR (Data_in(10) And Control(146)) OR (Data_in(11) And Control(162)) OR (Data_in(12) And Control(178)) OR (Data_in(13) And Control(194)) OR (Data_in(14) And Control(210)) OR (Data_in(15) And Control(226)) OR (Data_in(16) And Control(242)));
    271   Data_out(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(35)) OR (Data_in(4) And Control(51)) OR (Data_in(5) And Control(67)) OR (Data_in(6) And Control(83)) OR (Data_in(7) And Control(99)) OR (Data_in(8) And Control(115)) OR (Data_in(9) And Control(131)) OR (Data_in(10) And Control(147)) OR (Data_in(11) And Control(163)) OR (Data_in(12) And Control(179)) OR (Data_in(13) And Control(195)) OR (Data_in(14) And Control(211)) OR (Data_in(15) And Control(227)) OR (Data_in(16) And Control(243)));
    272   Data_out(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(36)) OR (Data_in(4) And Control(52)) OR (Data_in(5) And Control(68)) OR (Data_in(6) And Control(84)) OR (Data_in(7) And Control(100)) OR (Data_in(8) And Control(116)) OR (Data_in(9) And Control(132)) OR (Data_in(10) And Control(148)) OR (Data_in(11) And Control(164)) OR (Data_in(12) And Control(180)) OR (Data_in(13) And Control(196)) OR (Data_in(14) And Control(212)) OR (Data_in(15) And Control(228)) OR (Data_in(16) And Control(244)));
    273   Data_out(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(21)) OR (Data_in(3) And Control(37)) OR (Data_in(4) And Control(53)) OR (Data_in(5) And Control(69)) OR (Data_in(6) And Control(85)) OR (Data_in(7) And Control(101)) OR (Data_in(8) And Control(117)) OR (Data_in(9) And Control(133)) OR (Data_in(10) And Control(149)) OR (Data_in(11) And Control(165)) OR (Data_in(12) And Control(181)) OR (Data_in(13) And Control(197)) OR (Data_in(14) And Control(213)) OR (Data_in(15) And Control(229)) OR (Data_in(16) And Control(245)));
    274   Data_out(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(22)) OR (Data_in(3) And Control(38)) OR (Data_in(4) And Control(54)) OR (Data_in(5) And Control(70)) OR (Data_in(6) And Control(86)) OR (Data_in(7) And Control(102)) OR (Data_in(8) And Control(118)) OR (Data_in(9) And Control(134)) OR (Data_in(10) And Control(150)) OR (Data_in(11) And Control(166)) OR (Data_in(12) And Control(182)) OR (Data_in(13) And Control(198)) OR (Data_in(14) And Control(214)) OR (Data_in(15) And Control(230)) OR (Data_in(16) And Control(246)));
    275   Data_out(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(23)) OR (Data_in(3) And Control(39)) OR (Data_in(4) And Control(55)) OR (Data_in(5) And Control(71)) OR (Data_in(6) And Control(87)) OR (Data_in(7) And Control(103)) OR (Data_in(8) And Control(119)) OR (Data_in(9) And Control(135)) OR (Data_in(10) And Control(151)) OR (Data_in(11) And Control(167)) OR (Data_in(12) And Control(183)) OR (Data_in(13) And Control(199)) OR (Data_in(14) And Control(215)) OR (Data_in(15) And Control(231)) OR (Data_in(16) And Control(247)));
    276   Data_out(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(24)) OR (Data_in(3) And Control(40)) OR (Data_in(4) And Control(56)) OR (Data_in(5) And Control(72)) OR (Data_in(6) And Control(88)) OR (Data_in(7) And Control(104)) OR (Data_in(8) And Control(120)) OR (Data_in(9) And Control(136)) OR (Data_in(10) And Control(152)) OR (Data_in(11) And Control(168)) OR (Data_in(12) And Control(184)) OR (Data_in(13) And Control(200)) OR (Data_in(14) And Control(216)) OR (Data_in(15) And Control(232)) OR (Data_in(16) And Control(248)));
    277   Data_out(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(25)) OR (Data_in(3) And Control(41)) OR (Data_in(4) And Control(57)) OR (Data_in(5) And Control(73)) OR (Data_in(6) And Control(89)) OR (Data_in(7) And Control(105)) OR (Data_in(8) And Control(121)) OR (Data_in(9) And Control(137)) OR (Data_in(10) And Control(153)) OR (Data_in(11) And Control(169)) OR (Data_in(12) And Control(185)) OR (Data_in(13) And Control(201)) OR (Data_in(14) And Control(217)) OR (Data_in(15) And Control(233)) OR (Data_in(16) And Control(249)));
    278   Data_out(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(26)) OR (Data_in(3) And Control(42)) OR (Data_in(4) And Control(58)) OR (Data_in(5) And Control(74)) OR (Data_in(6) And Control(90)) OR (Data_in(7) And Control(106)) OR (Data_in(8) And Control(122)) OR (Data_in(9) And Control(138)) OR (Data_in(10) And Control(154)) OR (Data_in(11) And Control(170)) OR (Data_in(12) And Control(186)) OR (Data_in(13) And Control(202)) OR (Data_in(14) And Control(218)) OR (Data_in(15) And Control(234)) OR (Data_in(16) And Control(250)));
    279   Data_out(11) <= ((Data_in(1) And Control(11)) OR (Data_in(2) And Control(27)) OR (Data_in(3) And Control(43)) OR (Data_in(4) And Control(59)) OR (Data_in(5) And Control(75)) OR (Data_in(6) And Control(91)) OR (Data_in(7) And Control(107)) OR (Data_in(8) And Control(123)) OR (Data_in(9) And Control(139)) OR (Data_in(10) And Control(155)) OR (Data_in(11) And Control(171)) OR (Data_in(12) And Control(187)) OR (Data_in(13) And Control(203)) OR (Data_in(14) And Control(219)) OR (Data_in(15) And Control(235)) OR (Data_in(16) And Control(251)));
    280   Data_out(12) <= ((Data_in(1) And Control(12)) OR (Data_in(2) And Control(28)) OR (Data_in(3) And Control(44)) OR (Data_in(4) And Control(60)) OR (Data_in(5) And Control(76)) OR (Data_in(6) And Control(92)) OR (Data_in(7) And Control(108)) OR (Data_in(8) And Control(124)) OR (Data_in(9) And Control(140)) OR (Data_in(10) And Control(156)) OR (Data_in(11) And Control(172)) OR (Data_in(12) And Control(188)) OR (Data_in(13) And Control(204)) OR (Data_in(14) And Control(220)) OR (Data_in(15) And Control(236)) OR (Data_in(16) And Control(252)));
    281   Data_out(13) <= ((Data_in(1) And Control(13)) OR (Data_in(2) And Control(29)) OR (Data_in(3) And Control(45)) OR (Data_in(4) And Control(61)) OR (Data_in(5) And Control(77)) OR (Data_in(6) And Control(93)) OR (Data_in(7) And Control(109)) OR (Data_in(8) And Control(125)) OR (Data_in(9) And Control(141)) OR (Data_in(10) And Control(157)) OR (Data_in(11) And Control(173)) OR (Data_in(12) And Control(189)) OR (Data_in(13) And Control(205)) OR (Data_in(14) And Control(221)) OR (Data_in(15) And Control(237)) OR (Data_in(16) And Control(253)));
    282   Data_out(14) <= ((Data_in(1) And Control(14)) OR (Data_in(2) And Control(30)) OR (Data_in(3) And Control(46)) OR (Data_in(4) And Control(62)) OR (Data_in(5) And Control(78)) OR (Data_in(6) And Control(94)) OR (Data_in(7) And Control(110)) OR (Data_in(8) And Control(126)) OR (Data_in(9) And Control(142)) OR (Data_in(10) And Control(158)) OR (Data_in(11) And Control(174)) OR (Data_in(12) And Control(190)) OR (Data_in(13) And Control(206)) OR (Data_in(14) And Control(222)) OR (Data_in(15) And Control(238)) OR (Data_in(16) And Control(254)));
    283   Data_out(15) <= ((Data_in(1) And Control(15)) OR (Data_in(2) And Control(31)) OR (Data_in(3) And Control(47)) OR (Data_in(4) And Control(63)) OR (Data_in(5) And Control(79)) OR (Data_in(6) And Control(95)) OR (Data_in(7) And Control(111)) OR (Data_in(8) And Control(127)) OR (Data_in(9) And Control(143)) OR (Data_in(10) And Control(159)) OR (Data_in(11) And Control(175)) OR (Data_in(12) And Control(191)) OR (Data_in(13) And Control(207)) OR (Data_in(14) And Control(223)) OR (Data_in(15) And Control(239)) OR (Data_in(16) And Control(255)));
    284   Data_out(16) <= ((Data_in(1) And Control(16)) OR (Data_in(2) And Control(32)) OR (Data_in(3) And Control(48)) OR (Data_in(4) And Control(64)) OR (Data_in(5) And Control(80)) OR (Data_in(6) And Control(96)) OR (Data_in(7) And Control(112)) OR (Data_in(8) And Control(128)) OR (Data_in(9) And Control(144)) OR (Data_in(10) And Control(160)) OR (Data_in(11) And Control(176)) OR (Data_in(12) And Control(192)) OR (Data_in(13) And Control(208)) OR (Data_in(14) And Control(224)) OR (Data_in(15) And Control(240)) OR (Data_in(16) And Control(256)));
     272  Dout(1) <= ((Data_in(1) And Control(1)) OR (Data_in(2) And Control(17)) OR (Data_in(3) And Control(33)) OR (Data_in(4) And Control(49)) OR (Data_in(5) And Control(65)) OR (Data_in(6) And Control(81)) OR (Data_in(7) And Control(97)) OR (Data_in(8) And Control(113)) OR (Data_in(9) And Control(129)) OR (Data_in(10) And Control(145)) OR (Data_in(11) And Control(161)) OR (Data_in(12) And Control(177)) OR (Data_in(13) And Control(193)) OR (Data_in(14) And Control(209)) OR (Data_in(15) And Control(225)) OR (Data_in(16) And Control(241)));
     273  Dout(2) <= ((Data_in(1) And Control(2)) OR (Data_in(2) And Control(18)) OR (Data_in(3) And Control(34)) OR (Data_in(4) And Control(50)) OR (Data_in(5) And Control(66)) OR (Data_in(6) And Control(82)) OR (Data_in(7) And Control(98)) OR (Data_in(8) And Control(114)) OR (Data_in(9) And Control(130)) OR (Data_in(10) And Control(146)) OR (Data_in(11) And Control(162)) OR (Data_in(12) And Control(178)) OR (Data_in(13) And Control(194)) OR (Data_in(14) And Control(210)) OR (Data_in(15) And Control(226)) OR (Data_in(16) And Control(242)));
     274  Dout(3) <= ((Data_in(1) And Control(3)) OR (Data_in(2) And Control(19)) OR (Data_in(3) And Control(35)) OR (Data_in(4) And Control(51)) OR (Data_in(5) And Control(67)) OR (Data_in(6) And Control(83)) OR (Data_in(7) And Control(99)) OR (Data_in(8) And Control(115)) OR (Data_in(9) And Control(131)) OR (Data_in(10) And Control(147)) OR (Data_in(11) And Control(163)) OR (Data_in(12) And Control(179)) OR (Data_in(13) And Control(195)) OR (Data_in(14) And Control(211)) OR (Data_in(15) And Control(227)) OR (Data_in(16) And Control(243)));
     275  Dout(4) <= ((Data_in(1) And Control(4)) OR (Data_in(2) And Control(20)) OR (Data_in(3) And Control(36)) OR (Data_in(4) And Control(52)) OR (Data_in(5) And Control(68)) OR (Data_in(6) And Control(84)) OR (Data_in(7) And Control(100)) OR (Data_in(8) And Control(116)) OR (Data_in(9) And Control(132)) OR (Data_in(10) And Control(148)) OR (Data_in(11) And Control(164)) OR (Data_in(12) And Control(180)) OR (Data_in(13) And Control(196)) OR (Data_in(14) And Control(212)) OR (Data_in(15) And Control(228)) OR (Data_in(16) And Control(244)));
     276  Dout(5) <= ((Data_in(1) And Control(5)) OR (Data_in(2) And Control(21)) OR (Data_in(3) And Control(37)) OR (Data_in(4) And Control(53)) OR (Data_in(5) And Control(69)) OR (Data_in(6) And Control(85)) OR (Data_in(7) And Control(101)) OR (Data_in(8) And Control(117)) OR (Data_in(9) And Control(133)) OR (Data_in(10) And Control(149)) OR (Data_in(11) And Control(165)) OR (Data_in(12) And Control(181)) OR (Data_in(13) And Control(197)) OR (Data_in(14) And Control(213)) OR (Data_in(15) And Control(229)) OR (Data_in(16) And Control(245)));
     277  Dout(6) <= ((Data_in(1) And Control(6)) OR (Data_in(2) And Control(22)) OR (Data_in(3) And Control(38)) OR (Data_in(4) And Control(54)) OR (Data_in(5) And Control(70)) OR (Data_in(6) And Control(86)) OR (Data_in(7) And Control(102)) OR (Data_in(8) And Control(118)) OR (Data_in(9) And Control(134)) OR (Data_in(10) And Control(150)) OR (Data_in(11) And Control(166)) OR (Data_in(12) And Control(182)) OR (Data_in(13) And Control(198)) OR (Data_in(14) And Control(214)) OR (Data_in(15) And Control(230)) OR (Data_in(16) And Control(246)));
     278  Dout(7) <= ((Data_in(1) And Control(7)) OR (Data_in(2) And Control(23)) OR (Data_in(3) And Control(39)) OR (Data_in(4) And Control(55)) OR (Data_in(5) And Control(71)) OR (Data_in(6) And Control(87)) OR (Data_in(7) And Control(103)) OR (Data_in(8) And Control(119)) OR (Data_in(9) And Control(135)) OR (Data_in(10) And Control(151)) OR (Data_in(11) And Control(167)) OR (Data_in(12) And Control(183)) OR (Data_in(13) And Control(199)) OR (Data_in(14) And Control(215)) OR (Data_in(15) And Control(231)) OR (Data_in(16) And Control(247)));
     279  Dout(8) <= ((Data_in(1) And Control(8)) OR (Data_in(2) And Control(24)) OR (Data_in(3) And Control(40)) OR (Data_in(4) And Control(56)) OR (Data_in(5) And Control(72)) OR (Data_in(6) And Control(88)) OR (Data_in(7) And Control(104)) OR (Data_in(8) And Control(120)) OR (Data_in(9) And Control(136)) OR (Data_in(10) And Control(152)) OR (Data_in(11) And Control(168)) OR (Data_in(12) And Control(184)) OR (Data_in(13) And Control(200)) OR (Data_in(14) And Control(216)) OR (Data_in(15) And Control(232)) OR (Data_in(16) And Control(248)));
     280  Dout(9) <= ((Data_in(1) And Control(9)) OR (Data_in(2) And Control(25)) OR (Data_in(3) And Control(41)) OR (Data_in(4) And Control(57)) OR (Data_in(5) And Control(73)) OR (Data_in(6) And Control(89)) OR (Data_in(7) And Control(105)) OR (Data_in(8) And Control(121)) OR (Data_in(9) And Control(137)) OR (Data_in(10) And Control(153)) OR (Data_in(11) And Control(169)) OR (Data_in(12) And Control(185)) OR (Data_in(13) And Control(201)) OR (Data_in(14) And Control(217)) OR (Data_in(15) And Control(233)) OR (Data_in(16) And Control(249)));
     281  Dout(10) <= ((Data_in(1) And Control(10)) OR (Data_in(2) And Control(26)) OR (Data_in(3) And Control(42)) OR (Data_in(4) And Control(58)) OR (Data_in(5) And Control(74)) OR (Data_in(6) And Control(90)) OR (Data_in(7) And Control(106)) OR (Data_in(8) And Control(122)) OR (Data_in(9) And Control(138)) OR (Data_in(10) And Control(154)) OR (Data_in(11) And Control(170)) OR (Data_in(12) And Control(186)) OR (Data_in(13) And Control(202)) OR (Data_in(14) And Control(218)) OR (Data_in(15) And Control(234)) OR (Data_in(16) And Control(250)));
     282  Dout(11) <= ((Data_in(1) And Control(11)) OR (Data_in(2) And Control(27)) OR (Data_in(3) And Control(43)) OR (Data_in(4) And Control(59)) OR (Data_in(5) And Control(75)) OR (Data_in(6) And Control(91)) OR (Data_in(7) And Control(107)) OR (Data_in(8) And Control(123)) OR (Data_in(9) And Control(139)) OR (Data_in(10) And Control(155)) OR (Data_in(11) And Control(171)) OR (Data_in(12) And Control(187)) OR (Data_in(13) And Control(203)) OR (Data_in(14) And Control(219)) OR (Data_in(15) And Control(235)) OR (Data_in(16) And Control(251)));
     283  Dout(12) <= ((Data_in(1) And Control(12)) OR (Data_in(2) And Control(28)) OR (Data_in(3) And Control(44)) OR (Data_in(4) And Control(60)) OR (Data_in(5) And Control(76)) OR (Data_in(6) And Control(92)) OR (Data_in(7) And Control(108)) OR (Data_in(8) And Control(124)) OR (Data_in(9) And Control(140)) OR (Data_in(10) And Control(156)) OR (Data_in(11) And Control(172)) OR (Data_in(12) And Control(188)) OR (Data_in(13) And Control(204)) OR (Data_in(14) And Control(220)) OR (Data_in(15) And Control(236)) OR (Data_in(16) And Control(252)));
     284  Dout(13) <= ((Data_in(1) And Control(13)) OR (Data_in(2) And Control(29)) OR (Data_in(3) And Control(45)) OR (Data_in(4) And Control(61)) OR (Data_in(5) And Control(77)) OR (Data_in(6) And Control(93)) OR (Data_in(7) And Control(109)) OR (Data_in(8) And Control(125)) OR (Data_in(9) And Control(141)) OR (Data_in(10) And Control(157)) OR (Data_in(11) And Control(173)) OR (Data_in(12) And Control(189)) OR (Data_in(13) And Control(205)) OR (Data_in(14) And Control(221)) OR (Data_in(15) And Control(237)) OR (Data_in(16) And Control(253)));
     285  Dout(14) <= ((Data_in(1) And Control(14)) OR (Data_in(2) And Control(30)) OR (Data_in(3) And Control(46)) OR (Data_in(4) And Control(62)) OR (Data_in(5) And Control(78)) OR (Data_in(6) And Control(94)) OR (Data_in(7) And Control(110)) OR (Data_in(8) And Control(126)) OR (Data_in(9) And Control(142)) OR (Data_in(10) And Control(158)) OR (Data_in(11) And Control(174)) OR (Data_in(12) And Control(190)) OR (Data_in(13) And Control(206)) OR (Data_in(14) And Control(222)) OR (Data_in(15) And Control(238)) OR (Data_in(16) And Control(254)));
     286  Dout(15) <= ((Data_in(1) And Control(15)) OR (Data_in(2) And Control(31)) OR (Data_in(3) And Control(47)) OR (Data_in(4) And Control(63)) OR (Data_in(5) And Control(79)) OR (Data_in(6) And Control(95)) OR (Data_in(7) And Control(111)) OR (Data_in(8) And Control(127)) OR (Data_in(9) And Control(143)) OR (Data_in(10) And Control(159)) OR (Data_in(11) And Control(175)) OR (Data_in(12) And Control(191)) OR (Data_in(13) And Control(207)) OR (Data_in(14) And Control(223)) OR (Data_in(15) And Control(239)) OR (Data_in(16) And Control(255)));
     287  Dout(16) <= ((Data_in(1) And Control(16)) OR (Data_in(2) And Control(32)) OR (Data_in(3) And Control(48)) OR (Data_in(4) And Control(64)) OR (Data_in(5) And Control(80)) OR (Data_in(6) And Control(96)) OR (Data_in(7) And Control(112)) OR (Data_in(8) And Control(128)) OR (Data_in(9) And Control(144)) OR (Data_in(10) And Control(160)) OR (Data_in(11) And Control(176)) OR (Data_in(12) And Control(192)) OR (Data_in(13) And Control(208)) OR (Data_in(14) And Control(224)) OR (Data_in(15) And Control(240)) OR (Data_in(16) And Control(256)));
    285288end generate crossbit16x16;
    286 
     289--pcrossbit:process (clk,reset)
     290--begin
     291--if rising_edge(clk) then
     292--      if reset='1' then
     293--      data_out<= (others=>'0');
     294--      else
     295                data_out<=dout;
     296--      end if;
     297--end if;
     298--end process pcrossbit;
    287299end Behavioral;
    288300
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/FIFO_256_FWFT.vhd

    r22 r65  
    8383
    8484-- ram instantiation de la bloc ram 256 octets du FIFO
    85 fifo_RAM_256: RAM_256 PORT MAP(
    86                 clka => clk_signal,
    87                 clkb => clk_signal,
    88                 wea => wr_en_signal,
    89                 ena => '1',
    90                 enb => '1',
    91                 addra => push_address_counter,
    92                 addrb => pop_address_counter,
    93                 dia => din,
    94                 dob => doa_signal
    95         );
     85--fifo_RAM_256: RAM_256 PORT MAP(
     86--              clka => clk_signal,
     87--              clkb => clk_signal,
     88--              wea => wr_en_signal,
     89--              ena => '1',
     90--              enb => '1',
     91--              addra => push_address_counter,
     92--              addrb => pop_address_counter,
     93--              dia => din,
     94--              dob => dob_signal
     95--              --dob => doa_signal
     96--      );
    9697               
    9798-- circuiterie des signaux de validation et d'etat du fifo
     
    102103--empty_signal <= '1' when fifo_counter = "000000"  else
    103104--                                       '0';
    104 empty_signal <= '1' when rd_ready='0' or unsigned(fifo_counter) = 0  else
     105empty_signal <= '1' when (rd_ready='0') else -- or (All_zeros(fifo_counter) = '0')  else
    105106                                         '0';
    106107clk_signal <= clk;
     
    143144                                                                                end if;
    144145
    145                                         when others => fwft_fsm_state <= state0;
     146--                                      when others => fwft_fsm_state <= state0;
    146147                                                                               
    147148                                                                               
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/INPUT_PORT_MODULE.vhd

    r22 r65  
    4444    Port ( data_in : in  STD_LOGIC_VECTOR (Word-1 downto 0);
    4545           data_in_en : in  STD_LOGIC; -- signaler la présence des données en entrée
    46                           cmd_in_en : STD_LOGIC;    --permet d'identifier les données qui sont dans le tampon
     46                          cmd_in_en :in STD_LOGIC;    --permet d'identifier les données qui sont dans le tampon
    4747           reset : in  STD_LOGIC;
    4848                          clk   : in  STD_LOGIC;
     
    7373
    7474--definition du type etat pour les fsm
    75 type fsm_states is (state0, CmdOn, WaitGrant, ReqPort, state1, state2,stpulse, state3);-- definition du type etat pour le codage des etats des fsm
     75type fsm_states is (state0, CmdOn, WaitGrant, ReqPort, state1, state2,stpulse,stateErr, state3);-- definition du type etat pour le codage des etats des fsm
    7676type fsm_states2 is(cmdstart,cmdwait,cmdread,cmdSetDest,cmdSetCount,cmdSetId,cmdpulse,CmdEnd);
    7777signal pop_state : fsm_states;
     
    7979signal cmd_exec : std_logic:='0';  --indique que le port est en train d'exécuter une commande
    8080signal dat_exec :std_logic:='0'; -- indique le port est en train de transférer des données
    81 signal readOk : std_logic:='0'; --indique s'il est possible de lire les données
     81signal dat_Err :std_logic:='0'; -- signal une erreur pendant l'exécution
     82signal readOk,CmdReadOk : std_logic:='0'; --indique s'il est possible de lire les données
    8283-- signaux utilisés dans les fsm
    83 signal request_decoder : STD_LOGIC_VECTOR(number_of_ports  downto 1);
     84signal request_decoder,req_grant : STD_LOGIC_VECTOR(number_of_ports  downto 1);
    8485signal request_decoder_en : std_logic;
    85 signal request_latch : STD_LOGIC_VECTOR(4 downto 1);   -- pourquoi pas 3 downto 0 ?
     86signal request_latch : STD_LOGIC_VECTOR(4 downto 1):=(others=>'0');   -- pourquoi pas 3 downto 0 ?
    8687signal request_latch_en : std_logic;
    8788signal pipeline_latch : std_logic_vector(Word-1 downto 0);
     
    131132
    132133data_out <= pipeline_latch ;--when cmd_exec='0' else cmd_data_signal;
    133 fifo_empty <= fifo_empty_signal;
     134fifo_empty <= empty_latch;
    134135reset_signal <= reset;
    135136grant_proc:process(clk)
    136137begin
    137138if rising_edge(clk) then
    138         if unsigned(grant)> 0 then
     139--      if unsigned(grant)> 0 then
     140        if unsigned(req_grant) > 0 then
    139141                port_granted <= '1';            --il faut veiller à ce que ce port soit vraiment autorisé
    140142        else
     
    145147rd_en_signal <= not(empty_latch) ;
    146148request <= request_decoder;
     149reg_grant:process (request_decoder,grant)
     150begin
     151req_grant<=request_decoder and grant;
     152end process reg_grant;
    147153request_word <=  request_latch & request_decoder_en;
    148154clk_signal <= clk;
     
    499505                  case pop_state is
    500506                        when state0 => if cmd_in_en='0'  then --il ne faut pas exécuter les deux MAE ...
    501                                                                         if fifo_empty_signal  ='0' then -- pile pas vide on doit dépiler                                                                       
     507                                                                        if empty_latch  ='0' then -- pile pas vide on doit dépiler                                                                     
    502508                                                                                pop_state <= WaitGrant;
    503509                                                                        end if;
     
    505511                                                                        pop_state <= CmdOn;
    506512                                                                end if;
    507                         when CmdOn => if fifo_empty_signal='1' then
     513                        when CmdOn => if empty_latch='1' and cmd_in_en='0' then
    508514                                                                pop_state <= state0;
     515                                                                elsif empty_latch='0' and cmd_in_en='1' then
     516                                                                pop_state <= CmdOn;
     517                                                                elsif empty_latch='1' and cmd_in_en='1' then
     518                                                                pop_state <= state0;
     519                                                                else -- empty_latch='0' and cmd_in_en='0'
     520                                                                pop_state <= WaitGrant;
    509521                                                                end if;
     522                                                               
    510523                        when WaitGrant => if port_granted = '1' then
    511524                                                                                --
     
    536549                                                                                  pop_state <= state2;
    537550                                                                                  ReadOk<='1';
     551                                                                                else --rd_en_signal='0' fin prématurée de la lecture
     552                                                                                        ReadOk<='0';
     553                                                                                        pop_state<=stateErr;
     554                                                                                        data_counter<=(others => '0');
    538555                                                                                end if;
    539556                                                                        else
     
    549566                                                                                data_counter <= data_counter - 1;
    550567                                                                                pop_state <= state0;
    551                                                                                                                                                                                
     568                        when stateErr =>         
     569                                                                                data_counter <= data_counter;
     570                                                                                pop_state <= stateErr;                                                                                         
    552571                        when others => pop_state <= state0;
    553572                   end case;
     
    557576
    558577-- actions associées à chaque etat de la fsm de mealy
    559 pop_fsm_action : process(pop_state, fifo_out_signal,fifo_empty_signal, rd_en_signal,readok, port_granted )
     578pop_fsm_action : process(pop_state, fifo_out_signal,empty_latch, rd_en_signal,readok, port_granted )
    560579  begin   
    561580-- code fonctionnel     
     
    568587                                                                dat_priority_rotation <= '1';
    569588                                                                dat_exec<='0';
     589                                                                dat_Err<='0';
    570590                                                                push_dout<=fifo_out_signal;
     591                                                               
    571592                when CmdOn =>           dat_request_latch_en <= '0'; 
    572                                                                 dat_pipeline_latch_en <= rd_en_signal;
     593                                                                dat_pipeline_latch_en <= '0';
    573594                                                                dat_fifo_read_signal <='0';
    574595                                                                dat_request_decoder_en <= '0';
     
    576597                                                                dat_priority_rotation <= '1';
    577598                                                                dat_exec<='0';
     599                                                                dat_Err<='0';
    578600                                                                push_dout<=fifo_out_signal;
    579601                when WaitGrant =>       
     
    585607                                                                dat_priority_rotation <= '0';
    586608                                                                dat_exec<='1';
     609                                                                dat_Err<='0';
    587610                                                                push_dout<=fifo_out_signal(7 downto 4) & PORT_ID(3 downto 0);
    588611                when ReqPort =>
    589612                                                                dat_request_latch_en <='1'; --autoriser l'identification du port de destination
    590                                                                 dat_pipeline_latch_en <= Port_granted; --pour le transmettre à travers le réseau
    591                                                                 dat_fifo_read_signal <= Port_granted;
     613                                                                dat_pipeline_latch_en <= '1'; --pour le transmettre à travers le réseau
     614                                                                dat_fifo_read_signal <= '1';
    592615                                                                dat_request_decoder_en <= '1';          --autoriser le decodeur activer le dernier bit de request
    593616                                                                dat_data_out_pulse <= '0';     --transmettre le signal pour le dernier mot
    594617                                                                dat_priority_rotation <= '0';
    595618                                                                dat_exec<='1';
     619                                                                dat_Err<='0';
    596620                                                                push_dout<=fifo_out_signal(7 downto 4) & PORT_ID(3 downto 0);
    597621                                                       
     
    600624                                                                dat_fifo_read_signal <= rd_en_signal and port_granted;
    601625                                                                dat_request_decoder_en <= '1';
    602                                                                 dat_data_out_pulse <= '1';
     626                                                                dat_data_out_pulse <= port_granted;
    603627                                                                dat_priority_rotation <= '0';
    604628                                                                dat_exec<='1';
     629                                                                dat_Err<='0';
    605630                                                                push_dout<=fifo_out_signal;
    606631                                                               
     
    612637                                                                dat_priority_rotation <= '0';
    613638                                                                dat_exec<='1';
     639                                                                dat_Err<='0';
    614640                                                                push_dout<=fifo_out_signal;
    615641                                                               
     
    621647                                                                dat_priority_rotation <= '0';
    622648                                                                dat_exec<='1';
     649                                                                dat_Err<='0';
    623650                                                                push_dout<=fifo_out_signal;
    624651                                                               
     
    630657                                                                dat_data_out_pulse <= '0';
    631658                                                                dat_exec<='0';
     659                                                                dat_Err<='0';
    632660                                                                push_dout<=fifo_out_signal;
    633                
     661                when stateErr =>    dat_request_latch_en <= '0';
     662                                                                dat_pipeline_latch_en <= '0';
     663                                                                dat_priority_rotation <= '1';    -- libérer la priorité
     664                                                                dat_fifo_read_signal <= '0';
     665                                                                dat_request_decoder_en <= '0';   --libérer le décodeur
     666                                                                dat_data_out_pulse <= '0';
     667                                                                dat_exec<='1';
     668                                                                dat_Err<='1';
     669                                                                push_dout<=fifo_out_signal;
    634670                when others =>    dat_request_latch_en <= '0';
    635671                                                                dat_pipeline_latch_en <= '0';
     
    639675                                                                dat_data_out_pulse <= '0';
    640676                                                                dat_exec<='0';
     677                                                                dat_Err<='0';
    641678                                                                push_dout<=fifo_out_signal;
    642679                                                                               
     
    655692       
    656693           when cmdstart  =>
    657                                 if cmd_in_en='1' and dat_exec='0' and fifo_empty_signal='0' then
    658                                 cmdstate<=cmdwait;
     694                                if cmd_in_en='1' and dat_exec='0' and empty_latch='0' then
     695                                cmdstate<=cmdread;
    659696                                end if;
    660                 when cmdwait => if fifo_empty_signal='0' and port_granted ='1' then
     697                                cmdReadOk<='0';
     698                when cmdwait => if port_granted='1' then  -- demande du port de sortie
    661699                                                               
    662                                                                         cmdstate<=cmdread;
     700                                                                        cmdstate<=cmdsetdest;
     701                                                        elsif cmd_in_en='1' then
     702                                                                cmdstate<=cmdwait;
    663703                                                        else
    664704                                                                cmdstate<=cmdstart;
    665705                                                        end if;
     706                                                        cmdReadOk<='0';
    666707                when cmdread =>
    667                                 if port_granted ='1'then -- ne pas modifier l'état des priorités si on ne l'avait pas
     708--                              if port_granted ='1'then -- ne pas modifier l'état des priorités si on ne l'avait pas
    668709                                        cmdcode:= to_integer(unsigned(fifo_out_signal));
    669710                                        if cmdcode=1 then --code de getportid
    670                                                         cmdstate<=cmdsetdest;
     711                                                        cmdstate<=cmdwait;
     712                                                        cmdReadOk<='1';
    671713                                        else
    672                                                 if port_granted='1' then
    673                                                         cmdstate<=cmdend;
    674                                                 end if;
     714                                                        --ne pas prendre le code inconnu en compte
     715                                                        cmdstate<=cmdend; -- la commande n'a pas été reconnu
     716                                               
     717                                                cmdReadOk<='0';
    675718                                        end if;
    676                                 end if;
     719--                              end if;
    677720                when cmdsetdest =>
    678721                                if port_granted='1' then
    679722                                        cmdstate<=cmdsetcount;
    680723                                end if;
     724                                cmdReadOk<='0';
    681725                when cmdsetcount =>
    682726                                if port_granted='1' then
    683727                                        cmdstate<=cmdsetID;
     728                                else
     729                                        cmdstate<=cmdsetdest;
    684730                                end if;
     731                                cmdReadOk<='0';
    685732                when cmdsetID=>
    686733                        if port_granted='1' then
    687734                        cmdstate <=cmdpulse;
    688735                        end if;
     736                        cmdReadOk<='0';
    689737                when cmdpulse =>
    690738                        if port_granted='1' then
    691739                        cmdstate <=cmdEnd;
    692740                        end if;
     741                        cmdReadOk<='0';
    693742                when cmdend  =>
    694                        
     743                        if cmd_in_en='0' then --éviter l'exécution en boucle
    695744                                cmdstate<=cmdstart;
    696                        
    697                                
     745                        end if;
     746                        cmdReadOk<='0';
    698747         
    699748        end case;
     
    715764                                                cmd_data_signal<=(others=>'0');
    716765                                                cmd_data_out_pulse <= '0';
    717         when cmdwait =>
     766
     767        when cmdread =>
     768                                                cmd_exec<='1';
     769                                                cmd_pipeline_latch_en <= '0';
     770                                                cmd_fifo_read_signal <= '1'; -- vider le tampon d'entrée
     771                                                cmd_request_latch_en<='1';    --mémoriser l'adresse de destination
     772                                                cmd_request_decoder_en <= '1';                   --demande d'émission
     773                                                cmd_data_out_pulse <= '0';
     774                                                cmd_priority_rotation <= '1';                    --sans priorité
     775                                                cmd_data_signal<=Port_ID; 
     776                when cmdwait =>
    718777                                                cmd_exec<='1';
    719778                                                cmd_pipeline_latch_en <='0';
    720779                                                cmd_fifo_read_signal <= '0';
    721                                                 cmd_priority_rotation <= '1';    --sans priorité
    722                                                 cmd_request_latch_en<='0';
    723                                                 cmd_request_decoder_en <= not(fifo_empty_signal);   --demande d'émission
    724                                                 cmd_data_signal<=(others=>'0');
    725                                                 cmd_data_out_pulse <= '0';
    726         when cmdread =>
    727                                                 cmd_exec<='1';
    728                                                 cmd_pipeline_latch_en <= '1';
    729                                                 cmd_fifo_read_signal <= '0';
    730                                                 cmd_request_latch_en<='1';    --mémoriser l'adresse de destination
    731                                                 cmd_request_decoder_en <= '1';                   --demande d'émission
    732                                                 cmd_data_out_pulse <= '0';
    733                                                 cmd_priority_rotation <= '0';                    --avec priorité
    734                                                 --cmd_data_signal<=(others=>'0');
    735                                                 cmd_data_signal<=Port_ID; 
     780                                                cmd_request_latch_en<='1';
     781                                                cmd_priority_rotation <= '0';    --avec priorité
     782                                                cmd_request_decoder_en <= '1';   --demande d'émission
     783                                                cmd_data_signal<=Port_ID;
     784                                                cmd_data_out_pulse <= '0';                                     
    736785        when cmdsetdest  =>
    737786                                                --cmd_request_decoder_en <= '1';
    738787                                                cmd_exec<='1';
    739                                                 cmd_pipeline_latch_en <='1';
     788                                                cmd_pipeline_latch_en <='1'; --empiler dans le tampon de sortie la donnée
    740789                                                cmd_fifo_read_signal <='0';
    741790                                                cmd_request_latch_en<='0';
     
    744793                                                cmd_priority_rotation <= '0';
    745794                                                cmd_data_signal<=Port_ID;    -- le numéro du port et le nombre total des ports est envoyé
    746                                                
     795        when cmdsetcount =>
     796                                                                 
     797                                                cmd_exec<='1';   
     798                                                cmd_pipeline_latch_en <='1'; -- empiler dans le tampon de sortie les données
     799                                                cmd_fifo_read_signal <='0';
     800                                                cmd_request_latch_en<='0';  --enregistrer l'adresse de destination
     801                                                cmd_request_decoder_en <= '1';          --autoriser le decodeur activer le dernier bit de request
     802                                                cmd_data_out_pulse <= port_granted;
     803                                                cmd_priority_rotation <= '0';
     804                                                cmd_data_signal<=STD_LOGIC_VECTOR(to_unsigned(3,8));                                   
    747805        when cmdSetId =>
    748806                                                --cmd_request_decoder_en <= '1';
     
    750808                                                cmd_pipeline_latch_en <='1';
    751809                                                cmd_fifo_read_signal <='0';
    752                                                 cmd_request_latch_en<='0';
     810                                                cmd_request_latch_en<='0';                      --enregistrer l'adresse de destination
    753811                                                cmd_request_decoder_en <= '1';          --autoriser le decodeur à activer le dernier bit de request
    754                                                 cmd_data_out_pulse <= '1';
     812                                                cmd_data_out_pulse <= port_granted;
    755813                                                cmd_priority_rotation <= '0';
    756814                                                cmd_data_signal<=Port_ID;    -- le numéro du port et le nombre total des ports est envoyé
    757815                                                                                       
    758         when cmdsetcount =>
    759                                                                  
    760                                                 cmd_exec<='1';   
    761                                                 cmd_pipeline_latch_en <='1';
    762                                                 cmd_fifo_read_signal <='1';
    763                                                 cmd_request_latch_en<='0';
    764                                                 cmd_request_decoder_en <= '1';          --autoriser le decodeur activer le dernier bit de request
    765                                                 cmd_data_out_pulse <= port_granted;
    766                                                 cmd_priority_rotation <= '0';
    767                                                 cmd_data_signal<=STD_LOGIC_VECTOR(to_unsigned(3,8));
    768        
    769816        when cmdpulse =>        cmd_exec<='1';
    770817                                                cmd_pipeline_latch_en <='0';
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/Proto_receiv.vhd

    r22 r65  
    8181                                                                dlen:=to_integer(unsigned(fifo_out));
    8282                                                                mem(1)<=fifo_out; -- la longueur
    83                                                                 etrec<=r_data;
    8483                                                               
     84                                                                if dlen>2 then
     85                                                                        etrec<=r_data;
     86                                                                else
     87                                                                        etrec<=r_end;
     88                                                                end if;
    8589                                                                i:=1;
    8690                                                               
    8791                                                when r_data  =>
    8892                                                                if fifo_empty='0' then
    89                                                                         if i<dlen-3 then
     93                                                                        if i<dlen-2 then
    9094                                                                                i:=i+1;
    9195                                                                                mem(i)<=fifo_out;
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/SCHEDULER12_12.VHD

    r22 r65  
    5555 signal grant_latch : std_logic_vector(144 downto 1);
    5656 signal priority_rotation_en : std_logic;
    57  signal Grant :  std_logic_vector(144 downto 1);
     57 signal Grant,req_grant :  std_logic_vector(144 downto 1);
    5858 begin
    5959
    6060--validation de la rotation de priorité lorsque aucun port n'emet
    61  priority_rotation_en <= '1' when unsigned(priority_rotation) = 4095 else       '0';
     61req_grant<=(request and grant_latch);
     62 priority_rotation_en <= '1' when unsigned(req_grant) = 0 or unsigned(priority_rotation) = 4095 else    '0';
    6263--latch servant qui memorise le signal grant pendant a transmission
    6364grant_latch_process : process(clk)
     
    6667   if reset = '1' then
    6768                grant_latch <= (others => '0');
    68          elsif priority_rotation_en = '1' then
     69         elsif  priority_rotation_en = '1' or unsigned(Grant_latch)=0 then
    6970           grant_latch <= Grant;
    7071   end if;
    7172   end if;
    7273 end process;
    73  port_grant <= Grant and grant_latch;
     74 port_grant <= grant_latch;
    7475 Grant(1)  <= Signal_grant(1)(1) or Signal_grant(13)(1); --  Grant(1,1)
    7576Grant(2)  <= Signal_grant(2)(2) or Signal_grant(14)(2); --  Grant(1,2)
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/SCHEDULER13_13.VHD

    r22 r65  
    5555 signal grant_latch : std_logic_vector(169 downto 1);
    5656 signal priority_rotation_en : std_logic;
    57  signal Grant :  std_logic_vector(169 downto 1);
     57 signal Grant,req_grant :  std_logic_vector(169 downto 1);
    5858 begin
    5959
    6060--validation de la rotation de priorité lorsque aucun port n'emet
    61  priority_rotation_en <= '1' when unsigned(priority_rotation) = 8191 else       '0';
     61req_grant<=(request and grant_latch);
     62 priority_rotation_en <= '1' when unsigned(req_grant) = 0 or unsigned(priority_rotation) = 8191 else    '0';
    6263--latch servant qui memorise le signal grant pendant a transmission
    6364grant_latch_process : process(clk)
     
    6667   if reset = '1' then
    6768                grant_latch <= (others => '0');
    68          elsif priority_rotation_en = '1' then
     69         elsif priority_rotation_en = '1' or unsigned(Grant_latch)=0 then
    6970           grant_latch <= Grant;
    7071   end if;
    7172   end if;
    7273 end process;
    73  port_grant <= Grant and grant_latch;
     74 port_grant <= grant_latch;
    7475 Grant(1)  <= Signal_grant(1)(1) or Signal_grant(14)(1); --  Grant(1,1)
    7576Grant(2)  <= Signal_grant(2)(2) or Signal_grant(15)(2); --  Grant(1,2)
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/SCHEDULER14_14.VHD

    r22 r65  
    5555 signal grant_latch : std_logic_vector(196 downto 1);
    5656 signal priority_rotation_en : std_logic;
    57  signal Grant :  std_logic_vector(196 downto 1);
     57 signal Grant,req_grant :  std_logic_vector(196 downto 1);
    5858 begin
    5959
    6060--validation de la rotation de priorité lorsque aucun port n'emet
    61  priority_rotation_en <= '1' when unsigned(priority_rotation) = 16383 else      '0';
     61req_grant<=(request and grant_latch);
     62 priority_rotation_en <= '1' when unsigned(req_grant) = 0 or unsigned(priority_rotation) = 16383 else   '0';
    6263--latch servant qui memorise le signal grant pendant a transmission
    6364grant_latch_process : process(clk)
     
    6667   if reset = '1' then
    6768                grant_latch <= (others => '0');
    68          elsif priority_rotation_en = '1' then
     69         elsif priority_rotation_en = '1' or unsigned(Grant_latch)=0 then
    6970           grant_latch <= Grant;
    7071   end if;
    7172   end if;
    7273 end process;
    73  port_grant <= Grant and grant_latch;
     74 port_grant <= grant_latch;
    7475 Grant(1)  <= Signal_grant(1)(1) or Signal_grant(15)(1); --  Grant(1,1)
    7576Grant(2)  <= Signal_grant(2)(2) or Signal_grant(16)(2); --  Grant(1,2)
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/SCHEDULER15_15.VHD

    r22 r65  
    5555 signal grant_latch : std_logic_vector(225 downto 1);
    5656 signal priority_rotation_en : std_logic;
    57  signal Grant :  std_logic_vector(225 downto 1);
     57 signal Grant ,req_grant:  std_logic_vector(225 downto 1);
    5858 begin
    5959
    6060--validation de la rotation de priorité lorsque aucun port n'emet
    61  priority_rotation_en <= '1' when unsigned(priority_rotation) = 32767 else      '0';
     61req_grant<=(request and grant_latch);
     62 priority_rotation_en <= '1' when unsigned(req_grant)=0 or unsigned(priority_rotation) = 32767 else     '0';
    6263--latch servant qui memorise le signal grant pendant a transmission
    6364grant_latch_process : process(clk)
     
    6667   if reset = '1' then
    6768                grant_latch <= (others => '0');
    68          elsif priority_rotation_en = '1' then
     69         elsif priority_rotation_en = '1'or unsigned(Grant_latch)=0 then
    6970           grant_latch <= Grant;
    7071   end if;
    7172   end if;
    7273 end process;
    73  port_grant <= Grant and grant_latch;
     74 port_grant <= grant_latch;
    7475 Grant(1)  <= Signal_grant(1)(1) or Signal_grant(16)(1); --  Grant(1,1)
    7576Grant(2)  <= Signal_grant(2)(2) or Signal_grant(17)(2); --  Grant(1,2)
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/SCHEDULER16_16.VHD

    r22 r65  
    5555 signal grant_latch : std_logic_vector(256 downto 1);
    5656 signal priority_rotation_en : std_logic;
    57  signal Grant :  std_logic_vector(256 downto 1);
     57 signal Grant,req_grant :  std_logic_vector(256 downto 1);
    5858 begin
    5959
    60 --validation de la rotation de priorité lorsque aucun port n'emet
    61  priority_rotation_en <= '1' when unsigned(priority_rotation) = 65535 else      '0';
     60--validation de la rotation de priorité lorsque aucun port n'emet
     61req_grant<=(request and grant_latch);
     62 priority_rotation_en <= '1' when unsigned(req_grant) = 0 or unsigned(priority_rotation) = 65535 else   '0';
    6263--latch servant qui memorise le signal grant pendant a transmission
    6364grant_latch_process : process(clk)
     
    6667   if reset = '1' then
    6768                grant_latch <= (others => '0');
    68          elsif priority_rotation_en = '1' then
     69         elsif priority_rotation_en = '1' or unsigned(Grant_latch)=0  then
    6970           grant_latch <= Grant;
    7071   end if;
    7172   end if;
    7273 end process;
    73  port_grant <= Grant and grant_latch;
     74 port_grant <= grant_latch;
    7475 Grant(1)  <= Signal_grant(1)(1) or Signal_grant(17)(1); --  Grant(1,1)
    7576Grant(2)  <= Signal_grant(2)(2) or Signal_grant(18)(2); --  Grant(1,2)
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/SWITCH_GEN.vhd

    r45 r65  
    3232entity SWITCH_GEN is
    3333 --type portio is array(positive range) of std_logic_vector (7 downto 0);   
    34  generic(number_of_ports : positive := 4);
     34 generic(number_of_ports : positive := 8);
    3535     port(
    3636                -- ports d'entree
    3737           Port_in : in typ_portIO(1 to number_of_ports) ;
    38 --                        Port1_in : in  STD_LOGIC_VECTOR  (7 downto 0);
    39 --           Port2_in : in  STD_LOGIC_VECTOR  (7 downto 0);
    40 --           Port3_in : in  STD_LOGIC_VECTOR  (7 downto 0);
    41 --           Port4_in : in  STD_LOGIC_VECTOR  (7 downto 0);
    42 --                        Port5_in : in  STD_LOGIC_VECTOR  (7 downto 0);
    43 --           Port6_in : in  STD_LOGIC_VECTOR  (7 downto 0);
    44 --           Port7_in : in  STD_LOGIC_VECTOR  (7 downto 0);
    45 --           Port8_in : in  STD_LOGIC_VECTOR  (7 downto 0);
    46 --                        Port9_in : in  STD_LOGIC_VECTOR  (7 downto 0);
    47 --           Port10_in : in  STD_LOGIC_VECTOR (7 downto 0);
    48 --           Port11_in : in  STD_LOGIC_VECTOR (7 downto 0);
    49 --           Port12_in : in  STD_LOGIC_VECTOR (7 downto 0);
    50 --                        Port13_in : in  STD_LOGIC_VECTOR (7 downto 0);
    51 --           Port14_in : in  STD_LOGIC_VECTOR (7 downto 0);
    52 --           Port15_in : in  STD_LOGIC_VECTOR (7 downto 0);
    53 --           Port16_in : in  STD_LOGIC_VECTOR (7 downto 0);
     38
    5439                         
    5540                          -- port de sortie
    5641                          Port_out : out  typ_portIO(1 to number_of_ports);
    57 --                        Port1_out : out  STD_LOGIC_VECTOR (7 downto 0);
    58 --           Port2_out : out  STD_LOGIC_VECTOR (7 downto 0);
    59 --           Port3_out : out  STD_LOGIC_VECTOR (7 downto 0);
    60 --           Port4_out : out  STD_LOGIC_VECTOR (7 downto 0);
    61 --                        Port5_out : out  STD_LOGIC_VECTOR (7 downto 0);
    62 --           Port6_out : out  STD_LOGIC_VECTOR (7 downto 0);
    63 --           Port7_out : out  STD_LOGIC_VECTOR (7 downto 0);
    64 --           Port8_out : out  STD_LOGIC_VECTOR (7 downto 0);
    65 --                        Port9_out : out  STD_LOGIC_VECTOR (7 downto 0);
    66 --           Port10_out : out  STD_LOGIC_VECTOR (7 downto 0);
    67 --           Port11_out : out  STD_LOGIC_VECTOR (7 downto 0);
    68 --           Port12_out : out  STD_LOGIC_VECTOR (7 downto 0);
    69 --                        Port13_out : out  STD_LOGIC_VECTOR (7 downto 0);
    70 --           Port14_out : out  STD_LOGIC_VECTOR (7 downto 0);
    71 --           Port15_out : out  STD_LOGIC_VECTOR (7 downto 0);
    72 --           Port16_out : out  STD_LOGIC_VECTOR (7 downto 0);
     42
    7343                          -- signaux de controle
    7444                          data_in_en : in std_logic_vector(number_of_ports downto 1);
     
    8757
    8858COMPONENT INPUT_PORT_MODULE
    89   generic(number_of_ports : positive := 4;
     59  generic(number_of_ports : positive := 8;
    9060                        Port_num: natural);
    9161    Port ( data_in : in  STD_LOGIC_VECTOR (7 downto 0);
     
    12595                        );
    12696    Port (
    127                 --Port_in : in Typ_PortIO(1 to number_of_crossbar_ports);
    128                           Port1_in : in  STD_LOGIC_VECTOR (7 downto 0);
     97                clk : in  STD_LOGIC;
     98                        reset : in  STD_LOGIC;
     99                        Port1_in : in  STD_LOGIC_VECTOR (7 downto 0);
    129100           Port2_in : in  STD_LOGIC_VECTOR (7 downto 0);
    130101           Port3_in : in  STD_LOGIC_VECTOR (7 downto 0);
     
    213184
    214185--declaration des signaux de connection entre les modules du switch
    215 --type port_connection_type is array(16 downto 1) of std_logic_vector(7 downto 1);
    216 --signal crossbar_port_in_connetion : port_connection_type;
    217 --signal crossbar_port_out_connetion :port_connection_type;
    218 --signal request_connection : std_logic_vector(number_of_ports*number_of_ports downto 1);
    219 --signal grant_connection : std_logic_vector(number_of_ports*number_of_ports downto 1);
    220 --signal priority_rotation_connection : std_logic_vector(number_of_ports downto 1);
    221 --signal fifo_out_full_connection : std_logic_vector(1 to number_of_ports);
    222 --signal crossbar_in_pulse(_connection : std_logic_vector(number_of_ports downto 1);
    223 --signal crossbar_out_pulse_connection : std_logic_vector(number_of_ports downto 1);
    224 --variable i,j : integer;
    225186
    226187Signal Request_signal : STD_LOGIC_VECTOR(number_of_ports*number_of_ports downto 1);
     
    231192signal crossbar_in_port :  Typ_PortIO(1 to number_of_ports);
    232193
    233 --signal crossbar_in_port1 : std_logic_vector(7 downto 0);
    234 --signal crossbar_in_port2 : std_logic_vector(7 downto 0);
    235 --signal crossbar_in_port3 : std_logic_vector(7 downto 0);
    236 --signal crossbar_in_port4 : std_logic_vector(7 downto 0);
    237 --signal crossbar_in_port5 : std_logic_vector(7 downto 0);
    238 --signal crossbar_in_port6 : std_logic_vector(7 downto 0);
    239 --signal crossbar_in_port7 : std_logic_vector(7 downto 0);
    240 --signal crossbar_in_port8 : std_logic_vector(7 downto 0);
    241 --signal crossbar_in_port9 : std_logic_vector(7 downto 0);
    242 --signal crossbar_in_port10 : std_logic_vector(7 downto 0);
    243 --signal crossbar_in_port11 : std_logic_vector(7 downto 0);
    244 --signal crossbar_in_port12 : std_logic_vector(7 downto 0);
    245 --signal crossbar_in_port13 : std_logic_vector(7 downto 0);
    246 --signal crossbar_in_port14 : std_logic_vector(7 downto 0);
    247 --signal crossbar_in_port15 : std_logic_vector(7 downto 0);
    248 --signal crossbar_in_port16 : std_logic_vector(7 downto 0);
     194
    249195
    250196signal crossbar_out_port  :  Typ_PortIO(1 to number_of_ports);
    251 --signal crossbar_out_port1 : std_logic_vector(7 downto 0);
    252 --signal crossbar_out_port2 : std_logic_vector(7 downto 0);
    253 --signal crossbar_out_port3 : std_logic_vector(7 downto 0);
    254 --signal crossbar_out_port4 : std_logic_vector(7 downto 0);
    255 --signal crossbar_out_port5 : std_logic_vector(7 downto 0);
    256 --signal crossbar_out_port6 : std_logic_vector(7 downto 0);
    257 --signal crossbar_out_port7 : std_logic_vector(7 downto 0);
    258 --signal crossbar_out_port8 : std_logic_vector(7 downto 0);
    259 --signal crossbar_out_port9 : std_logic_vector(7 downto 0);
    260 --signal crossbar_out_port10 : std_logic_vector(7 downto 0);
    261 --signal crossbar_out_port11 : std_logic_vector(7 downto 0);
    262 --signal crossbar_out_port12 : std_logic_vector(7 downto 0);
    263 --signal crossbar_out_port13 : std_logic_vector(7 downto 0);
    264 --signal crossbar_out_port14 : std_logic_vector(7 downto 0);
    265 --signal crossbar_out_port15 : std_logic_vector(7 downto 0);
    266 --signal crossbar_out_port16 : std_logic_vector(7 downto 0);
     197
    267198
    268199signal crossbar_in_pulse  : std_logic_vector(number_of_ports downto 1);
    269 --signal crossbar_in_pulse1 : std_logic;
    270 --signal crossbar_in_pulse2 : std_logic;
    271 --signal crossbar_in_pulse3 : std_logic;
    272 --signal crossbar_in_pulse4 : std_logic;
    273 --signal crossbar_in_pulse5 : std_logic;
    274 --signal crossbar_in_pulse6 : std_logic;
    275 --signal crossbar_in_pulse7 : std_logic;
    276 --signal crossbar_in_pulse8 : std_logic;
    277 --signal crossbar_in_pulse9 : std_logic;
    278 --signal crossbar_in_pulse10 : std_logic;
    279 --signal crossbar_in_pulse11 : std_logic;
    280 --signal crossbar_in_pulse12 : std_logic;
    281 --signal crossbar_in_pulse13 : std_logic;
    282 --signal crossbar_in_pulse14 : std_logic;
    283 --signal crossbar_in_pulse15 : std_logic;
    284 --signal crossbar_in_pulse16 : std_logic;
     200
    285201
    286202signal crossbar_out_pulse  : std_logic_vector(number_of_ports downto 1);
    287 --signal crossbar_out_pulse1 : std_logic;
    288 --signal crossbar_out_pulse2 : std_logic;
    289 --signal crossbar_out_pulse3 : std_logic;
    290 --signal crossbar_out_pulse4 : std_logic;
    291 --signal crossbar_out_pulse5 : std_logic;
    292 --signal crossbar_out_pulse6 : std_logic;
    293 --signal crossbar_out_pulse7 : std_logic;
    294 --signal crossbar_out_pulse8 : std_logic;
    295 --signal crossbar_out_pulse9 : std_logic;
    296 --signal crossbar_out_pulse10 : std_logic;
    297 --signal crossbar_out_pulse11 : std_logic;
    298 --signal crossbar_out_pulse12 : std_logic;
    299 --signal crossbar_out_pulse13 : std_logic;
    300 --signal crossbar_out_pulse14 : std_logic;
    301 --signal crossbar_out_pulse15 : std_logic;
    302 --signal crossbar_out_pulse16 : std_logic;
     203
    303204
    304205
     
    428329--j=number_of_ports*(i-1);
    429330PORTx4_INPUT_PORT_MODULE: INPUT_PORT_MODULE
    430 GENERIC MAP(number_of_ports =>4,Port_num=>i)
     331GENERIC MAP(number_of_ports =>number_of_ports,Port_num=>i)
    431332PORT MAP(
    432333   data_in => Port_in(i),
     
    62816182GENERIC MAP(number_of_crossbar_ports =>2)
    62826183  PORT MAP(
     6184                reset => reset,
     6185     clk => clk,
    62836186   Port1_in => crossbar_in_port(1),
    62846187   Port2_in => crossbar_in_port(2),
     
    63276230GENERIC MAP(number_of_crossbar_ports =>3)
    63286231  PORT MAP(
    6329    Port1_in => crossbar_in_port(1),
     6232                reset => reset,
     6233     clk => clk,
     6234        Port1_in => crossbar_in_port(1),
    63306235   Port2_in => crossbar_in_port(2),
    63316236   Port3_in => crossbar_in_port(3),
     
    63756280GENERIC MAP(number_of_crossbar_ports =>4)
    63766281  PORT MAP(
     6282                reset => reset,
     6283     clk => clk, 
    63776284   Port1_in => crossbar_in_port(1),
    63786285   Port2_in => crossbar_in_port(2),
     
    64256332GENERIC MAP(number_of_crossbar_ports =>5)
    64266333  PORT MAP(
     6334                reset => reset,
     6335     clk => clk,
    64276336   Port1_in => crossbar_in_port(1),
    64286337   Port2_in => crossbar_in_port(2),
     
    64776386GENERIC MAP(number_of_crossbar_ports =>6)
    64786387  PORT MAP(
     6388 
     6389                reset => reset,
     6390     clk => clk,
    64796391   Port1_in => crossbar_in_port(1),
    64806392   Port2_in => crossbar_in_port(2),
     
    65316443GENERIC MAP(number_of_crossbar_ports =>7)
    65326444  PORT MAP(
     6445                reset => reset,
     6446     clk => clk,
    65336447   Port1_in => crossbar_in_port(1),
    65346448   Port2_in => crossbar_in_port(2),
     
    65876501GENERIC MAP(number_of_crossbar_ports =>8)
    65886502  PORT MAP(
     6503    reset => reset,
     6504   clk =>clk,
    65896505   Port1_in => crossbar_in_port(1),
    65906506   Port2_in => crossbar_in_port(2),
     
    66456561GENERIC MAP(number_of_crossbar_ports =>9)
    66466562  PORT MAP(
     6563                reset => reset,
     6564     clk => clk,
    66476565   Port1_in => crossbar_in_port(1),
    66486566   Port2_in => crossbar_in_port(2),
     
    67056623GENERIC MAP(number_of_crossbar_ports =>10)
    67066624  PORT MAP(
     6625        reset => reset,
     6626   clk => clk,
    67076627   Port1_in => crossbar_in_port(1),
    67086628   Port2_in => crossbar_in_port(2),
     
    67676687GENERIC MAP(number_of_crossbar_ports =>11)
    67686688  PORT MAP(
     6689        reset => reset,
     6690   clk => clk,
    67696691   Port1_in => crossbar_in_port(1),
    67706692   Port2_in => crossbar_in_port(2),
     
    68316753GENERIC MAP(number_of_crossbar_ports =>12)
    68326754  PORT MAP(
     6755        reset => reset,
     6756   clk => clk,
    68336757   Port1_in => crossbar_in_port(1),
    68346758   Port2_in => crossbar_in_port(2),
     
    68976821GENERIC MAP(number_of_crossbar_ports =>13)
    68986822  PORT MAP(
     6823        reset => reset,
     6824   clk => clk,
    68996825   Port1_in => crossbar_in_port(1),
    69006826   Port2_in => crossbar_in_port(2),
     
    69656891GENERIC MAP(number_of_crossbar_ports =>14)
    69666892  PORT MAP(
     6893        reset => reset,
     6894   clk => clk,
    69676895   Port1_in => crossbar_in_port(1),
    69686896   Port2_in => crossbar_in_port(2),
     
    70356963GENERIC MAP(number_of_crossbar_ports =>15)
    70366964  PORT MAP(
     6965        reset => reset,
     6966   clk => clk,
    70376967   Port1_in => crossbar_in_port(1),
    70386968   Port2_in => crossbar_in_port(2),
     
    71077037GENERIC MAP(number_of_crossbar_ports =>16)
    71087038  PORT MAP(
     7039        reset => reset,
     7040   clk => clk,
    71097041   Port1_in => crossbar_in_port(1),
    71107042   Port2_in => crossbar_in_port(2),
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/Scheduler.vhd

    r22 r65  
    4242               
    4343architecture Behavioral of Scheduler is
     44-- signaux pour le pipeline;
     45signal Request_latch :STD_LOGIC_VECTOR (number_of_ports*number_of_ports downto 1):=(others=>'0');
     46signal Fifo_full_latch : STD_LOGIC_VECTOR (number_of_ports downto 1):=(others=>'0');
     47signal priority_rotation_latch : STD_LOGIC_VECTOR (number_of_ports downto 1):=(others=>'1');
     48         
    4449-- composants du scheduler
    45 
    46 -- composants du scheduler
    47 
    48 
    4950COMPONENT Scheduler2_2
    5051   PORT(
     
    225226  Inst_Scheduler2_2 : Scheduler2_2
    226227   PORT MAP(
     228     Request => Request_latch,
     229     Fifo_full => Fifo_full_latch,
     230     clk => clk ,
     231     reset =>reset,
     232     priority_rotation =>priority_rotation_latch,
     233     port_grant =>port_grant);
     234end generate scheduler2x2;
     235
     236--======================scheduler 3 ports=======================
     237
     238scheduler3x3 : if number_of_ports = 3 generate
     239
     240  Inst_Scheduler3_3 : Scheduler3_3
     241   PORT MAP(
     242     Request => Request_latch,
     243     Fifo_full => Fifo_full_latch,
     244     clk => clk ,
     245     reset =>reset,
     246     priority_rotation =>priority_rotation_latch,
     247     port_grant =>port_grant);
     248end generate scheduler3x3;
     249
     250--======================scheduler 4 ports=======================
     251
     252scheduler4x4 : if number_of_ports = 4 generate
     253
     254  Inst_Scheduler4_4 : Scheduler4_4
     255   PORT MAP(
     256     Request => Request_latch,
     257     Fifo_full => Fifo_full_latch,
     258     clk => clk ,
     259     reset =>reset,
     260     priority_rotation =>priority_rotation_latch,
     261     port_grant =>port_grant);
     262end generate scheduler4x4;
     263
     264--======================scheduler 5 ports=======================
     265
     266scheduler5x5 : if number_of_ports = 5 generate
     267
     268  Inst_Scheduler5_5 : Scheduler5_5
     269   PORT MAP(
    227270     Request => Request,
    228271     Fifo_full => Fifo_full,
     
    231274     priority_rotation =>priority_rotation,
    232275     port_grant =>port_grant);
    233 end generate scheduler2x2;
    234 
    235 --======================scheduler 3 ports=======================
    236 
    237 scheduler3x3 : if number_of_ports = 3 generate
    238 
    239   Inst_Scheduler3_3 : Scheduler3_3
     276end generate scheduler5x5;
     277
     278--======================scheduler 6 ports=======================
     279
     280scheduler6x6 : if number_of_ports = 6 generate
     281
     282  Inst_Scheduler6_6 : Scheduler6_6
     283   PORT MAP(
     284     Request => Request_latch,
     285     Fifo_full => Fifo_full_latch,
     286     clk => clk ,
     287     reset =>reset,
     288     priority_rotation =>priority_rotation_latch,
     289     port_grant =>port_grant);
     290end generate scheduler6x6;
     291
     292--======================scheduler 7 ports=======================
     293
     294scheduler7x7 : if number_of_ports = 7 generate
     295
     296  Inst_Scheduler7_7 : Scheduler7_7
     297   PORT MAP(
     298     Request => Request_latch,
     299     Fifo_full => Fifo_full_latch,
     300     clk => clk ,
     301     reset =>reset,
     302     priority_rotation =>priority_rotation_latch,
     303     port_grant =>port_grant);
     304end generate scheduler7x7;
     305
     306--======================scheduler 8 ports=======================
     307
     308scheduler8x8 : if number_of_ports = 8 generate
     309
     310  Inst_Scheduler8_8 : Scheduler8_8
     311   PORT MAP(
     312     Request => Request_latch,
     313     Fifo_full => Fifo_full_latch,
     314     clk => clk ,
     315     reset =>reset,
     316     priority_rotation =>priority_rotation_latch,
     317     port_grant =>port_grant);
     318end generate scheduler8x8;
     319
     320--======================scheduler 9 ports=======================
     321
     322scheduler9x9 : if number_of_ports = 9 generate
     323
     324  Inst_Scheduler9_9 : Scheduler9_9
     325   PORT MAP(
     326     Request => Request_latch,
     327     Fifo_full => Fifo_full_latch,
     328     clk => clk ,
     329     reset =>reset,
     330     priority_rotation =>priority_rotation_latch,
     331     port_grant =>port_grant);
     332end generate scheduler9x9;
     333
     334--======================scheduler 10 ports=======================
     335
     336scheduler10x10 : if number_of_ports = 10 generate
     337
     338  Inst_Scheduler10_10 : Scheduler10_10
    240339   PORT MAP(
    241340     Request => Request,
     
    245344     priority_rotation =>priority_rotation,
    246345     port_grant =>port_grant);
    247 end generate scheduler3x3;
    248 
    249 --======================scheduler 4 ports=======================
    250 
    251 scheduler4x4 : if number_of_ports = 4 generate
    252 
    253   Inst_Scheduler4_4 : Scheduler4_4
     346end generate scheduler10x10;
     347
     348--======================scheduler 11 ports=======================
     349
     350scheduler11x11 : if number_of_ports = 11 generate
     351
     352  Inst_Scheduler11_11 : Scheduler11_11
    254353   PORT MAP(
    255354     Request => Request,
     
    259358     priority_rotation =>priority_rotation,
    260359     port_grant =>port_grant);
    261 end generate scheduler4x4;
    262 
    263 --======================scheduler 5 ports=======================
    264 
    265 scheduler5x5 : if number_of_ports = 5 generate
    266 
    267   Inst_Scheduler5_5 : Scheduler5_5
    268    PORT MAP(
    269      Request => Request,
    270      Fifo_full => Fifo_full,
    271      clk => clk ,
    272      reset =>reset,
    273      priority_rotation =>priority_rotation,
    274      port_grant =>port_grant);
    275 end generate scheduler5x5;
    276 
    277 --======================scheduler 6 ports=======================
    278 
    279 scheduler6x6 : if number_of_ports = 6 generate
    280 
    281   Inst_Scheduler6_6 : Scheduler6_6
    282    PORT MAP(
    283      Request => Request,
    284      Fifo_full => Fifo_full,
    285      clk => clk ,
    286      reset =>reset,
    287      priority_rotation =>priority_rotation,
    288      port_grant =>port_grant);
    289 end generate scheduler6x6;
    290 
    291 --======================scheduler 7 ports=======================
    292 
    293 scheduler7x7 : if number_of_ports = 7 generate
    294 
    295   Inst_Scheduler7_7 : Scheduler7_7
    296    PORT MAP(
    297      Request => Request,
    298      Fifo_full => Fifo_full,
    299      clk => clk ,
    300      reset =>reset,
    301      priority_rotation =>priority_rotation,
    302      port_grant =>port_grant);
    303 end generate scheduler7x7;
    304 
    305 --======================scheduler 8 ports=======================
    306 
    307 scheduler8x8 : if number_of_ports = 8 generate
    308 
    309   Inst_Scheduler8_8 : Scheduler8_8
    310    PORT MAP(
    311      Request => Request,
    312      Fifo_full => Fifo_full,
    313      clk => clk ,
    314      reset =>reset,
    315      priority_rotation =>priority_rotation,
    316      port_grant =>port_grant);
    317 end generate scheduler8x8;
    318 
    319 --======================scheduler 9 ports=======================
    320 
    321 scheduler9x9 : if number_of_ports = 9 generate
    322 
    323   Inst_Scheduler9_9 : Scheduler9_9
    324    PORT MAP(
    325      Request => Request,
    326      Fifo_full => Fifo_full,
    327      clk => clk ,
    328      reset =>reset,
    329      priority_rotation =>priority_rotation,
    330      port_grant =>port_grant);
    331 end generate scheduler9x9;
    332 
    333 --======================scheduler 10 ports=======================
    334 
    335 scheduler10x10 : if number_of_ports = 10 generate
    336 
    337   Inst_Scheduler10_10 : Scheduler10_10
    338    PORT MAP(
    339      Request => Request,
    340      Fifo_full => Fifo_full,
    341      clk => clk ,
    342      reset =>reset,
    343      priority_rotation =>priority_rotation,
    344      port_grant =>port_grant);
    345 end generate scheduler10x10;
    346 
    347 --======================scheduler 11 ports=======================
    348 
    349 scheduler11x11 : if number_of_ports = 11 generate
    350 
    351   Inst_Scheduler11_11 : Scheduler11_11
    352    PORT MAP(
    353      Request => Request,
    354      Fifo_full => Fifo_full,
    355      clk => clk ,
    356      reset =>reset,
    357      priority_rotation =>priority_rotation,
    358      port_grant =>port_grant);
    359360end generate scheduler11x11;
    360361
     
    365366  Inst_Scheduler12_12 : Scheduler12_12
    366367   PORT MAP(
    367      Request => Request,
    368      Fifo_full => Fifo_full,
    369      clk => clk ,
    370      reset =>reset,
    371      priority_rotation =>priority_rotation,
     368     Request => Request_latch,
     369     Fifo_full => Fifo_full_latch,
     370     clk => clk ,
     371     reset =>reset,
     372     priority_rotation =>priority_rotation_latch,
    372373     port_grant =>port_grant);
    373374end generate scheduler12x12;
     
    379380  Inst_Scheduler13_13 : Scheduler13_13
    380381   PORT MAP(
    381      Request => Request,
    382      Fifo_full => Fifo_full,
    383      clk => clk ,
    384      reset =>reset,
    385      priority_rotation =>priority_rotation,
     382     Request => Request_latch,
     383     Fifo_full => Fifo_full_latch,
     384     clk => clk ,
     385     reset =>reset,
     386     priority_rotation =>priority_rotation_latch,
    386387     port_grant =>port_grant);
    387388end generate scheduler13x13;
     
    393394  Inst_Scheduler14_14 : Scheduler14_14
    394395   PORT MAP(
    395      Request => Request,
    396      Fifo_full => Fifo_full,
    397      clk => clk ,
    398      reset =>reset,
    399      priority_rotation =>priority_rotation,
     396     Request => Request_latch,
     397     Fifo_full => Fifo_full_latch,
     398     clk => clk ,
     399     reset =>reset,
     400     priority_rotation =>priority_rotation_latch,
    400401     port_grant =>port_grant);
    401402end generate scheduler14x14;
     
    407408  Inst_Scheduler15_15 : Scheduler15_15
    408409   PORT MAP(
    409      Request => Request,
    410      Fifo_full => Fifo_full,
    411      clk => clk ,
    412      reset =>reset,
    413      priority_rotation =>priority_rotation,
     410     Request => Request_latch,
     411     Fifo_full => Fifo_full_latch,
     412     clk => clk ,
     413     reset =>reset,
     414     priority_rotation =>priority_rotation_latch,
    414415     port_grant =>port_grant);
    415416end generate scheduler15x15;
     
    421422  Inst_Scheduler16_16 : Scheduler16_16
    422423   PORT MAP(
    423      Request => Request,
    424      Fifo_full => Fifo_full,
    425      clk => clk ,
    426      reset =>reset,
    427      priority_rotation =>priority_rotation,
     424     Request => Request_latch,
     425     Fifo_full => Fifo_full_latch,
     426     clk => clk ,
     427     reset =>reset,
     428     priority_rotation =>priority_rotation_latch,
    428429     port_grant =>port_grant);
    429430end generate scheduler16x16;
    430 
     431Sched:process (clk,reset)
     432begin
     433if rising_edge(clk) then
     434        if reset='1' then
     435                request_latch<=(others=>'0');
     436                Fifo_full_latch<=(others=>'0');
     437                priority_rotation_latch<=(others=>'1');
     438        else
     439                request_latch<=request;
     440                Fifo_full_latch<=fifo_full;
     441                priority_rotation_latch<=priority_rotation;
     442        end if;
     443end if;
     444end process sched;
    431445end Behavioral;
    432446
  • PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/proto_send.vhd

    r22 r65  
    5050 signal sfifo_in : std_logic_vector(Word-1 downto 0);
    5151 signal spush : std_logic:='0';
     52 signal err : std_logic_vector(Word-1 downto 0):=(others =>'0');
    5253begin
    5354
     
    5758        if reset='1' then
    5859                                 etsnd<=s_head;
    59                                  
     60                                 err<=(others =>'0');
    6061                                else 
    6162                                                if rising_edge(clk) then -- le process s'exécute sur chaque front
     
    7980                                                        i:=i+1;
    8081                                                        dlen:=to_integer(unsigned(mem(i)));
    81                                                         spush<='1';
    82                                                         snd_comp<='0';
    83                                                         etsnd<=s_data;
     82                                                        if dlen > 2 then
     83                                                                spush<='1';
     84                                                                snd_comp<='0';
     85                                                                etsnd<=s_data;
     86                                                        else
     87                                                                spush<='1';
     88                                                                snd_comp<='1';
     89                                                                etsnd<=s_end;
     90                                                       
     91                                                        end if;
    8492                                                when s_len2 =>
    8593                                                        snd_comp<='0';
     
    8795                                                               
    8896                                                when s_data  =>
    89                                                                 if fifo_full='0' then
     97                                                                if (fifo_full='0') and (dlen >2) then
    9098                                                                i:=i+1;
    9199                                                                sfifo_in<=mem(i);
    92                                                                         if i=dlen-2 then
     100                                                                        if i>=dlen-1 then --les indices 0 et 1 étant réservés
     101                                                                                                                        --les données sont comptés à partir de 2
    93102                                                                                etsnd<=s_end;
    94103                                                                                snd_comp<='1';
Note: See TracChangeset for help on using the changeset viewer.