SURF  1.0
AxiMicronN25QCore.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
2 -- File : AxiMicronN25QCore.vhd
3 -- Company : SLAC National Accelerator Laboratory
4 -- Created : 2015-03-03
5 -- Last update: 2016-09-20
6 -------------------------------------------------------------------------------
7 -- Description: AXI-Lite interface to N25Q FLASH Memory IC
8 -------------------------------------------------------------------------------
9 -- Note: This module doesn't support DSPI or QSPI interface yet.
10 -------------------------------------------------------------------------------
11 -- This file is part of 'SLAC Firmware Standard Library'.
12 -- It is subject to the license terms in the LICENSE.txt file found in the
13 -- top-level directory of this distribution and at:
14 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html.
15 -- No part of 'SLAC Firmware Standard Library', including this file,
16 -- may be copied, modified, propagated, or distributed except according to
17 -- the terms contained in the LICENSE.txt file.
18 -------------------------------------------------------------------------------
19 
20 library ieee;
21 use ieee.std_logic_1164.all;
22 
23 use work.StdRtlPkg.all;
24 use work.AxiLitePkg.all;
25 
26 library unisim;
27 use unisim.vcomponents.all;
28 
29 --! @see entity
30  --! @ingroup devices_Micron_n25q
32  generic (
33  TPD_G : time := 1 ns;
34  MEM_ADDR_MASK_G : slv(31 downto 0) := x"00000000";
35  AXI_CLK_FREQ_G : real := 200.0E+6; -- units of Hz
36  SPI_CLK_FREQ_G : real := 25.0E+6; -- units of Hz
38  port (
39  -- FLASH Memory Ports
40  csL : out sl;
41  sck : out sl;
42  mosi : out sl;
43  miso : in sl;
44  -- AXI-Lite Register Interface
49  -- Clocks and Resets
50  axiClk : in sl;
51  axiRst : in sl);
52 end AxiMicronN25QCore;
53 
54 architecture mapping of AxiMicronN25QCore is
55 
56 begin
57  -- Check SPI_CLK_FREQ_G
58  -- Note: Max. read frequency is 50 MHz
59  assert (SPI_CLK_FREQ_G <= 50.0E+6)
60  report "SPI_CLK_FREQ_G must be <= 50.0E+6"
61  severity failure;
62  -- Check AXI_CLK_FREQ_G >= 2*SPI_CLK_FREQ_G
63  assert (AXI_CLK_FREQ_G >= 2.0 * SPI_CLK_FREQ_G)
64  report "AXI_CLK_FREQ_G must be >= 2*SPI_CLK_FREQ_G"
65  severity failure;
66 
67  AxiMicronN25QReg_Inst : entity work.AxiMicronN25QReg
68  generic map(
69  TPD_G => TPD_G,
74  port map(
75  -- FLASH Memory Ports
76  csL => csL,
77  sck => sck,
78  mosi => mosi,
79  miso => miso,
80  -- AXI-Lite Register Interface
85  -- Clocks and Resets
86  axiClk => axiClk,
87  axiRst => axiRst);
88 
89 end mapping;
in axiReadMasterAxiLiteReadMasterType
AxiLiteWriteMasterType
Definition: AxiLitePkg.vhd:111
std_logic sl
Definition: StdRtlPkg.vhd:28
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
out axiWriteSlaveAxiLiteWriteSlaveType
out axiReadSlaveAxiLiteReadSlaveType
SPI_CLK_FREQ_Greal := 25.0E+6
SPI_CLK_FREQ_Greal := 25.0E+6
AXI_CLK_FREQ_Greal := 200.0E+6
slv( 1 downto 0) := "10" AXI_RESP_SLVERR_C
Definition: AxiLitePkg.vhd:36
in axiReadMasterAxiLiteReadMasterType
in axiWriteMasterAxiLiteWriteMasterType
AxiLiteReadMasterType
Definition: AxiLitePkg.vhd:59
MEM_ADDR_MASK_Gslv( 31 downto 0) := x"00000000"
AXI_CLK_FREQ_Greal := 200.0E+6
out axiReadSlaveAxiLiteReadSlaveType
in axiWriteMasterAxiLiteWriteMasterType
AxiLiteReadSlaveType
Definition: AxiLitePkg.vhd:85
_library_ ieeeieee
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
out axiWriteSlaveAxiLiteWriteSlaveType
MEM_ADDR_MASK_Gslv( 31 downto 0) := x"00000000"
std_logic_vector slv
Definition: StdRtlPkg.vhd:29