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

Subversion Repositories pltbutils

[/] [pltbutils/] [trunk/] [src/] [vhdl/] [pltbutils_user_cfg_pkg.vhd] - Diff between revs 21 and 35

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

Rev 21 Rev 35
Line 52... Line 52...
----                                                              ----
----                                                              ----
----------------------------------------------------------------------
----------------------------------------------------------------------
library ieee;
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use ieee.numeric_std.all;
use std.textio.all;
--use std.textio.all;
--use std.env.all; -- Uncomment if using stop or finish in custom_stopsim() below.
--use std.env.all; -- Uncomment if using stop or finish in custom_stopsim() below.
use work.txt_util.all;
use work.txt_util.all;
use work.pltbutils_type_pkg.all; -- Use for VHDL-2002 protected types, comment out for VHDL-93
 
 
 
package pltbutils_user_cfg_pkg is
package pltbutils_user_cfg_pkg is
 
 
  --- Constants ---
  --- Constants ---
  -- The user is free to modify the values to fit his/her requirements.
  -- The user is free to modify the values to fit his/her requirements.
Line 79... Line 78...
  constant C_PLTBUTILS_USE_CUSTOM_STOPSIM       : boolean := false;
  constant C_PLTBUTILS_USE_CUSTOM_STOPSIM       : boolean := false;
 
 
  --- Procedure declarations ---
  --- Procedure declarations ---
  -- The user should NOT modify these.
  -- The user should NOT modify these.
 
 
 
  procedure custom_stopsim(
 
    constant timestamp          : in time
 
  );
 
 
  procedure custom_startsim_msg(
  procedure custom_startsim_msg(
    constant testcase_name      : in string;
    constant testcase_name      : in string;
    constant timestamp          : in time
    constant timestamp          : in time
  );
  );
 
 
Line 109... Line 112...
    constant num_errors_in_test : in integer
    constant num_errors_in_test : in integer
  );
  );
 
 
  procedure custom_check_msg(
  procedure custom_check_msg(
    constant rpt                : in string;
    constant rpt                : in string;
 
    constant timestamp          : in time;
    constant expr               : in boolean;
    constant expr               : in boolean;
    constant actual             : in string;
    constant actual             : in string;
    constant expected           : in string;
    constant expected           : in string;
    constant mask               : in string;
    constant mask               : in string;
    constant test_num           : in integer;
    constant test_num           : in integer;
Line 127... Line 131...
    constant test_num           : in integer;
    constant test_num           : in integer;
    constant test_name          : in string;
    constant test_name          : in string;
    constant err_cnt_in_test    : in integer
    constant err_cnt_in_test    : in integer
  );
  );
 
 
  procedure custom_stopsim(
 
    constant timestamp          : in time
 
  );
 
 
 
  --- User's function and procedure declarations ---
  --- User's function and procedure declarations ---
  -- Example for use with TeamCity. Remove, modify or replace
  -- Example for use with TeamCity. Remove, modify or replace
  -- to suit other other continous integration tools or scripts, if you need to.
  -- to suit other other continous integration tools or scripts, if you need to.
  function tcfilter(
  function tcfilter(
    constant s : string
    constant s : string
Line 146... Line 146...
 
 
  --- Procedure definitions ---
  --- Procedure definitions ---
  -- The user should NOT modify the arguments,
  -- The user should NOT modify the arguments,
  -- but the behaviour is free to modify to fit the user's requirements.
  -- but the behaviour is free to modify to fit the user's requirements.
 
 
 
  procedure custom_stopsim(
 
    constant timestamp          : in time
 
  ) is
 
  begin
 
    -- The best way to stop a simulation differs between different simulators.
 
    -- Below are some examples. Modify to suit your simulator.
 
 
 
    -- Works with some simulators that supports VHDL-2008. 
 
    -- Requires that 'use std.env.all' at the top of the file is uncommented.
 
    --stop;
 
 
 
    -- Works with some simulators that support VHDL-2008. 
 
    -- Requires that 'use std.env.all' at the top of the file is uncommented.
 
    --finish;
 
 
 
    -- Works in all simulators known by the author, but ugly.
 
    assert false
 
    report "--- FORCE END OF SIMULATION ---" &
 
           " (ignore this false failure message, it's not a real failure)"
 
    severity failure;
 
 
 
  end procedure custom_stopsim;
 
 
  -- Example custom messages for TeamCity.
  -- Example custom messages for TeamCity.
  -- Edit to suit other continous integration tools or scripts, if you need to.
  -- Edit to suit other continous integration tools or scripts, if you need to.
  -- General TeamCity information: http://www.jetbrains.com/teamcity/
  -- General TeamCity information: http://www.jetbrains.com/teamcity/
  --                               http://en.wikipedia.org/wiki/Teamcity
  --                               http://en.wikipedia.org/wiki/Teamcity
  -- TeamCity test reporting:      http://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingTests
  -- TeamCity test reporting:      http://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingTests
Line 197... Line 220...
    print("##teamcity[testFinished name='" & tcfilter(test_name) & "']");
    print("##teamcity[testFinished name='" & tcfilter(test_name) & "']");
  end procedure custom_endtest_msg;
  end procedure custom_endtest_msg;
 
 
  procedure custom_check_msg(
  procedure custom_check_msg(
    constant rpt                : in string;
    constant rpt                : in string;
 
    constant timestamp          : in time;
    constant expr               : in boolean;
    constant expr               : in boolean;
    constant actual             : in string;
    constant actual             : in string;
    constant expected           : in string;
    constant expected           : in string;
    constant mask               : in string;
    constant mask               : in string;
    constant test_num           : in integer;
    constant test_num           : in integer;
Line 262... Line 286...
    else
    else
      print("(TeamCity error message filtered out, because max one message is allowed for each test)");
      print("(TeamCity error message filtered out, because max one message is allowed for each test)");
    end if;
    end if;
  end procedure custom_error_msg;
  end procedure custom_error_msg;
 
 
  procedure custom_stopsim(
 
    constant timestamp          : in time
 
  ) is
 
  begin
 
    -- The best way to stop a simulation differs between different simulators.
 
    -- Below are some examples. Modify to suit your simulator.
 
 
 
    -- Works with some simulators. 
 
    -- Requires that 'use std.env.all' at the top of the file is uncommented.
 
    --stop; -- VHDL-2008
 
 
 
    -- Works with some simulators. 
 
    -- Requires that 'use std.env.all' at the top of the file is uncommented.
 
    --finish; -- VHDL-2008
 
 
 
    -- Works in all simulators known by the author, but ugly.
 
    assert false
 
    report "--- FORCE END OF SIMULATION ---" &
 
           " (ignore this false failure message, it's not a real failure)"
 
    severity failure;
 
 
 
  end procedure custom_stopsim;
 
 
 
  --- User's function and procedure definitions ---
  --- User's function and procedure definitions ---
  -- Example for use with TeamCity. Remove, modify or replace
  -- Example for use with TeamCity. Remove, modify or replace
  -- to suit other other continous integration tools or scripts, if you need to.
  -- to suit other other continous integration tools or scripts, if you need to.
 
 
  -- TeamCity string filter. Filters out characters which are not allowed in TeamCity messages.
  -- TeamCity string filter. Filters out characters which are not allowed in TeamCity messages.

powered by: WebSVN 2.1.0

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