OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [VHDL/] [Open8_pkg.vhd] - Diff between revs 226 and 227

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 226 Rev 227
Line 289... Line 289...
 
 
  type REGFILE_TYPE is array (0 to 7) of DATA_TYPE;
  type REGFILE_TYPE is array (0 to 7) of DATA_TYPE;
 
 
  subtype FLAG_TYPE is DATA_TYPE;
  subtype FLAG_TYPE is DATA_TYPE;
 
 
end Open8_pkg;
end package;
 
 
package body Open8_pkg is
package body Open8_pkg is
 
 
  -- The ceil_log2 function returns the minimum register width required to
  -- The ceil_log2 function returns the minimum register width required to
  --  hold the supplied integer.
  --  hold the supplied integer.
Line 303... Line 303...
    retval                   := 1;
    retval                   := 1;
    while ((2**retval) - 1) < x loop
    while ((2**retval) - 1) < x loop
      retval                 := retval + 1;
      retval                 := retval + 1;
    end loop;
    end loop;
    return retval;
    return retval;
  end ceil_log2;
  end function;
 
 
end package body;
end package body;
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.