source: PROJECT_CORE_MPI/SWITCH_GEN/BRANCHES/v0.03/Arbiter.vhd @ 69

Last change on this file since 69 was 65, checked in by rolagamo, 11 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:='0';
49signal RNW : std_logic:='0';
50begin
51--Grant<=grant_signal; -- Grant n'a pas été déclarée InOut
52Mask <= P AND (not Fifo_full);
53RNW<= Request And North And West;
54process(Mask, RNW, North, West)-- genere de la logique purement combinatoire
55begin
56if Mask ='0' then --cellule inactive
57Grant <= '0';-- pas d'autorisation
58South <= '1';
59East <= '1';
60   else
61        Grant <= RNW;
62        South <= (North) And (Not (RNW));       
63        East  <= (West)  And (Not (RNW));
64end if;
65end process;
66
67end Behavioral;
68--modélidation flot de données elle semble plus efficace 3 LUT
69--architecture Behavioral of Arbiter is
70--signal x, x1, x2, x3, x4, x5: STD_LOGIC;
71--begin
72----equations logiques de la cellule
73--x  <= Mask And Request;
74--x1 <= North;
75--x2 <= West;
76--x3 <= x And x1 And x2;
77--x4 <= x1 And (Not x3);
78--x5 <= x2 And (Not x3);
79--South <= x4 Or (Not Mask);
80--East  <= x5 Or (Not Mask);
81--Grant <= x3;
82--
83--end Behavioral;
84
85
Note: See TracBrowser for help on using the repository browser.