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

Subversion Repositories rv01_riscv_core

[/] [rv01_riscv_core/] [trunk/] [VHDL/] [SELF_TEST/] [RV01_selftest_TB.vhd] - Rev 2

Compare with Previous | Blame | View Log

-----------------------------------------------------------------
--                                                             --
-----------------------------------------------------------------
--                                                             --
-- Copyright (C) 2016 Stefano Tonello                          --
--                                                             --
-- This source file may be used and distributed without        --
-- restriction provided that this copyright statement is not   --
-- removed from the file and that any derivative work contains --
-- the original copyright notice and the associated disclaimer.--
--                                                             --
-- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY         --
-- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   --
-- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   --
-- FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      --
-- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         --
-- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    --
-- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   --
-- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        --
-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  --
-- LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  --
-- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         --
-- POSSIBILITY OF SUCH DAMAGE.                                 --
--                                                             --
-----------------------------------------------------------------
 
---------------------------------------------------------------
-- RV01 self-test module test-bench
---------------------------------------------------------------
 
---------------------------------------------------------------
-- Notes:
---------------------------------------------------------------
 
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
use STD.textio.all;
 
library work;
 
entity RV01_SELFTEST_TB is
end RV01_SELFTEST_TB;
 
architecture ARC of RV01_SELFTEST_TB is
 
  component RV01_SELFTEST is
    port(
      CLK_i : in std_logic; -- clock
      RST_i : in std_logic; -- reset
 
      DONE_o : out std_logic; -- test complete
      PASS_o : out std_logic -- test pass
    );
  end component;
 
  signal CLK : std_logic := '0';
  signal RST : std_logic := '1';
 
  signal DONE : std_logic;
  signal PASS : std_logic;
 
begin
 
  ---------------------------------------------------
  -- Clock & Reset signals
  ---------------------------------------------------
 
  CLK <= not(CLK) after 10 ns;
 
  RST <= '0' after 20 ns;
 
  ---------------------------------------------------
  -- Self-test module instance
  ---------------------------------------------------
 
  U_DUT : RV01_SELFTEST
    port map(
      CLK_i => CLK,
      RST_i => RST,
 
      DONE_o => DONE,
      PASS_o => PASS
    );
 
end ARC;
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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