aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/pyunit/dom/examples/SimplePackage.vhdl
blob: 04df1c52152fbfa91de7640af4f0aef618fc0b4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- Author: Patrick Lehmann
--
-- A collection of utility types and functions.
--
library ieee;
use     ieee.std_logic_1164.all;
use     ieee.numeric_std.all;

-- Utility package
package utilities is
	-- Deferred constant to distinguish simulation from synthesis.
	constant IS_SIMULATION : boolean;

end package;

package body utilities is
	function simulation return boolean is
		variable result : boolean := false;
	begin
		-- synthesis translate off
		result := true;
		-- synthesis translate on
		return result;
	end function;

	constant IS_SIMULATION : boolean := simulation;

end package body;