Permalink
Browse files

added support for std_logic_vector

  • Loading branch information...
1 parent 7eaa2de commit 56c9ced7f81b19df3785dd7b7d5a3b006f65e81b @geschema geschema committed Dec 17, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 utils/str.vhd
View
@@ -58,6 +58,9 @@ package str is
-- unsigned -> string
function str(value : unsigned) return string;
+ -- std_logic_vector -> (unsigned) integer string
+ function str(val : std_logic_vector) return string;
+
end package str;
package body str is
@@ -119,4 +122,9 @@ package body str is
return str(to_integer(value));
end function;
+ function str(val : std_logic_vector) return string is
+ begin
+ return str(unsigned(val));
+ end function;
+
end package body str;

0 comments on commit 56c9ced

Please sign in to comment.