source: PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/OLD_VERSION/Scheduler.vhd @ 24

Last change on this file since 24 was 24, checked in by rolagamo, 12 years ago
File size: 12.2 KB
Line 
1----------------------------------------------------------------------------------
2-- Company:
3-- Engineer: KIEGAING EMMANUEL GEL EN 5
4--
5-- Create Date:    19:56:34 05/06/2011
6-- Design Name:
7-- Module Name:    Sheduler - Behavioral
8-- Project Name:
9-- Target Devices:
10-- Tool versions:
11-- Description: Module de l'ordonnanceur du switch crossbar
12-- l'algorithme utilisé est le DPA (diagonal propagation arbiter)
13-- intencie un scheduler particulier en fonction du nombre de port
14-- Dependencies:
15--
16-- Revision: 1.0
17-- reconstruction du dpa
18-- Revision 0.01 - File Created
19-- Additional Comments:
20--
21----------------------------------------------------------------------------------
22library IEEE;
23use IEEE.STD_LOGIC_1164.ALL;
24use IEEE.STD_LOGIC_ARITH.ALL;
25use IEEE.STD_LOGIC_UNSIGNED.ALL;
26--use Work.Sheduler_package.all;
27
28---- Uncomment the following library declaration if instantiating
29---- any Xilinx primitives in this code.
30--library UNISIM;
31--use UNISIM.VComponents.all;
32
33entity Scheduler is
34   generic(number_of_ports : positive := 4);
35    Port ( Request : in  STD_LOGIC_VECTOR (number_of_ports*number_of_ports downto 1);
36                          Fifo_full : in STD_LOGIC_VECTOR (number_of_ports downto 1);
37           clk : in  STD_LOGIC;
38                reset : in  STD_LOGIC;
39                          priority_rotation : in  STD_LOGIC_VECTOR (number_of_ports downto 1);
40           port_grant : out  STD_LOGIC_VECTOR (number_of_ports*number_of_ports downto 1));
41      end Scheduler;
42               
43architecture Behavioral of Scheduler is
44-- composants du scheduler
45
46-- composants du scheduler
47
48
49COMPONENT Scheduler2_2
50   PORT(
51      Request : IN std_logic_vector(4 downto 1);
52      Fifo_full : IN std_logic_vector(2 downto 1);
53      clk : IN std_logic;
54      reset : IN std_logic;
55      port_grant : OUT std_logic_vector(4 downto 1);
56      priority_rotation : in  STD_LOGIC_VECTOR (2 downto 1)
57   );
58 END COMPONENT;
59
60COMPONENT Scheduler3_3
61   PORT(
62      Request : IN std_logic_vector(9 downto 1);
63      Fifo_full : IN std_logic_vector(3 downto 1);
64      clk : IN std_logic;
65      reset : IN std_logic;
66      port_grant : OUT std_logic_vector(9 downto 1);
67      priority_rotation : in  STD_LOGIC_VECTOR (3 downto 1)
68   );
69 END COMPONENT;
70
71COMPONENT Scheduler4_4
72   PORT(
73      Request : IN std_logic_vector(16 downto 1);
74      Fifo_full : IN std_logic_vector(4 downto 1);
75      clk : IN std_logic;
76      reset : IN std_logic;
77      port_grant : OUT std_logic_vector(16 downto 1);
78      priority_rotation : in  STD_LOGIC_VECTOR (4 downto 1)
79   );
80 END COMPONENT;
81
82COMPONENT Scheduler5_5
83   PORT(
84      Request : IN std_logic_vector(25 downto 1);
85      Fifo_full : IN std_logic_vector(5 downto 1);
86      clk : IN std_logic;
87      reset : IN std_logic;
88      port_grant : OUT std_logic_vector(25 downto 1);
89      priority_rotation : in  STD_LOGIC_VECTOR (5 downto 1)
90   );
91 END COMPONENT;
92
93COMPONENT Scheduler6_6
94   PORT(
95      Request : IN std_logic_vector(36 downto 1);
96      Fifo_full : IN std_logic_vector(6 downto 1);
97      clk : IN std_logic;
98      reset : IN std_logic;
99      port_grant : OUT std_logic_vector(36 downto 1);
100      priority_rotation : in  STD_LOGIC_VECTOR (6 downto 1)
101   );
102 END COMPONENT;
103
104COMPONENT Scheduler7_7
105   PORT(
106      Request : IN std_logic_vector(49 downto 1);
107      Fifo_full : IN std_logic_vector(7 downto 1);
108      clk : IN std_logic;
109      reset : IN std_logic;
110      port_grant : OUT std_logic_vector(49 downto 1);
111      priority_rotation : in  STD_LOGIC_VECTOR (7 downto 1)
112   );
113 END COMPONENT;
114
115COMPONENT Scheduler8_8
116   PORT(
117      Request : IN std_logic_vector(64 downto 1);
118      Fifo_full : IN std_logic_vector(8 downto 1);
119      clk : IN std_logic;
120      reset : IN std_logic;
121      port_grant : OUT std_logic_vector(64 downto 1);
122      priority_rotation : in  STD_LOGIC_VECTOR (8 downto 1)
123   );
124 END COMPONENT;
125
126COMPONENT Scheduler9_9
127   PORT(
128      Request : IN std_logic_vector(81 downto 1);
129      Fifo_full : IN std_logic_vector(9 downto 1);
130      clk : IN std_logic;
131      reset : IN std_logic;
132      port_grant : OUT std_logic_vector(81 downto 1);
133      priority_rotation : in  STD_LOGIC_VECTOR (9 downto 1)
134   );
135 END COMPONENT;
136
137COMPONENT Scheduler10_10
138   PORT(
139      Request : IN std_logic_vector(100 downto 1);
140      Fifo_full : IN std_logic_vector(10 downto 1);
141      clk : IN std_logic;
142      reset : IN std_logic;
143      port_grant : OUT std_logic_vector(100 downto 1);
144      priority_rotation : in  STD_LOGIC_VECTOR (10 downto 1)
145   );
146 END COMPONENT;
147
148COMPONENT Scheduler11_11
149   PORT(
150      Request : IN std_logic_vector(121 downto 1);
151      Fifo_full : IN std_logic_vector(11 downto 1);
152      clk : IN std_logic;
153      reset : IN std_logic;
154      port_grant : OUT std_logic_vector(121 downto 1);
155      priority_rotation : in  STD_LOGIC_VECTOR (11 downto 1)
156   );
157 END COMPONENT;
158
159COMPONENT Scheduler12_12
160   PORT(
161      Request : IN std_logic_vector(144 downto 1);
162      Fifo_full : IN std_logic_vector(12 downto 1);
163      clk : IN std_logic;
164      reset : IN std_logic;
165      port_grant : OUT std_logic_vector(144 downto 1);
166      priority_rotation : in  STD_LOGIC_VECTOR (12 downto 1)
167   );
168 END COMPONENT;
169
170COMPONENT Scheduler13_13
171   PORT(
172      Request : IN std_logic_vector(169 downto 1);
173      Fifo_full : IN std_logic_vector(13 downto 1);
174      clk : IN std_logic;
175      reset : IN std_logic;
176      port_grant : OUT std_logic_vector(169 downto 1);
177      priority_rotation : in  STD_LOGIC_VECTOR (13 downto 1)
178   );
179 END COMPONENT;
180
181COMPONENT Scheduler14_14
182   PORT(
183      Request : IN std_logic_vector(196 downto 1);
184      Fifo_full : IN std_logic_vector(14 downto 1);
185      clk : IN std_logic;
186      reset : IN std_logic;
187      port_grant : OUT std_logic_vector(196 downto 1);
188      priority_rotation : in  STD_LOGIC_VECTOR (14 downto 1)
189   );
190 END COMPONENT;
191
192COMPONENT Scheduler15_15
193   PORT(
194      Request : IN std_logic_vector(225 downto 1);
195      Fifo_full : IN std_logic_vector(15 downto 1);
196      clk : IN std_logic;
197      reset : IN std_logic;
198      port_grant : OUT std_logic_vector(225 downto 1);
199      priority_rotation : in  STD_LOGIC_VECTOR (15 downto 1)
200   );
201 END COMPONENT;
202
203COMPONENT Scheduler16_16
204   PORT(
205      Request : IN std_logic_vector(256 downto 1);
206      Fifo_full : IN std_logic_vector(16 downto 1);
207      clk : IN std_logic;
208      reset : IN std_logic;
209      port_grant : OUT std_logic_vector(256 downto 1);
210      priority_rotation : in  STD_LOGIC_VECTOR (16 downto 1)
211   );
212 END COMPONENT;
213
214
215-- instanciation des scheduler
216--======================scheduler 2 ports=======================
217
218begin
219
220-- instanciation des scheduler
221--======================scheduler 2 ports=======================
222
223scheduler2x2 : if number_of_ports = 2 generate
224
225  Inst_Scheduler2_2 : Scheduler2_2
226   PORT MAP(
227     Request => Request, 
228     Fifo_full => Fifo_full,
229     clk => clk ,
230     reset =>reset,
231     priority_rotation =>priority_rotation,
232     port_grant =>port_grant);
233end generate scheduler2x2; 
234
235--======================scheduler 3 ports=======================
236
237scheduler3x3 : if number_of_ports = 3 generate
238
239  Inst_Scheduler3_3 : Scheduler3_3
240   PORT MAP(
241     Request => Request, 
242     Fifo_full => Fifo_full,
243     clk => clk ,
244     reset =>reset,
245     priority_rotation =>priority_rotation,
246     port_grant =>port_grant);
247end generate scheduler3x3; 
248
249--======================scheduler 4 ports=======================
250
251scheduler4x4 : if number_of_ports = 4 generate
252
253  Inst_Scheduler4_4 : Scheduler4_4
254   PORT MAP(
255     Request => Request, 
256     Fifo_full => Fifo_full,
257     clk => clk ,
258     reset =>reset,
259     priority_rotation =>priority_rotation,
260     port_grant =>port_grant);
261end generate scheduler4x4; 
262
263--======================scheduler 5 ports=======================
264
265scheduler5x5 : 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);
275end generate scheduler5x5; 
276
277--======================scheduler 6 ports=======================
278
279scheduler6x6 : 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);
289end generate scheduler6x6; 
290
291--======================scheduler 7 ports=======================
292
293scheduler7x7 : 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);
303end generate scheduler7x7; 
304
305--======================scheduler 8 ports=======================
306
307scheduler8x8 : 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);
317end generate scheduler8x8; 
318
319--======================scheduler 9 ports=======================
320
321scheduler9x9 : 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);
331end generate scheduler9x9; 
332
333--======================scheduler 10 ports=======================
334
335scheduler10x10 : 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);
345end generate scheduler10x10; 
346
347--======================scheduler 11 ports=======================
348
349scheduler11x11 : 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);
359end generate scheduler11x11; 
360
361--======================scheduler 12 ports=======================
362
363scheduler12x12 : if number_of_ports = 12 generate
364
365  Inst_Scheduler12_12 : Scheduler12_12
366   PORT MAP(
367     Request => Request, 
368     Fifo_full => Fifo_full,
369     clk => clk ,
370     reset =>reset,
371     priority_rotation =>priority_rotation,
372     port_grant =>port_grant);
373end generate scheduler12x12; 
374
375--======================scheduler 13 ports=======================
376
377scheduler13x13 : if number_of_ports = 13 generate
378
379  Inst_Scheduler13_13 : Scheduler13_13
380   PORT MAP(
381     Request => Request, 
382     Fifo_full => Fifo_full,
383     clk => clk ,
384     reset =>reset,
385     priority_rotation =>priority_rotation,
386     port_grant =>port_grant);
387end generate scheduler13x13; 
388
389--======================scheduler 14 ports=======================
390
391scheduler14x14 : if number_of_ports = 14 generate
392
393  Inst_Scheduler14_14 : Scheduler14_14
394   PORT MAP(
395     Request => Request, 
396     Fifo_full => Fifo_full,
397     clk => clk ,
398     reset =>reset,
399     priority_rotation =>priority_rotation,
400     port_grant =>port_grant);
401end generate scheduler14x14; 
402
403--======================scheduler 15 ports=======================
404
405scheduler15x15 : if number_of_ports = 15 generate
406
407  Inst_Scheduler15_15 : Scheduler15_15
408   PORT MAP(
409     Request => Request, 
410     Fifo_full => Fifo_full,
411     clk => clk ,
412     reset =>reset,
413     priority_rotation =>priority_rotation,
414     port_grant =>port_grant);
415end generate scheduler15x15; 
416
417--======================scheduler 16 ports=======================
418
419scheduler16x16 : if number_of_ports = 16 generate
420
421  Inst_Scheduler16_16 : Scheduler16_16
422   PORT MAP(
423     Request => Request, 
424     Fifo_full => Fifo_full,
425     clk => clk ,
426     reset =>reset,
427     priority_rotation =>priority_rotation,
428     port_grant =>port_grant);
429end generate scheduler16x16; 
430
431end Behavioral;
432
Note: See TracBrowser for help on using the repository browser.