Line 1... |
Line 1... |
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
--
|
--
|
-- SD/MMC Bootloader
|
-- SD/MMC Bootloader
|
-- Chip toplevel design with full feature set
|
-- Chip toplevel design with full feature set
|
--
|
--
|
-- $Id: chip-full-a.vhd,v 1.3 2005-02-18 06:42:11 arniml Exp $
|
-- $Id: chip-full-a.vhd,v 1.4 2005-03-08 22:07:12 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 50... |
Line 50... |
|
|
architecture full of chip is
|
architecture full of chip is
|
|
|
component spi_boot
|
component spi_boot
|
generic (
|
generic (
|
|
width_set_sel_g : integer := 4;
|
width_bit_cnt_g : integer := 6;
|
width_bit_cnt_g : integer := 6;
|
width_img_cnt_g : integer := 2;
|
width_img_cnt_g : integer := 2;
|
num_bits_per_img_g : integer := 18;
|
num_bits_per_img_g : integer := 18;
|
sd_init_g : integer := 0;
|
sd_init_g : integer := 0;
|
mmc_compat_clk_div_g : integer := 0;
|
mmc_compat_clk_div_g : integer := 0;
|
Line 61... |
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);
|
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 86... |
Line 88... |
|
|
begin
|
begin
|
|
|
spi_boot_b : spi_boot
|
spi_boot_b : spi_boot
|
generic map (
|
generic map (
|
|
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
|
num_bits_per_img_g => 18, -- 256 kByte per image
|
num_bits_per_img_g => 18, -- 256 kByte per image
|
sd_init_g => 1, -- use SD specific initialization
|
sd_init_g => 1, -- use SD specific initialization
|
mmc_compat_clk_div_g => 13, -- MMC compat 400 kHz > 10 MHz / (13*2)
|
mmc_compat_clk_div_g => 13, -- MMC compat 400 kHz > 10 MHz / (13*2)
|
width_mmc_clk_div_g => 4 -- need 5 bits for MMC compat divider
|
width_mmc_clk_div_g => 4 -- need 5 bits for MMC compat divider
|
)
|
)
|
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,
|
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 131... |
Line 135... |
|
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- File History:
|
-- File History:
|
--
|
--
|
-- $Log: not supported by cvs2svn $
|
-- $Log: not supported by cvs2svn $
|
|
-- Revision 1.3 2005/02/18 06:42:11 arniml
|
|
-- clarify wording for images
|
|
--
|
-- Revision 1.2 2005/02/16 18:54:37 arniml
|
-- Revision 1.2 2005/02/16 18:54:37 arniml
|
-- added tri-state drivers for spi outputs
|
-- added tri-state drivers for spi outputs
|
--
|
--
|
-- Revision 1.1 2005/02/08 20:41:31 arniml
|
-- Revision 1.1 2005/02/08 20:41:31 arniml
|
-- initial check-in
|
-- initial check-in
|