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

Subversion Repositories fixed_extensions

[/] [fixed_extensions/] [trunk/] [bench/] [vhdl/] [testrounding_tb.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 kavi
-- File automatically generated by "cdfg2hdl".
2
-- Filename: testrounding_tb.vhd
3
-- Date: 28 April 2011 02:50:35 PM
4
-- Author: Nikolaos Kavvadias (C) 2009, 2010
5
 
6
library IEEE, STD;
7
use STD.textio.all;
8
use IEEE.numeric_std.all;
9
use WORK.fixed_float_types.all;
10
use WORK.fixed_pkg.all;
11
use WORK.fixed_extensions_pkg.all;
12
use IEEE.std_logic_1164.all;
13
 
14
entity testrounding_tb is
15
end testrounding_tb;
16
 
17
architecture tb_arch of testrounding_tb is
18
  component testrounding
19
    port (
20
      clk : in std_logic;
21
      reset : in std_logic;
22
      start : in std_logic;
23
      ok : out sfixed(3 downto -4)
24
    );
25
  end component;
26
  signal clk : std_logic;
27
  signal reset : std_logic;
28
  signal start : std_logic;
29
  signal ok : sfixed(3 downto -4);
30
  -- Profiling signals
31
  signal ncycles : integer;
32
  -- Constant declarations
33
  constant CLK_PERIOD : time := 10 ns;
34
begin
35
  uut : testrounding
36
    port map (
37
      clk => clk,
38
      reset => reset,
39
      start => start,
40
      ok => ok
41
    );
42
 
43
  CLK_GEN_PROC: process(clk)
44
  begin
45
    if (clk = 'U') then
46
      clk <= '1';
47
    else
48
      clk <= not clk after CLK_PERIOD/2;
49
    end if;
50
  end process CLK_GEN_PROC;
51
 
52
  RESET_START_STIM: process
53
  begin
54
    reset <= '1';
55
    start <= '0';
56
    wait for CLK_PERIOD;
57
    reset <= '0';
58
    start <= '1';
59
    wait for 2000*CLK_PERIOD;
60
    -- Automatic end of the current simulation.
61
    assert false
62
      report "NONE. End simulation time reached"
63
      severity failure;
64
  end process RESET_START_STIM;
65
 
66
end tb_arch;

powered by: WebSVN 2.1.0

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