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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [rtl/] [core/] [neorv32_top.vhd] - Diff between revs 63 and 64

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

Rev 63 Rev 64
Line 214... Line 214...
 
 
    -- External platform interrupts (available if XIRQ_NUM_CH > 0) --
    -- External platform interrupts (available if XIRQ_NUM_CH > 0) --
    xirq_i         : in  std_ulogic_vector(XIRQ_NUM_CH-1 downto 0) := (others => 'L'); -- IRQ channels
    xirq_i         : in  std_ulogic_vector(XIRQ_NUM_CH-1 downto 0) := (others => 'L'); -- IRQ channels
 
 
    -- CPU interrupts --
    -- CPU interrupts --
    nm_irq_i       : in  std_ulogic := 'L'; -- non-maskable interrupt
 
    mtime_irq_i    : in  std_ulogic := 'L'; -- machine timer interrupt, available if IO_MTIME_EN = false
    mtime_irq_i    : in  std_ulogic := 'L'; -- machine timer interrupt, available if IO_MTIME_EN = false
    msw_irq_i      : in  std_ulogic := 'L'; -- machine software interrupt
    msw_irq_i      : in  std_ulogic := 'L'; -- machine software interrupt
    mext_irq_i     : in  std_ulogic := 'L'  -- machine external interrupt
    mext_irq_i     : in  std_ulogic := 'L'  -- machine external interrupt
  );
  );
end neorv32_top;
end neorv32_top;
Line 327... Line 326...
  signal neoled_irq    : std_ulogic;
  signal neoled_irq    : std_ulogic;
  signal slink_tx_irq  : std_ulogic;
  signal slink_tx_irq  : std_ulogic;
  signal slink_rx_irq  : std_ulogic;
  signal slink_rx_irq  : std_ulogic;
  signal xirq_irq      : std_ulogic;
  signal xirq_irq      : std_ulogic;
 
 
  -- machine (CPU) interrupts --
 
  signal x_nm_irq,    nm_irq_ff    : std_ulogic;
 
  signal x_mtime_irq, mtime_irq_ff : std_ulogic;
 
  signal x_msw_irq,   msw_irq_ff   : std_ulogic;
 
  signal x_mext_irq,  mext_irq_ff  : std_ulogic;
 
 
 
  -- misc --
  -- misc --
  signal mtime_time     : std_ulogic_vector(63 downto 0); -- current system time from MTIME
  signal mtime_time     : std_ulogic_vector(63 downto 0); -- current system time from MTIME
  signal cpu_sleep      : std_ulogic; -- CPU is in sleep mode when set
  signal cpu_sleep      : std_ulogic; -- CPU is in sleep mode when set
  signal bus_keeper_err : std_ulogic; -- bus keeper: bus access timeout
  signal bus_keeper_err : std_ulogic; -- bus keeper: bus access timeout
 
 
Line 512... Line 505...
    d_bus_fence_o  => cpu_d.fence,  -- executed FENCE operation
    d_bus_fence_o  => cpu_d.fence,  -- executed FENCE operation
    d_bus_priv_o   => cpu_d.priv,   -- privilege level
    d_bus_priv_o   => cpu_d.priv,   -- privilege level
    -- system time input from MTIME --
    -- system time input from MTIME --
    time_i         => mtime_time,   -- current system time
    time_i         => mtime_time,   -- current system time
    -- non-maskable interrupt --
    -- non-maskable interrupt --
    nm_irq_i       => x_nm_irq,     -- NMI
    msw_irq_i      => msw_irq_i,    -- machine software interrupt
    msw_irq_i      => x_msw_irq,    -- machine software interrupt
    mext_irq_i     => mext_irq_i,   -- machine external interrupt request
    mext_irq_i     => x_mext_irq,   -- machine external interrupt request
 
    mtime_irq_i    => mtime_irq,    -- machine timer interrupt
    mtime_irq_i    => mtime_irq,    -- machine timer interrupt
    -- fast interrupts (custom) --
    -- fast interrupts (custom) --
    firq_i         => fast_irq,     -- fast interrupt trigger
    firq_i         => fast_irq,     -- fast interrupt trigger
    -- debug mode (halt) request --
    -- debug mode (halt) request --
    db_halt_req_i  => dci_halt_req
    db_halt_req_i  => dci_halt_req
Line 530... Line 522...
 
 
  -- advanced memory control --
  -- advanced memory control --
  fence_o  <= cpu_d.fence; -- indicates an executed FENCE operation
  fence_o  <= cpu_d.fence; -- indicates an executed FENCE operation
  fencei_o <= cpu_i.fence; -- indicates an executed FENCEI operation
  fencei_o <= cpu_i.fence; -- indicates an executed FENCEI operation
 
 
  -- external machine-level (CPU) interrupts --
 
  nm_irq_ff    <= nm_irq_i    when rising_edge(clk_i);
 
  mtime_irq_ff <= mtime_irq_i when rising_edge(clk_i);
 
  msw_irq_ff   <= msw_irq_i   when rising_edge(clk_i);
 
  mext_irq_ff  <= mext_irq_i  when rising_edge(clk_i);
 
  -- rising-edge detector --
 
  x_nm_irq     <= nm_irq_i    and (not nm_irq_ff);
 
  x_mtime_irq  <= mtime_irq_i and (not mtime_irq_ff);
 
  x_msw_irq    <= msw_irq_i   and (not msw_irq_ff);
 
  x_mext_irq   <= mext_irq_i  and (not mext_irq_ff);
 
 
 
  -- fast interrupts --
  -- fast interrupts --
  fast_irq(00) <= wdt_irq;       -- HIGHEST PRIORITY - watchdog timeout
  fast_irq(00) <= wdt_irq;       -- HIGHEST PRIORITY - watchdog timeout
  fast_irq(01) <= cfs_irq;       -- custom functions subsystem
  fast_irq(01) <= cfs_irq;       -- custom functions subsystem
  fast_irq(02) <= uart0_rxd_irq; -- primary UART (UART0) data received
  fast_irq(02) <= uart0_rxd_irq; -- primary UART (UART0) data received
  fast_irq(03) <= uart0_txd_irq; -- primary UART (UART0) sending done
  fast_irq(03) <= uart0_txd_irq; -- primary UART (UART0) sending done
Line 993... Line 974...
 
 
  neorv32_mtime_inst_false:
  neorv32_mtime_inst_false:
  if (IO_MTIME_EN = false) generate
  if (IO_MTIME_EN = false) generate
    resp_bus(RESP_MTIME) <= resp_bus_entry_terminate_c;
    resp_bus(RESP_MTIME) <= resp_bus_entry_terminate_c;
    mtime_time <= mtime_i; -- use external machine timer time signal
    mtime_time <= mtime_i; -- use external machine timer time signal
    mtime_irq  <= x_mtime_irq; -- use external machine timer interrupt
    mtime_irq  <= mtime_irq_i; -- use external machine timer interrupt
  end generate;
  end generate;
 
 
 
 
  -- system time output LO --
  -- system time output LO --
  mtime_sync: process(clk_i)
  mtime_sync: process(clk_i)

powered by: WebSVN 2.1.0

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