SURF  1.0
Iprog7Series.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
2 -- File : Iprog7Series.vhd
3 -- Company : SLAC National Accelerator Laboratory
4 -- Created : 2013-11-01
5 -- Last update: 2015-09-10
6 -- Platform :
7 -- Standard : VHDL'93/02
8 -------------------------------------------------------------------------------
9 -- Description: Uses the ICAP primitive to internally
10 -- toggle the PROG_B via IPROG command
11 -------------------------------------------------------------------------------
12 -- This file is part of 'SLAC Firmware Standard Library'.
13 -- It is subject to the license terms in the LICENSE.txt file found in the
14 -- top-level directory of this distribution and at:
15 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html.
16 -- No part of 'SLAC Firmware Standard Library', including this file,
17 -- may be copied, modified, propagated, or distributed except according to
18 -- the terms contained in the LICENSE.txt file.
19 -------------------------------------------------------------------------------
20 
21 library ieee;
22 use ieee.std_logic_1164.all;
23 use ieee.std_logic_arith.all;
24 use ieee.std_logic_unsigned.all;
25 
26 use work.StdRtlPkg.all;
27 
28 library unisim;
29 use unisim.vcomponents.all;
30 
31 --! @see entity
32  --! @ingroup xilinx_7Series_general
33 entity Iprog7Series is
34  generic (
35  TPD_G : time := 1 ns;
36  USE_SLOWCLK_G : boolean := false;
37  BUFR_CLK_DIV_G : string := "8");
38  port (
39  clk : in sl;
40  rst : in sl;
41  slowClk : in sl := '0';
42  start : in sl; -- Should be asserted and held until reboot
43  bootAddress : in slv(31 downto 0) := X"00000000");
44 end Iprog7Series;
45 
46 architecture rtl of Iprog7Series is
47 
48  signal icapClk : sl;
49  signal icapClkRst : sl;
50  signal icapCsl : sl;
51  signal icapRnw : sl;
52  signal icapI : slv(31 downto 0);
53 
54 begin
55 
56  SLOWCLK_GEN : if (USE_SLOWCLK_G) generate
57  icapClk <= slowClk;
58  end generate SLOWCLK_GEN;
59 
60  DIVCLK_GEN : if (not USE_SLOWCLK_G) generate
61  BUFR_ICPAPE2 : BUFR
62  generic map (
63  BUFR_DIVIDE => BUFR_CLK_DIV_G)
64  port map (
65  CE => '1',
66  CLR => '0',
67  I => clk,
68  O => icapClk);
69  end generate DIVCLK_GEN;
70 
71  -- Synchronize reset to icapClk
72  RstSync_Inst : entity work.RstSync
73  generic map (
74  TPD_G => TPD_G)
75  port map (
76  clk => icapClk,
77  asyncRst => rst,
78  syncRst => icapClkRst);
79 
80 
81  -- IPROG logic
82  Iprog7SeriesCore_1 : entity work.Iprog7SeriesCore
83  generic map (
84  TPD_G => TPD_G,
85  SYNC_RELOAD_G => true)
86  port map (
87  reload => start,
89  icapClk => icapClk,
90  icapClkRst => icapClkRst,
91  icapReq => open,
92  icapGrant => '1', -- Dedicated ICAP so always grant
93  icapCsl => icapCsl,
94  icapRnw => icapRnw,
95  icapI => icapI);
96 
97  -- ICAP Primative
98  ICAPE2_Inst : ICAPE2
99  generic map (
100  DEVICE_ID => x"03651093", -- Specifies the pre-programmed Device ID value to be used for simulation purposes
101  ICAP_WIDTH => "X32", -- Specifies the input and output data width to be used with the ICAPE2 Possible values: (X8,X16 or X32)
102  SIM_CFG_FILE_NAME => "NONE") -- Specifies the Raw Bitstream (RBT) file to be parsed by the simulation model
103  port map (
104  O => open, -- 32-bit output: Configuration data output bus
105  CLK => icapClk, -- 1-bit input: Clock Input
106  CSIB => icapCsl, -- 1-bit input: Active-Low ICAP Enable
107  I => icapI, -- 32-bit input: Configuration data input bus
108  RDWRB => icapRnw); -- 1-bit input: Read/Write Select input
109 
110 
111 end rtl;
out syncRstsl
Definition: RstSync.vhd:36
std_logic sl
Definition: StdRtlPkg.vhd:28
in slowClksl := '0'
TPD_Gtime := 1 ns
in asyncRstsl
Definition: RstSync.vhd:35
in clksl
Definition: RstSync.vhd:34
out icapIslv( 31 downto 0)
in reloadAddrslv( 31 downto 0) := X"00000000"
SYNC_RELOAD_Gboolean := true
in icapGrantsl := '1'
TPD_Gtime := 1 ns
Definition: RstSync.vhd:27
USE_SLOWCLK_Gboolean := false
BUFR_CLK_DIV_Gstring := "8"
in bootAddressslv( 31 downto 0) := X"00000000"
std_logic_vector slv
Definition: StdRtlPkg.vhd:29