- Timestamp:
- May 21, 2014, 11:36:19 AM (10 years ago)
- Location:
- PROJECT_CORE_MPI/MPI_HCL/BRANCHES/v2.0
- Files:
-
- 1 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
PROJECT_CORE_MPI/MPI_HCL/BRANCHES/v2.0/NOC/SCHEDULER9_9.VHD
r101 r139 30 30 --use UNISIM.VComponents.all; 31 31 entity Scheduler9_9 is 32 Port ( Req uest: in STD_LOGIC_VECTOR (81 downto 1);32 Port ( Req : in STD_LOGIC_VECTOR (81 downto 1); 33 33 Fifo_full : in STD_LOGIC_VECTOR (9 downto 1); 34 34 clk : in STD_LOGIC; … … 39 39 40 40 architecture Behavioral of Scheduler9_9 is 41 --déclaration de constantes 42 Constant NB_IO : positive:=9; --le nombre de ports d'entrée/sortie 41 43 --Declaration du types 42 44 --tableau de signaux de connexion des cellules arbitres 43 TYPE C_Bar_Signal_Array IS ARRAY( 17 downto 1) of STD_LOGIC_VECTOR(9downto 1);45 TYPE C_Bar_Signal_Array IS ARRAY(NB_IO*2-1 downto 1) of STD_LOGIC_VECTOR(NB_IO downto 1); 44 46 -- declaration du composant cellule d'arbitrage 45 47 Component Arbiter 46 48 PORT (P, Fifo_full,Request, West,North : in STD_LOGIC; 47 49 Grant,East,South : out STD_LOGIC ); 48 End Component;--Signaux de connexion des cellues 50 End Component; 51 component Def_Request is 52 generic (NB_IO :positive:=9); 53 Port ( Req : in STD_LOGIC_VECTOR (NB_IO**2 downto 1); 54 clk : in STD_LOGIC; 55 reset : in STD_LOGIC; 56 fifo_full : in STD_LOGIC_VECTOR (NB_IO downto 1); 57 priority_rotation : in STD_LOGIC_VECTOR (NB_IO downto 1); 58 grant : in STD_LOGIC_VECTOR (NB_IO**2 downto 1); 59 request : out STD_LOGIC_VECTOR (NB_IO**2 downto 1)); 60 end component; 61 constant NB_IO2 :positive:=NB_IO**2; -- le carré du nombre de ports d'E/S 62 63 --Signaux de connexion des cellues 49 64 SIGNAL south_2_north : C_Bar_Signal_Array; -- connexion south north 50 65 SIGNAL east_2_west : C_Bar_Signal_Array; -- connexion east west … … 53 68 SIGNAL Signal_priority : STD_LOGIC_VECTOR (17 DOWNTO 1);--signal pour la connection des vecteur de priorité 54 69 SIGNAL High : std_logic;--niveau pour les cellules des extremités nord et ouest 55 signal grant_latch : std_logic_vector(81 downto 1); 70 56 71 signal priority_rotation_en : std_logic; 57 signal Grant : std_logic_vector(81 downto 1);72 signal Grant,request : std_logic_vector(NB_IO2 downto 1):=(others=>'0'); 58 73 begin 59 74 60 75 --validation de la rotation de priorité lorsque aucun port n'emet 61 priority_rotation_en <= '1' when unsigned(priority_rotation) = 511 else '0'; 62 --latch servant qui memorise le signal grant pendant a transmission 63 grant_latch_process : process(clk) 64 begin 65 if rising_edge(clk) then 66 if reset = '1' then 67 grant_latch <= (others => '0'); 68 elsif priority_rotation_en = '1' then 69 grant_latch <= Grant; 70 end if; 71 end if; 72 end process; 73 port_grant <= Grant and grant_latch; 76 -- priority_rotation_en <= '1' when unsigned(priority_rotation) = 511 else '0';tation) = 511 else '0'; 77 priority_rotation_en <= '1' when unsigned(priority_rotation) = 2**NB_IO-1 else '0'; 78 --evaluation du signal request 79 inst_defreq: def_request generic map (NB_IO=>9) 80 port map (clk=>clk, 81 reset=>reset, 82 req=>req, 83 fifo_full=>fifo_full, 84 priority_rotation=>priority_rotation, 85 grant=>grant, 86 request=>request 87 ); 88 89 port_grant <= grant; 74 90 Grant(1) <= Signal_grant(1)(1) or Signal_grant(10)(1); -- Grant(1,1) 75 91 Grant(2) <= Signal_grant(2)(2) or Signal_grant(11)(2); -- Grant(1,2)
Note: See TracChangeset
for help on using the changeset viewer.