source: PROJECT_CORE_MPI/SWITCH_GEN/TRUNK/Arbiter.vhd @ 22

Last change on this file since 22 was 22, checked in by rolagamo, 12 years ago
File size: 2.5 KB
Line 
1----------------------------------------------------------------------------------
2-- Company:
3-- Engineer: Kiegaing Emmanuel GEL EN5
4--
5-- Create Date:    18:18:09 03/19/2011
6-- Design Name:
7-- Module Name:    Arbiter - Behavioral
8-- Project Name:
9-- Target Devices:
10-- Tool versions:
11-- Description:
12-- cellule d'arbitrage de l'ordonnanceur du crossbar
13-- Dependencies:
14--
15-- Revision: 1.0
16-- a été ajouté le signal fifo_full pour inclure la codition buffer pas plein dans
17-- la cellules d'arbitrage
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
27---- Uncomment the following library declaration if instantiating
28---- any Xilinx primitives in this code.
29--library UNISIM;
30--use UNISIM.VComponents.all;
31
32entity Arbiter is
33    Port ( P: in  STD_LOGIC;--vecteur de priorité
34                          Fifo_full : in STD_LOGIC;
35           Request : in  STD_LOGIC;-- demande de permission
36           West : in  STD_LOGIC;-- verouillage ouest
37           North : in  STD_LOGIC;--etc
38           Grant : out  STD_LOGIC;-- validation de la transition
39           East : out  STD_LOGIC;
40           South : out  STD_LOGIC);
41end Arbiter;
42
43architecture Behavioral of Arbiter is
44-- modelisation comportementale 3 LUT après synthèse
45-- ce module peut aussi facilement s'implémenter en flot de données
46signal grant_signal : STD_LOGIC; 
47--signal not_fifo_full : STD_LOGIC;
48signal Mask : STD_LOGIC;
49begin
50--Grant<=grant_signal; -- Grant n'a pas été déclarée InOut
51Mask <= P AND (not Fifo_full);
52process(Mask, Request, North, West)-- genere de la logique purement combinatoire
53begin
54if Mask ='0' then --cellule inactive
55Grant <= '0';-- pas d'autorisation
56South <= '1';
57East <= '1';
58   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));
62end if;
63end process;
64
65end Behavioral;
66--modélidation flot de données elle semble plus efficace 3 LUT
67--architecture Behavioral of Arbiter is
68--signal x, x1, x2, x3, x4, x5: STD_LOGIC;
69--begin
70----equations logiques de la cellule
71--x  <= Mask And Request;
72--x1 <= North;
73--x2 <= West;
74--x3 <= x And x1 And x2;
75--x4 <= x1 And (Not x3);
76--x5 <= x2 And (Not x3);
77--South <= x4 Or (Not Mask);
78--East  <= x5 Or (Not Mask);
79--Grant <= x3;
80--
81--end Behavioral;
82
83
Note: See TracBrowser for help on using the repository browser.