Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1.  
  2. architecture Behavioral of System is
  3.   component Master is
  4.     port (
  5.       cs_vec : out std_logic_vector(k downto 0);
  6.       done : out std_logic;
  7.       clk : in std_logic;
  8.       ...);
  9.   end component;
  10.   component Slave0 is
  11.     port (
  12.       cs : in std_logic;
  13.       done : out std_logic;
  14.       clk : in std_logic;
  15.       ...);
  16.   end component;
  17.  
  18.   ... # SlaveX component definitions  
  19.  
  20.   cs_vec : std_logic_vector(k downto 0);
  21.   done : std_logic;
  22. begin
  23.   master : Master
  24.     port map (
  25.         cs_vec => cs_vec,
  26.         done => done,
  27.         clk => clk,
  28.         ...);
  29.   slave0 : Slave0
  30.     port map (
  31.         cs => cs_vec(0),
  32.         done => done,
  33.         clk => clk,
  34.         ...);
  35.  
  36.   ... # SlaveX instance definitions
  37.  
  38.   process(clk) begin
  39.     if clk'event and clk = '1' then
  40.       if cs_vec = std_logic_vector(0, cs_vec'length) then
  41.         done <= '0';
  42.       else
  43.         done <= 'Z';
  44.       end if;
  45.     end if;
  46.   end process;
  47. end Behavioral;