Changeset 139 for PROJECT_CORE_MPI/MPI_HCL/BRANCHES/v2.0/NOC/CoreTypes.vhd
- 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/CoreTypes.vhd
r101 r139 9 9 use IEEE.numeric_std.all; 10 10 package CoreTypes is 11 CONSTANT Word :POSITIVE:= 8;11 CONSTANT Word :POSITIVE:= 16; 12 12 CONSTANT ADRLEN:POSITIVE:=16; 13 13 CONSTANT LZFILL :std_logic_vector(2*Word-ADRLEN to 0):=(others=>'0');--indique le nombre de zero à utiliser pour completer le bus de données lorsque la longueur restante du bus d'adresse est inférueure à la largeur du bus de données … … 37 37 array(natural range <>) of std_logic_vector( Word-1 downto 0); 38 38 39 type Typ_PortIO8 is 40 array(natural range <>) of std_logic_vector( 7 downto 0); 39 41 type memory is 40 42 array (natural range <>) of std_logic_vector(word-1 downto 0); … … 176 178 end component SWITCH_GEN; 177 179 -- déclaration des fonctions utilisées 178 180 function wor (din : std_logic_vector) return std_logic; 181 subtype resolved_or is wor std_logic; 182 179 183 FUNCTION all_ones(s1:std_logic_vector) return std_logic; 180 184 --This function returns if the input vector has all ones and no zeros … … 330 334 variable bit_image: String(1 to 3) := std_logic'image(L); 331 335 begin 332 return(bit_image( 1 to 1));336 return(bit_image(2 to 2)); 333 337 end function image; 334 338 … … 355 359 return(RetVal); 356 360 end function image; 361 function wor (din : std_logic_vector) return std_logic is 362 begin 363 for i in din'range loop 364 if (din(i)='1') then 365 return din(i); 366 end if; 367 end loop; 368 return '0'; 369 end function wor; 370 357 371 end CoreTypes;
Note: See TracChangeset
for help on using the changeset viewer.