diff options
Diffstat (limited to 'testsuite/synth/issue1006/test_package.vhdl')
-rw-r--r-- | testsuite/synth/issue1006/test_package.vhdl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/synth/issue1006/test_package.vhdl b/testsuite/synth/issue1006/test_package.vhdl new file mode 100644 index 000000000..4eeb95fa5 --- /dev/null +++ b/testsuite/synth/issue1006/test_package.vhdl @@ -0,0 +1,17 @@ +package test_package is + function log2(input : in natural) return natural; +end package test_package; + +package body test_package is + function log2(input : in natural) return natural is + variable retval : natural := 0; + variable temp : natural := input; + begin + while temp > 1 loop + retval := retval + 1; + temp := temp / 2; + end loop; + + return retval; + end function log2; +end package body test_package; |