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 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 Andrewski
--------------------------------------------------------------------------------
2 13 Andrewski
--This file is part of fpga_gpib_controller.
3
--
4
-- Fpga_gpib_controller is free software: you can redistribute it and/or modify
5
-- it under the terms of the GNU General Public License as published by
6
-- the Free Software Foundation, either version 3 of the License, or
7
-- (at your option) any later version.
8
--
9
-- Fpga_gpib_controller is distributed in the hope that it will be useful,
10
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-- GNU General Public License for more details.
13
 
14
-- You should have received a copy of the GNU General Public License
15
-- along with Fpga_gpib_controller.  If not, see <http://www.gnu.org/licenses/>.
16
--------------------------------------------------------------------------------
17 3 Andrewski
-- Entity:      utilPkg
18
-- Date:        2011-10-09  
19 13 Andrewski
-- Author: Andrzej Paluch
20 3 Andrewski
--------------------------------------------------------------------------------
21
library ieee;
22
use ieee.std_logic_1164.all;
23
 
24
package utilPkg is
25
 
26
        -- converts boolean to std_logic '0' or '1'
27
        function to_stdl(b : boolean) return std_logic;
28
 
29
        -- converts std_logic to boolean
30
        function is_1(v : std_logic) return boolean;
31
 
32
end;
33
 
34
package body utilPkg is
35
 
36
        function to_stdl(b : boolean) return std_logic is begin
37
                if b then
38
                        return '1';
39
                else
40
                        return '0';
41
                end if;
42
        end function;
43
 
44
        function is_1(v : std_logic) return boolean is begin
45
                if v = '1' then
46
                        return true;
47
                else
48
                        return false;
49
                end if;
50
        end function;
51
 
52
end package body;

powered by: WebSVN 2.1.0

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