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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.61/] [rtl/] [vlib/] [rbus/] [rb_sres_or_mon.vhd] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 wfjm
-- $Id: rritb_sres_or_mon.vhd 314 2010-07-09 17:38:41Z 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:    rritb_sres_or_mon - sim
16
-- Description:    rribus result or monitor
17
--
18
-- Dependencies:   -
19
-- Test bench:     -
20
-- Tool versions:  ghdl 0.29
21
-- Revision History: 
22
-- Date         Rev Version  Comment
23
-- 2010-06-26   309   1.0    Initial version 
24
------------------------------------------------------------------------------
25
 
26
library ieee;
27
use ieee.std_logic_1164.all;
28
use ieee.std_logic_textio.all;
29
use std.textio.all;
30
 
31
use work.slvtypes.all;
32
use work.rrilib.all;
33
 
34
-- ----------------------------------------------------------------------------
35
 
36
entity rritb_sres_or_mon is             -- rribus result or monitor
37
  port (
38
    RB_SRES_1  :  in rb_sres_type;                 -- rb_sres input 1
39
    RB_SRES_2  :  in rb_sres_type;                 -- rb_sres input 2
40
    RB_SRES_3  :  in rb_sres_type := rb_sres_init; -- rb_sres input 3
41
    RB_SRES_4  :  in rb_sres_type := rb_sres_init  -- rb_sres input 4
42
  );
43
end rritb_sres_or_mon;
44
 
45
architecture sim of rritb_sres_or_mon is
46
 
47
begin
48
 
49
  proc_comb : process (RB_SRES_1, RB_SRES_2, RB_SRES_3, RB_SRES_4)
50
    constant dzero : slv16 := (others=>'0');
51
    variable oline : line;
52
    variable nack  : integer := 0;
53
    variable nbusy : integer := 0;
54
    variable nerr  : integer := 0;
55
    variable ndout : integer := 0;
56
  begin
57
 
58
    nack  := 0;
59
    nbusy := 0;
60
    nerr  := 0;
61
    ndout := 0;
62
 
63
    if RB_SRES_1.ack  /= '0' then nack  := nack  + 1;  end if;
64
    if RB_SRES_2.ack  /= '0' then nack  := nack  + 1;  end if;
65
    if RB_SRES_3.ack  /= '0' then nack  := nack  + 1;  end if;
66
    if RB_SRES_4.ack  /= '0' then nack  := nack  + 1;  end if;
67
 
68
    if RB_SRES_1.busy /= '0' then nbusy := nbusy + 1;  end if;
69
    if RB_SRES_2.busy /= '0' then nbusy := nbusy + 1;  end if;
70
    if RB_SRES_3.busy /= '0' then nbusy := nbusy + 1;  end if;
71
    if RB_SRES_4.busy /= '0' then nbusy := nbusy + 1;  end if;
72
 
73
    if RB_SRES_1.err  /= '0' then nerr  := nerr  + 1;  end if;
74
    if RB_SRES_2.err  /= '0' then nerr  := nerr  + 1;  end if;
75
    if RB_SRES_3.err  /= '0' then nerr  := nerr  + 1;  end if;
76
    if RB_SRES_4.err  /= '0' then nerr  := nerr  + 1;  end if;
77
 
78
    if RB_SRES_1.dout /= dzero then ndout := ndout + 1;  end if;
79
    if RB_SRES_2.dout /= dzero then ndout := ndout + 1;  end if;
80
    if RB_SRES_3.dout /= dzero then ndout := ndout + 1;  end if;
81
    if RB_SRES_4.dout /= dzero then ndout := ndout + 1;  end if;
82
 
83
    if nack>1 or nbusy>1 or nerr>1 or ndout>1 then
84
      write(oline, now, right, 12);
85
      if nack > 1 then
86
        write(oline, string'(" #ack="));
87
        write(oline, nack);
88
      end if;
89
      if nbusy > 1 then
90
        write(oline, string'(" #busy="));
91
        write(oline, nbusy);
92
      end if;
93
      if nerr > 1 then
94
        write(oline, string'(" #err="));
95
        write(oline, nerr);
96
      end if;
97
      if ndout > 1 then
98
        write(oline, string'(" #dout="));
99
        write(oline, ndout);
100
      end if;
101
      write(oline, string'(" FAIL in "));
102
      write(oline, rritb_sres_or_mon'path_name);
103
      writeline(output, oline);
104
    end if;
105
 
106
  end process proc_comb;
107
 
108
end sim;

powered by: WebSVN 2.1.0

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