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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [rtl/] [vlib/] [rbus/] [rbd_eyemon.vhd] - Diff between revs 12 and 13

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

Rev 12 Rev 13
Line 1... Line 1...
-- $Id: rbd_eyemon.vhd 406 2011-08-14 21:06:44Z mueller $
-- $Id: rbd_eyemon.vhd 427 2011-11-19 21:04:11Z mueller $
--
--
-- Copyright 2010-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
-- Copyright 2010-2011 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
--
-- This program is free software; you may redistribute and/or modify it under
-- This program is free software; you may redistribute and/or modify it under
-- the terms of the GNU General Public License as published by the Free
-- the terms of the GNU General Public License as published by the Free
Line 18... Line 18...
-- Dependencies:   memlib/ram_2swsr_wfirst_gen
-- Dependencies:   memlib/ram_2swsr_wfirst_gen
--
--
-- Test bench:     -
-- Test bench:     -
--
--
-- Target Devices: generic
-- Target Devices: generic
-- Tool versions:  xst 12.1; ghdl 0.29
-- Tool versions:  xst 12.1, 13.1; ghdl 0.29
--
--
-- Synthesized (xst):
-- Synthesized (xst):
-- Date         Rev  ise         Target      flop lutl lutm slic t peri
-- Date         Rev  ise         Target      flop lutl lutm slic t peri
-- 2011-04-02   374 12.1    M53d xc3s1000-4    46  154    -  109 s  8.7
-- 2011-04-02   374 12.1    M53d xc3s1000-4    46  154    -  109 s  8.7
-- 2010-12-27   349 12.1    M53d xc3s1000-4    45  147    -  106 s  8.9
-- 2010-12-27   349 12.1    M53d xc3s1000-4    45  147    -  106 s  8.9
--
--
-- Revision History: 
-- Revision History: 
-- Date         Rev Version  Comment
-- Date         Rev Version  Comment
 
-- 2011-11-19   427   1.0.3  now numeric_std clean
-- 2011-04-02   375   1.0.2  handle back-to-back chars properly (in sim..)
-- 2011-04-02   375   1.0.2  handle back-to-back chars properly (in sim..)
-- 2010-12-31   352   1.0.1  simplify irb_ack logic
-- 2010-12-31   352   1.0.1  simplify irb_ack logic
-- 2010-12-27   349   1.0    Initial version 
-- 2010-12-27   349   1.0    Initial version 
------------------------------------------------------------------------------
------------------------------------------------------------------------------
--
--
Line 54... Line 55...
--     word 0  counter lsb's
--     word 0  counter lsb's
-- 
-- 
 
 
library ieee;
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.numeric_std.all;
 
 
use work.slvtypes.all;
use work.slvtypes.all;
use work.memlib.all;
use work.memlib.all;
use work.rblib.all;
use work.rblib.all;
 
 
entity rbd_eyemon is                    -- rbus dev: eye monitor for serport's
entity rbd_eyemon is                    -- rbus dev: eye monitor for serport's
  generic (
  generic (
    RB_ADDR : slv8 := conv_std_logic_vector(2#11111000#,8);
    RB_ADDR : slv8 := slv(to_unsigned(2#11111000#,8));
    RDIV : slv8 := conv_std_logic_vector(0,8));
    RDIV : slv8 := slv(to_unsigned(0,8)));
  port (
  port (
    CLK  : in slbit;                    -- clock
    CLK  : in slbit;                    -- clock
    RESET : in slbit;                   -- reset
    RESET : in slbit;                   -- reset
    RB_MREQ : in rb_mreq_type;          -- rbus: request
    RB_MREQ : in rb_mreq_type;          -- rbus: request
    RB_SRES : out rb_sres_type;         -- rbus: response
    RB_SRES : out rb_sres_type;         -- rbus: response
Line 158... Line 159...
      DOB    => open
      DOB    => open
    );
    );
 
 
  proc_regs: process (CLK)
  proc_regs: process (CLK)
  begin
  begin
    if CLK'event and CLK='1' then
    if rising_edge(CLK) then
      if RESET = '1' then
      if RESET = '1' then
        R_REGS <= regs_init;
        R_REGS <= regs_init;
      else
      else
        R_REGS <= N_REGS;
        R_REGS <= N_REGS;
      end if;
      end if;
Line 311... Line 312...
          n.rdivcnt := r.rdiv;
          n.rdivcnt := r.rdiv;
          if unsigned(r.laddr) /= (2**r.laddr'length)-1 then
          if unsigned(r.laddr) /= (2**r.laddr'length)-1 then
            laddr_inc := '1';
            laddr_inc := '1';
          end if;
          end if;
        else
        else
          n.rdivcnt := unsigned(r.rdivcnt) - 1;
          n.rdivcnt := slv(unsigned(r.rdivcnt) - 1);
        end if;
        end if;
 
 
      when s_clr =>                     -- s_clr: clear memory ---------------
      when s_clr =>                     -- s_clr: clear memory ---------------
        laddr_inc := '1';
        laddr_inc := '1';
        n.memwe  := '1';
        n.memwe  := '1';
Line 331... Line 332...
    if laddr_we = '1' then
    if laddr_we = '1' then
      n.laddr := RB_MREQ.din(addr_rbf_laddr);
      n.laddr := RB_MREQ.din(addr_rbf_laddr);
    elsif laddr_clr = '1' then
    elsif laddr_clr = '1' then
      n.laddr := (others=>'0');
      n.laddr := (others=>'0');
    elsif laddr_inc = '1' then
    elsif laddr_inc = '1' then
      n.laddr := unsigned(r.laddr) + 1;
      n.laddr := slv(unsigned(r.laddr) + 1);
    end if;
    end if;
 
 
    n.laddr_1 := r.laddr;
    n.laddr_1 := r.laddr;
    n.rxsd_1  := RXSD;
    n.rxsd_1  := RXSD;
 
 
    ibramdi := (others=>'0');
    ibramdi := (others=>'0');
    if r.memclr = '0' then
    if r.memclr = '0' then
      ibramdi := unsigned(BRAM_DOA) + 1;
      ibramdi := slv(unsigned(BRAM_DOA) + 1);
    end if;
    end if;
 
 
    N_REGS <= n;
    N_REGS <= n;
 
 
    BRAM_ENA <= ibramen;
    BRAM_ENA <= ibramen;

powered by: WebSVN 2.1.0

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