Experimental Physics and
| |||||||||||||||||
|
Matthieu Bec wrote:
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; }
| ||||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |