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

Subversion Repositories spi_boot

[/] [spi_boot/] [trunk/] [rtl/] [vhdl/] [spi_boot_pack-p.vhd] - Blame information for rev 77

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 arniml
-------------------------------------------------------------------------------
2
--
3
-- SD/MMC Bootloader
4
--
5 77 arniml
-- $Id: spi_boot_pack-p.vhd 77 2009-04-01 19:53:14Z arniml $
6 3 arniml
--
7
-------------------------------------------------------------------------------
8
 
9
library ieee;
10
use ieee.std_logic_1164.all;
11
 
12
package spi_boot_pack is
13
 
14
  function "=" (a : std_logic; b : integer) return boolean;
15
 
16
end spi_boot_pack;
17
 
18
package body spi_boot_pack is
19
 
20
  function "=" (a : std_logic; b : integer) return boolean is
21
    variable result_v : boolean;
22
  begin
23
    result_v := false;
24
 
25
    case a is
26
      when '0' =>
27
        if b = 0 then
28
          result_v := true;
29
        end if;
30
 
31
      when '1' =>
32
        if b = 1 then
33
          result_v := true;
34
        end if;
35
 
36
      when others =>
37
        null;
38
 
39
    end case;
40
 
41
    return result_v;
42
  end;
43
 
44
end spi_boot_pack;

powered by: WebSVN 2.1.0

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