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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sim/] [neorv32_tb.vhd] - Diff between revs 44 and 45

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

Rev 44 Rev 45
Line 1... Line 1...
-- #################################################################################################
-- #################################################################################################
-- # << NEORV32 - Default Testbench >>                                                             #
-- # << NEORV32 - Default Testbench >>                                                             #
-- # ********************************************************************************************* #
-- # ********************************************************************************************* #
-- # Use the "User Configuration" section to configure the testbench according to your need.       #
-- # The processor is configured to use a maximum of functional units (for testing purpose).       #
 
-- # Use the "User Configuration" section to configure the testbench according to your needs.      #
-- # See NEORV32 data sheet (docs/NEORV32.pdf) for more information.                               #
-- # See NEORV32 data sheet (docs/NEORV32.pdf) for more information.                               #
-- # ********************************************************************************************* #
-- # ********************************************************************************************* #
-- # BSD 3-Clause License                                                                          #
-- # BSD 3-Clause License                                                                          #
-- #                                                                                               #
-- #                                                                                               #
-- # Copyright (c) 2021, Stephan Nolting. All rights reserved.                                     #
-- # Copyright (c) 2021, Stephan Nolting. All rights reserved.                                     #
Line 202... Line 203...
    MEM_INT_DMEM_SIZE            => dmem_size_c,   -- size of processor-internal data memory in bytes
    MEM_INT_DMEM_SIZE            => dmem_size_c,   -- size of processor-internal data memory in bytes
    -- Internal Cache memory --
    -- Internal Cache memory --
    ICACHE_EN                    => icache_en_c,   -- implement instruction cache
    ICACHE_EN                    => icache_en_c,   -- implement instruction cache
    ICACHE_NUM_BLOCKS            => 8,             -- i-cache: number of blocks (min 2), has to be a power of 2
    ICACHE_NUM_BLOCKS            => 8,             -- i-cache: number of blocks (min 2), has to be a power of 2
    ICACHE_BLOCK_SIZE            => 64,            -- i-cache: block size in bytes (min 4), has to be a power of 2
    ICACHE_BLOCK_SIZE            => 64,            -- i-cache: block size in bytes (min 4), has to be a power of 2
 
    ICACHE_ASSOCIATIVITY         => 2,             -- i-cache: associativity / number of sets (1=direct_mapped), has to be a power of 2
    -- External memory interface --
    -- External memory interface --
    MEM_EXT_EN                   => true,          -- implement external memory bus interface?
    MEM_EXT_EN                   => true,          -- implement external memory bus interface?
    -- Processor peripherals --
    -- Processor peripherals --
    IO_GPIO_EN                   => true,          -- implement general purpose input/output port unit (GPIO)?
    IO_GPIO_EN                   => true,          -- implement general purpose input/output port unit (GPIO)?
    IO_MTIME_EN                  => true,          -- implement machine system timer (MTIME)?
    IO_MTIME_EN                  => true,          -- implement machine system timer (MTIME)?
Line 496... Line 498...
  end process ext_mem_c_access;
  end process ext_mem_c_access;
 
 
 
 
  -- Wishbone IRQ Triggers ------------------------------------------------------------------
  -- Wishbone IRQ Triggers ------------------------------------------------------------------
  -- -------------------------------------------------------------------------------------------
  -- -------------------------------------------------------------------------------------------
  ext_irq_trigger: process(clk_gen)
  irq_trigger: process(clk_gen)
  begin
  begin
    if rising_edge(clk_gen) then
    if rising_edge(clk_gen) then
      -- default --
      -- default --
      msi_ring     <= '0';
      msi_ring     <= '0';
      wb_msi.rdata <= (others => '0');
      wb_msi.rdata <= (others => '0');
Line 521... Line 523...
      if ((wb_mei.cyc and wb_mei.stb and wb_mei.we) = '1') then
      if ((wb_mei.cyc and wb_mei.stb and wb_mei.we) = '1') then
        mei_ring   <= '1';
        mei_ring   <= '1';
        wb_mei.ack <= '1';
        wb_mei.ack <= '1';
      end if;
      end if;
    end if;
    end if;
  end process ext_irq_trigger;
  end process irq_trigger;
 
 
 
 
end neorv32_tb_rtl;
end neorv32_tb_rtl;
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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