| 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 | ----------------------------------------------------------------------------------
|
|---|
| 22 | library IEEE;
|
|---|
| 23 | use IEEE.STD_LOGIC_1164.ALL;
|
|---|
| 24 | use IEEE.STD_LOGIC_ARITH.ALL;
|
|---|
| 25 | use 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 |
|
|---|
| 32 | entity 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);
|
|---|
| 41 | end Arbiter;
|
|---|
| 42 |
|
|---|
| 43 | architecture 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
|
|---|
| 46 | signal grant_signal : STD_LOGIC;
|
|---|
| 47 | --signal not_fifo_full : STD_LOGIC;
|
|---|
| 48 | signal Mask : STD_LOGIC:='0';
|
|---|
| 49 | signal RNW : std_logic:='0';
|
|---|
| 50 | begin
|
|---|
| 51 | --Grant<=grant_signal; -- Grant n'a pas été déclarée InOut
|
|---|
| 52 | Mask <= P AND (not Fifo_full);
|
|---|
| 53 | RNW<= Request And North And West;
|
|---|
| 54 | process(Mask, RNW, North, West)-- genere de la logique purement combinatoire
|
|---|
| 55 | begin
|
|---|
| 56 | if Mask ='0' then --cellule inactive
|
|---|
| 57 | Grant <= '0';-- pas d'autorisation
|
|---|
| 58 | South <= '1';
|
|---|
| 59 | East <= '1';
|
|---|
| 60 | else
|
|---|
| 61 | Grant <= RNW;
|
|---|
| 62 | South <= (North) And (Not (RNW));
|
|---|
| 63 | East <= (West) And (Not (RNW));
|
|---|
| 64 | end if;
|
|---|
| 65 | end process;
|
|---|
| 66 |
|
|---|
| 67 | end 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 |
|
|---|