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

Subversion Repositories gpib_controller

[/] [gpib_controller/] [trunk/] [vhdl/] [src/] [common/] [utilPkg.vhd] - Blame information for rev 3

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 Andrewski
--------------------------------------------------------------------------------
2
-- Entity:      utilPkg
3
-- Date:        2011-10-09  
4
-- Author:      apaluch
5
--------------------------------------------------------------------------------
6
library ieee;
7
use ieee.std_logic_1164.all;
8
 
9
package utilPkg is
10
 
11
        -- converts boolean to std_logic '0' or '1'
12
        function to_stdl(b : boolean) return std_logic;
13
 
14
        -- converts std_logic to boolean
15
        function is_1(v : std_logic) return boolean;
16
 
17
end;
18
 
19
package body utilPkg is
20
 
21
        function to_stdl(b : boolean) return std_logic is begin
22
                if b then
23
                        return '1';
24
                else
25
                        return '0';
26
                end if;
27
        end function;
28
 
29
        function is_1(v : std_logic) return boolean is begin
30
                if v = '1' then
31
                        return true;
32
                else
33
                        return false;
34
                end if;
35
        end function;
36
 
37
end package body;

powered by: WebSVN 2.1.0

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