Line 1... |
Line 1... |
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
--
|
--
|
-- SD/MMC Bootloader
|
-- SD/MMC Bootloader
|
-- Chip toplevel design with SD feature set
|
-- Chip toplevel design with SD feature set
|
--
|
--
|
-- $Id: chip-sd-a.vhd,v 1.4 2005-03-08 22:07:12 arniml Exp $
|
-- $Id: chip-sd-a.vhd,v 1.5 2005-03-09 19:48:34 arniml Exp $
|
--
|
--
|
-- Copyright (c) 2005, Arnim Laeuger (arniml@opencores.org)
|
-- Copyright (c) 2005, Arnim Laeuger (arniml@opencores.org)
|
--
|
--
|
-- All rights reserved, see COPYING.
|
-- All rights reserved, see COPYING.
|
--
|
--
|
Line 62... |
Line 62... |
reset_level_g : integer := 0
|
reset_level_g : integer := 0
|
);
|
);
|
port (
|
port (
|
clk_i : in std_logic;
|
clk_i : in std_logic;
|
reset_i : in std_logic;
|
reset_i : in std_logic;
|
set_sel_n_i : in std_logic_vector(width_set_sel_g-1 downto 0);
|
set_sel_i : in std_logic_vector(width_set_sel_g-1 downto 0);
|
spi_clk_o : out std_logic;
|
spi_clk_o : out std_logic;
|
spi_cs_n_o : out std_logic;
|
spi_cs_n_o : out std_logic;
|
spi_data_in_i : in std_logic;
|
spi_data_in_i : in std_logic;
|
spi_data_out_o : out std_logic;
|
spi_data_out_o : out std_logic;
|
spi_en_outs_o : out std_logic;
|
spi_en_outs_o : out std_logic;
|
Line 84... |
Line 84... |
signal spi_clk_s : std_logic;
|
signal spi_clk_s : std_logic;
|
signal spi_cs_n_s : std_logic;
|
signal spi_cs_n_s : std_logic;
|
signal spi_data_out_s : std_logic;
|
signal spi_data_out_s : std_logic;
|
signal spi_en_outs_s : std_logic;
|
signal spi_en_outs_s : std_logic;
|
|
|
|
signal set_sel_s : std_logic_vector(3 downto 0);
|
|
|
begin
|
begin
|
|
|
|
set_sel_s <= not set_sel_n_i;
|
|
|
spi_boot_b : spi_boot
|
spi_boot_b : spi_boot
|
generic map (
|
generic map (
|
width_set_sel_g => 4, -- 16 sets
|
width_set_sel_g => 4, -- 16 sets
|
width_bit_cnt_g => 12, -- 512 bytes per block
|
width_bit_cnt_g => 12, -- 512 bytes per block
|
width_img_cnt_g => 2, -- 4 images
|
width_img_cnt_g => 2, -- 4 images
|
Line 99... |
Line 103... |
width_mmc_clk_div_g => 0 -- no MMC compatibility
|
width_mmc_clk_div_g => 0 -- no MMC compatibility
|
)
|
)
|
port map (
|
port map (
|
clk_i => clk_i,
|
clk_i => clk_i,
|
reset_i => reset_i,
|
reset_i => reset_i,
|
set_sel_n_i => set_sel_n_i,
|
set_sel_i => set_sel_s,
|
spi_clk_o => spi_clk_s,
|
spi_clk_o => spi_clk_s,
|
spi_cs_n_o => spi_cs_n_s,
|
spi_cs_n_o => spi_cs_n_s,
|
spi_data_in_i => spi_data_in_i,
|
spi_data_in_i => spi_data_in_i,
|
spi_data_out_o => spi_data_out_s,
|
spi_data_out_o => spi_data_out_s,
|
spi_en_outs_o => spi_en_outs_s,
|
spi_en_outs_o => spi_en_outs_s,
|
Line 135... |
Line 139... |
|
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- File History:
|
-- File History:
|
--
|
--
|
-- $Log: not supported by cvs2svn $
|
-- $Log: not supported by cvs2svn $
|
|
-- Revision 1.4 2005/03/08 22:07:12 arniml
|
|
-- added set selection
|
|
--
|
-- Revision 1.3 2005/02/18 06:42:14 arniml
|
-- Revision 1.3 2005/02/18 06:42:14 arniml
|
-- clarify wording for images
|
-- clarify wording for images
|
--
|
--
|
-- Revision 1.2 2005/02/16 18:54:39 arniml
|
-- Revision 1.2 2005/02/16 18:54:39 arniml
|
-- added tri-state drivers for spi outputs
|
-- added tri-state drivers for spi outputs
|