OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [rtl/] [core/] [neorv32_trng.vhd] - Diff between revs 3 and 22

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 3 Rev 22
Line 62... Line 62...
    -- host access --
    -- host access --
    clk_i  : in  std_ulogic; -- global clock line
    clk_i  : in  std_ulogic; -- global clock line
    addr_i : in  std_ulogic_vector(31 downto 0); -- address
    addr_i : in  std_ulogic_vector(31 downto 0); -- address
    rden_i : in  std_ulogic; -- read enable
    rden_i : in  std_ulogic; -- read enable
    wren_i : in  std_ulogic; -- write enable
    wren_i : in  std_ulogic; -- write enable
    ben_i  : in  std_ulogic_vector(03 downto 0); -- byte write enable
 
    data_i : in  std_ulogic_vector(31 downto 0); -- data in
    data_i : in  std_ulogic_vector(31 downto 0); -- data in
    data_o : out std_ulogic_vector(31 downto 0); -- data out
    data_o : out std_ulogic_vector(31 downto 0); -- data out
    ack_o  : out std_ulogic  -- transfer acknowledge
    ack_o  : out std_ulogic  -- transfer acknowledge
  );
  );
end neorv32_trng;
end neorv32_trng;
Line 132... Line 131...
    if rising_edge(clk_i) then
    if rising_edge(clk_i) then
      ack_o <= acc_en and (rden_i or wren_i);
      ack_o <= acc_en and (rden_i or wren_i);
      -- write access --
      -- write access --
      if (wren = '1') then
      if (wren = '1') then
        if (addr = trng_ctrl_addr_c) then
        if (addr = trng_ctrl_addr_c) then
          if (ben_i(0) = '1') then
          tap_config <= data_i(tap_config'left downto 0);
            tap_config(07 downto 00) <= data_i(ctrl_taps_lsb_c+7 downto ctrl_taps_lsb_c+0);
 
          end if;
 
          if (ben_i(1) = '1') then
 
            tap_config(15 downto 08) <= data_i(ctrl_taps_lsb_c+15 downto ctrl_taps_lsb_c+8);
 
          end if;
 
--        if (ben_i(2) = '1') then
 
--          NULL;
 
--        end if;
 
          if (ben_i(3) = '1') then
 
            rnd_enable <= data_i(ctrl_en_c);
            rnd_enable <= data_i(ctrl_en_c);
          end if;
          end if;
        end if;
        end if;
      end if;
 
      -- read access --
      -- read access --
      data_o <= (others => '0');
      data_o <= (others => '0');
      if (rden = '1') then
      if (rden = '1') then
        if (addr = trng_ctrl_addr_c) then
        if (addr = trng_ctrl_addr_c) then
          data_o(ctrl_taps_msb_c downto ctrl_taps_lsb_c) <= tap_config;
          data_o(ctrl_taps_msb_c downto ctrl_taps_lsb_c) <= tap_config;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.