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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [rtl/] [ibus/] [ib_sres_or_mon.vhd] - Blame information for rev 24

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 wfjm
-- $Id: ib_sres_or_mon.vhd 336 2010-11-06 18:28:27Z mueller $
2
--
3
-- Copyright 2010- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
--
5
-- This program is free software; you may redistribute and/or modify it under
6
-- the terms of the GNU General Public License as published by the Free
7
-- Software Foundation, either version 2, or at your option any later version.
8
--
9
-- This program is distributed in the hope that it will be useful, but
10
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
-- for complete details.
13
--
14
------------------------------------------------------------------------------
15
-- Module Name:    ib_sres_or_mon - sim
16
-- Description:    ibus result or monitor
17
--
18
-- Dependencies:   -
19
-- Test bench:     -
20
-- Tool versions:  ghdl 0.29
21
--
22
-- Revision History: 
23
-- Date         Rev Version  Comment
24
-- 2010-10-28   336   1.0.1  log errors only if now>0ns (drop startup glitches)
25
-- 2010-10-23   335   1.0    Initial version (derived from rritb_sres_or_mon)
26
------------------------------------------------------------------------------
27
 
28
library ieee;
29
use ieee.std_logic_1164.all;
30
use ieee.std_logic_textio.all;
31
use std.textio.all;
32
 
33
use work.slvtypes.all;
34
use work.iblib.all;
35
 
36
-- ----------------------------------------------------------------------------
37
 
38
entity ib_sres_or_mon is                -- ibus result or monitor
39
  port (
40
    IB_SRES_1  :  in ib_sres_type;                 -- ib_sres input 1
41
    IB_SRES_2  :  in ib_sres_type;                 -- ib_sres input 2
42
    IB_SRES_3  :  in ib_sres_type := ib_sres_init; -- ib_sres input 3
43
    IB_SRES_4  :  in ib_sres_type := ib_sres_init  -- ib_sres input 4
44
  );
45
end ib_sres_or_mon;
46
 
47
architecture sim of ib_sres_or_mon is
48
 
49
begin
50
 
51
  proc_comb : process (IB_SRES_1, IB_SRES_2, IB_SRES_3, IB_SRES_4)
52
    constant dzero : slv16 := (others=>'0');
53
    variable oline : line;
54
    variable nack  : integer := 0;
55
    variable nbusy : integer := 0;
56
    variable ndout : integer := 0;
57
  begin
58
 
59
    nack  := 0;
60
    nbusy := 0;
61
    ndout := 0;
62
 
63
    if IB_SRES_1.ack  /= '0' then nack  := nack  + 1;  end if;
64
    if IB_SRES_2.ack  /= '0' then nack  := nack  + 1;  end if;
65
    if IB_SRES_3.ack  /= '0' then nack  := nack  + 1;  end if;
66
    if IB_SRES_4.ack  /= '0' then nack  := nack  + 1;  end if;
67
 
68
    if IB_SRES_1.busy /= '0' then nbusy := nbusy + 1;  end if;
69
    if IB_SRES_2.busy /= '0' then nbusy := nbusy + 1;  end if;
70
    if IB_SRES_3.busy /= '0' then nbusy := nbusy + 1;  end if;
71
    if IB_SRES_4.busy /= '0' then nbusy := nbusy + 1;  end if;
72
 
73
    if IB_SRES_1.dout /= dzero then ndout := ndout + 1;  end if;
74
    if IB_SRES_2.dout /= dzero then ndout := ndout + 1;  end if;
75
    if IB_SRES_3.dout /= dzero then ndout := ndout + 1;  end if;
76
    if IB_SRES_4.dout /= dzero then ndout := ndout + 1;  end if;
77
 
78
    if now > 0 ns and (nack>1 or nbusy>1 or ndout>1) then
79
      write(oline, now, right, 12);
80
      if nack > 1 then
81
        write(oline, string'(" #ack="));
82
        write(oline, nack);
83
      end if;
84
      if nbusy > 1 then
85
        write(oline, string'(" #busy="));
86
        write(oline, nbusy);
87
      end if;
88
      if ndout > 1 then
89
        write(oline, string'(" #dout="));
90
        write(oline, ndout);
91
      end if;
92
      write(oline, string'(" FAIL in "));
93
      write(oline, ib_sres_or_mon'path_name);
94
      writeline(output, oline);
95
    end if;
96
 
97
  end process proc_comb;
98
 
99
end sim;

powered by: WebSVN 2.1.0

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