source: Hardware/WARP_v3/Rev1.1/Config_CPLD/src/spi_boot_pack-p.vhd

Last change on this file was 1799, checked in by murphpo, 12 years ago

Adding WARP v3 hardware files (schematics, FPGA pinout, configuration CPLD source)

File size: 844 bytes
Line 
1-------------------------------------------------------------------------------
2--
3-- SD/MMC Bootloader
4--
5-- $Id: spi_boot_pack-p.vhd 77 2009-04-01 19:53:14Z arniml $
6--
7-------------------------------------------------------------------------------
8
9library ieee;
10use ieee.std_logic_1164.all;
11
12package spi_boot_pack is
13
14  function "=" (a : std_logic; b : integer) return boolean;
15
16end spi_boot_pack;
17
18package 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
44end spi_boot_pack;
Note: See TracBrowser for help on using the repository browser.