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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [rtl/] [core/] [neorv32_cpu_bus.vhd] - Diff between revs 16 and 17

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

Rev 16 Rev 17
Line 411... Line 411...
 
 
 
 
  -- Physical Memory Protection (PMP) -------------------------------------------------------
  -- Physical Memory Protection (PMP) -------------------------------------------------------
  -- -------------------------------------------------------------------------------------------
  -- -------------------------------------------------------------------------------------------
  -- compute address masks --
  -- compute address masks --
  pmp_masks: process(pmp_addr_i)
  pmp_masks: process(clk_i)
  begin
  begin
 
    if rising_edge(clk_i) then -- address configuration (not the actual address check!) has a latency of +1 cycles
    for r in 0 to PMP_NUM_REGIONS-1 loop -- iterate over all regions
    for r in 0 to PMP_NUM_REGIONS-1 loop -- iterate over all regions
      pmp.addr_mask(r) <= (others => '0'); -- default
      pmp.addr_mask(r) <= (others => '0'); -- default
      for i in PMP_GRANULARITY+1 to 33 loop
      for i in PMP_GRANULARITY+1 to 33 loop
        if (i = PMP_GRANULARITY+1) then
        if (i = PMP_GRANULARITY+1) then
          pmp.addr_mask(r)(i) <= '0';
          pmp.addr_mask(r)(i) <= '0';
        else -- current bit = not AND(all previous bits)
        else -- current bit = not AND(all previous bits)
          pmp.addr_mask(r)(i) <= not (and_all_f(pmp_addr_i(r)(i-1 downto PMP_GRANULARITY)));
          pmp.addr_mask(r)(i) <= not (and_all_f(pmp_addr_i(r)(i-1 downto PMP_GRANULARITY)));
        end if;
        end if;
      end loop; -- i
      end loop; -- i
    end loop; -- r
    end loop; -- r
 
    end if;
  end process pmp_masks;
  end process pmp_masks;
 
 
 
 
  -- compute operands for comparator --
  -- compute operands for comparator --
  pmp_prepare_check:
  pmp_prepare_check:

powered by: WebSVN 2.1.0

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