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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [rtl/] [core/] [neorv32_uart.vhd] - Diff between revs 2 and 22

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

Rev 2 Rev 22
Line 48... Line 48...
    -- 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
    -- clock generator --
    -- clock generator --
    clkgen_en_o : out std_ulogic; -- enable clock generator
    clkgen_en_o : out std_ulogic; -- enable clock generator
Line 144... Line 143...
    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 (wr_en = '1') then
      if (wr_en = '1') then
        if (addr = uart_ctrl_addr_c) then
        if (addr = uart_ctrl_addr_c) then
          for i in 0 to 3 loop
          ctrl <= data_i;
            if (ben_i(i) = '1') then
 
              ctrl(7+i*8 downto 0+i*8) <= data_i(7+i*8 downto 0+i*8);
 
            end if;
 
          end loop; -- i
 
        end if;
        end if;
      end if;
      end if;
      -- read access --
      -- read access --
      data_o <= (others => '0');
      data_o <= (others => '0');
      if (rd_en = '1') then
      if (rd_en = '1') then

powered by: WebSVN 2.1.0

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