EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: sysVmeMapShow on mv2700
From: Andrew Johnson <[email protected]>
To: Matthieu Bec <[email protected]>
Cc: EPICS tech-talk <[email protected]>
Date: Wed, 07 Jun 2006 17:16:29 -0500
Hi Matthieu,

Matthieu Bec wrote:

The APS mv2700/bsp documentation reference a sysVmeMapShow routine. I can not find it in our bsp. Would anyone know how that can be implemented on our systems?

Here's the code for that routine, add the attached source to your sysLib.c file for the mv2700.


- Andrew
--
Not everything that can be counted counts,
and not everything that counts can be counted.
  -- Albert Einstein
/*******************************************************************************
*
* sysVmeMapShow - report mappings between VMEbus and local memory
*
* This routine displays the range of local addresses that map to particular
* VMEbus address space accesses, and the range of VME addresses that access
* local mv2700 memory and registers.
*
* RETURNS: OK
*
* SEE ALSO: sysBusToLocalAdrs(), sysLocalToBusAdrs()
*/

STATUS sysVmeMapShow(void)
    {
    UINT32 base, bound, offset, ctl;

    printf("\nVMEbus access from CPU:\n");
    UNIV_IN_LONG(UNIVERSE_LSI1_BS, &base);
    UNIV_IN_LONG(UNIVERSE_LSI1_BD, &bound);
    UNIV_IN_LONG(UNIVERSE_LSI1_TO, &offset);
    printf("  CPU:\t0x%8.8X - 0x%8.8X  =>  A32: 0x%8.8X - 0x%8.8X\n",
           base, bound - 1, base + offset, bound + offset - 1);

    UNIV_IN_LONG(UNIVERSE_LSI2_BS, &base);
    UNIV_IN_LONG(UNIVERSE_LSI2_BD, &bound);
    UNIV_IN_LONG(UNIVERSE_LSI2_TO, &offset);
    printf("\t0x%8.8X - 0x%8.8X  =>  A24:   0x%6.6X -   0x%6.6X\n",
           base, bound - 1, (base + offset) & 0xffffff,
           (bound + offset - 1) & 0xffffff);

    UNIV_IN_LONG(UNIVERSE_LSI3_BS, &base);
    UNIV_IN_LONG(UNIVERSE_LSI3_BD, &bound);
    UNIV_IN_LONG(UNIVERSE_LSI3_TO, &offset);
    printf("\t0x%8.8X - 0x%8.8X  =>  A16:     0x%4.4X -     0x%4.4X\n",
           base, bound - 1, (base + offset) & 0xffff,
           (bound + offset - 1) & 0xffff);

    printf("\nCPU access from VMEbus:\n");
    UNIV_IN_LONG(UNIVERSE_VSI1_CTL, &ctl);
    if (ctl & VSI_CTL_EN)
        {
        UNIV_IN_LONG(UNIVERSE_VSI1_BS, &base);
#if ((SM_OFF_BOARD == FALSE) && !defined(ANY_BRDS_IN_CHASSIS_NOT_RMW))
        UNIV_IN_LONG(UNIVERSE_VSI5_BD, &bound);
#else
        UNIV_IN_LONG(UNIVERSE_VSI1_BD, &bound);
#endif
        UNIV_IN_LONG(UNIVERSE_VSI1_TO, &offset);
        printf("  A32:\t0x%8.8X - 0x%8.8X  =>  CPU: 0x%8.8X - 0x%8.8X\n",
                base, bound - 1, base + offset, bound + offset - 1);
        }
    else
        printf("  A32:\t           -             =>                  -\n");

    UNIV_IN_LONG(UNIVERSE_VSI2_CTL, &ctl);
    if (ctl & VSI_CTL_EN)
        {
        UNIV_IN_LONG(UNIVERSE_VSI2_BS, &base);
        UNIV_IN_LONG(UNIVERSE_VSI2_BD, &bound);
        UNIV_IN_LONG(UNIVERSE_VSI2_TO, &offset);
        printf("  A24:\t  0x%6.6X -   0x%6.6X  =>       0x%8.8X - 0x%8.8X\n",
                base, bound - 1, base + offset, bound + offset - 1);
        }

    UNIV_IN_LONG(UNIVERSE_VSI0_CTL, &ctl);
    if (ctl & VSI_CTL_EN)
        {
        UNIV_IN_LONG(UNIVERSE_VSI0_BS, &base);
        UNIV_IN_LONG(UNIVERSE_VSI0_BD, &bound);
        UNIV_IN_LONG(UNIVERSE_VSI0_TO, &offset);
        printf("  A24:\t  0x%6.6X -   0x%6.6X  =>       Mailbox Registers\n",
                base, bound - 1);
        }

    return OK;
    }

References:
sysVmeMapShow on mv2700 Matthieu Bec

Navigate by Date:
Prev: Re: StreamDevice 2.1 released Rod Nussbaumer
Next: ioc daemon Christophe Moins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: sysVmeMapShow on mv2700 Matthieu Bec
Next: ioc daemon Christophe Moins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024