⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vmeuniverse.h

📁 RTEMS (Real-Time Executive for Multiprocessor Systems) is a free open source real-time operating sys
💻 H
📖 第 1 页 / 共 3 页
字号:
# define	UNIV_LINT_STAT_MBOX0	(1<<16)	/* mailbox 0 status */# define 	UNIV_LINT_STAT_ACFAIL	(1<<15)	/* ACFAIL irq status */# define 	UNIV_LINT_STAT_SYSFAIL	(1<<14)	/* SYSFAIL irq status */# define 	UNIV_LINT_STAT_SW_INT	(1<<13)	/* PCI (local) software irq */# define 	UNIV_LINT_STAT_SW_IACK	(1<<12)	/* VME software IACK status */# define	UNIV_LINT_STAT_VERR		(1<<10)	/* PCI VERR irq status */# define	UNIV_LINT_STAT_LERR		(1<<9)	/* PCI LERR irq status */# define	UNIV_LINT_STAT_DMA		(1<<8)	/* PCI DMA irq status */# define	UNIV_LINT_STAT_VIRQ7	(1<<7)	/* VIRQ7 status */# define	UNIV_LINT_STAT_VIRQ6	(1<<6)	/* VIRQ6 status */# define	UNIV_LINT_STAT_VIRQ5	(1<<5)	/* VIRQ5 status */# define	UNIV_LINT_STAT_VIRQ4	(1<<4)	/* VIRQ4 status */# define	UNIV_LINT_STAT_VIRQ3	(1<<3)	/* VIRQ3 status */# define	UNIV_LINT_STAT_VIRQ2	(1<<2)	/* VIRQ2 status */# define	UNIV_LINT_STAT_VIRQ1	(1<<1)	/* VIRQ1 status */# define	UNIV_LINT_STAT_VOWN		(1<<0)	/* VOWN status */# define	UNIV_LINT_STAT_CLR		(0xfff7ff)/* Clear all status bits *//* PCI (local) interrupt map 0 register */#define		UNIV_REGOFF_LINT_MAP0	0x308	/* mapping of VME IRQ sources to PCI irqs */# define	UNIV_LINT_MAP0_VIRQ7(lint)	(((lint)&0x7)<<(7*4))# define	UNIV_LINT_MAP0_VIRQ6(lint)	(((lint)&0x7)<<(6*4))# define	UNIV_LINT_MAP0_VIRQ5(lint)	(((lint)&0x7)<<(5*4))# define	UNIV_LINT_MAP0_VIRQ4(lint)	(((lint)&0x7)<<(4*4))# define	UNIV_LINT_MAP0_VIRQ3(lint)	(((lint)&0x7)<<(3*4))# define	UNIV_LINT_MAP0_VIRQ2(lint)	(((lint)&0x7)<<(2*4))# define	UNIV_LINT_MAP0_VIRQ1(lint)	(((lint)&0x7)<<(1*4))# define	UNIV_LINT_MAP0_VOWN(lint)	(((lint)&0x7)<<(0*4))#define		UNIV_REGOFF_LINT_MAP1	0x30c	/* mapping of internal / VME IRQ sources to PCI irqs */# define	UNIV_LINT_MAP1_ACFAIL(lint)	(((lint)&0x7)<<(7*4))# define	UNIV_LINT_MAP1_SYSFAIL(lint)	(((lint)&0x7)<<(6*4))# define	UNIV_LINT_MAP1_SW_INT(lint)	(((lint)&0x7)<<(5*4))# define	UNIV_LINT_MAP1_SW_IACK(lint)	(((lint)&0x7)<<(4*4))# define	UNIV_LINT_MAP1_VERR(lint)	(((lint)&0x7)<<(2*4))# define	UNIV_LINT_MAP1_LERR(lint)	(((lint)&0x7)<<(1*4))# define	UNIV_LINT_MAP1_DMA(lint)	(((lint)&0x7)<<(0*4))/* enabling of generation of VME bus IRQs, TODO */#define		UNIV_REGOFF_VINT_EN		0x310# define	UNIV_VINT_EN_DISABLE_ALL    0/* status of generation of VME bus IRQs, TODO */#define		UNIV_REGOFF_VINT_STAT	0x314# define	UNIV_VINT_STAT_LINT(lint)	(1<<((lint)&7))# define	UNIV_VINT_STAT_LINT_MASK	(0xff)# define	UNIV_VINT_STAT_CLR			(0xfe0f17ff)#define		UNIV_REGOFF_VINT_MAP0	0x318	/* VME destination of PCI IRQ source, TODO */#define		UNIV_REGOFF_VINT_MAP1	0x31c	/* VME destination of PCI IRQ source, TODO */#define		UNIV_REGOFF_VINT_STATID	0x320	/* our status/id response to IACK, TODO */#define		UNIV_REGOFF_VIRQ1_STATID 0x324	/* status/id of VME IRQ level 1 */#define		UNIV_REGOFF_VIRQ2_STATID 0x328	/* status/id of VME IRQ level 2 */#define		UNIV_REGOFF_VIRQ3_STATID 0x32c	/* status/id of VME IRQ level 3 */#define		UNIV_REGOFF_VIRQ4_STATID 0x330	/* status/id of VME IRQ level 4 */#define		UNIV_REGOFF_VIRQ5_STATID 0x334	/* status/id of VME IRQ level 5 */#define		UNIV_REGOFF_VIRQ6_STATID 0x338	/* status/id of VME IRQ level 6 */#define		UNIV_REGOFF_VIRQ7_STATID 0x33c	/* status/id of VME IRQ level 7 */# define	UNIV_VIRQ_ERR			(1<<8)	/* set if universe encountered a bus error when doing IACK */# define	UNIV_VIRQ_STATID_MASK		(0xff)#define		UNIV_REGOFF_LINT_MAP2	0x340	/* mapping of internal sources to PCI irqs */# define	UNIV_LINT_MAP2_LM3(lint)	(((lint)&0x7)<<7*4)	/* location monitor 3 */# define	UNIV_LINT_MAP2_LM2(lint)	(((lint)&0x7)<<6*4)	/* location monitor 2 */# define	UNIV_LINT_MAP2_LM1(lint)	(((lint)&0x7)<<5*4)	/* location monitor 1 */# define	UNIV_LINT_MAP2_LM0(lint)	(((lint)&0x7)<<4*4)	/* location monitor 0 */# define	UNIV_LINT_MAP2_MBOX3(lint)	(((lint)&0x7)<<3*4)	/* mailbox 3 */# define	UNIV_LINT_MAP2_MBOX2(lint)	(((lint)&0x7)<<2*4)	/* mailbox 2 */# define	UNIV_LINT_MAP2_MBOX1(lint)	(((lint)&0x7)<<1*4)	/* mailbox 1 */# define	UNIV_LINT_MAP2_MBOX0(lint)	(((lint)&0x7)<<0*4)	/* mailbox 0 */#define		UNIV_REGOFF_VINT_MAP2	0x344	/* mapping of internal sources to VME irqs */# define	UNIV_VINT_MAP2_MBOX3(vint)	(((vint)&0x7)<<3*4)	/* mailbox 3 */# define	UNIV_VINT_MAP2_MBOX2(vint)	(((vint)&0x7)<<2*4)	/* mailbox 2 */# define	UNIV_VINT_MAP2_MBOX1(vint)	(((vint)&0x7)<<1*4)	/* mailbox 1 */# define	UNIV_VINT_MAP2_MBOX0(vint)	(((vint)&0x7)<<0*4)	/* mailbox 0 */#define		UNIV_REGOFF_MBOX0	0x348	/* mailbox 0 */#define		UNIV_REGOFF_MBOX1	0x34c	/* mailbox 1 */#define		UNIV_REGOFF_MBOX2	0x350	/* mailbox 2 */#define		UNIV_REGOFF_MBOX3	0x354	/* mailbox 3 */#define		UNIV_REGOFF_SEMA0	0x358	/* semaphore 0 */#define		UNIV_REGOFF_SEMA1	0x35c	/* semaphore 0 *//* TODO define semaphore register bits */#define		UNIV_REGOFF_MAST_CTL	0x400	/* master control register */# define	UNIV_MAST_CTL_MAXRTRY(val)	(((val)&0xf)<<7*4)	/* max # of pci master retries */# define	UNIV_MAST_CTL_PWON(val)		(((val)&0xf)<<6*4)	/* posted write xfer count */# define	UNIV_MAST_CTL_VRL(val)		(((val)&0x3)<<22)	/* VME bus request level */# define	UNIV_MAST_CTL_VRM			(1<<21)	/* bus request mode (demand = 0, fair = 1) */# define	UNIV_MAST_CTL_VREL			(1<<20)	/* bus release mode (when done = 0, on request = 1) */# define	UNIV_MAST_CTL_VOWN			(1<<19)	/* bus ownership (release = 0, acquire/hold = 1) */# define	UNIV_MAST_CTL_VOWN_ACK		(1<<18)	/* bus ownership (not owned = 0, acquired/held = 1) */# define	UNIV_MAST_CTL_PABS(val)		(((val)&0x3)<<3*4)	/* PCI aligned burst size (32,64,128 byte / 0x3 is reserved) */# define	UNIV_MAST_CTL_BUS_NO(val)	(((val)&0xff)<<0*4)	/* PCI bus number */#define		UNIV_REGOFF_MISC_CTL	0x404	/* misc control register */# define	UNIV_MISC_CTL_VBTO(val)		(((val)&0x7)<<7*4)	/* VME bus timeout (0=disable, 16*2^(val-1) us) */# define	UNIV_MISC_CTL_VARB			(1<<26)	/* VME bus arbitration mode (0=round robin, 1= priority) */# define	UNIV_MISC_CTL_VARBTO(val)	(((val)&0x3)<<6*4)	/* arbitration time out: disable, 16us, 256us, reserved */# define	UNIV_MISC_CTL_SW_LRST		(1<<23)	/* software PCI reset */# define	UNIV_MISC_CTL_SW_SYSRST		(1<<22)	/* software VME reset */# define	UNIV_MISC_CTL_BI			(1<<20)	/* BI mode */# define	UNIV_MISC_CTL_ENGBI			(1<<19)	/* enable global BI mode initiator */# define	UNIV_MISC_CTL_SYSCON		(1<<17)	/* (R/W) 1:universe is system controller */# define	UNIV_MISC_CTL_V64AUTO		(1<<16)	/* (R/W) 1:initiate VME64 auto id slave participation *//* U2SPEC described in VGM manual *//* NOTE: the Joerger vtr10012_8 needs the timing to be tweaked!!!! READt27 must be _no_delay_ */#define		UNIV_REGOFF_U2SPEC		0x4fc# define	UNIV_U2SPEC_DTKFLTR			(1<<12)	/* DTAck filter: 0: slow, better filter; 1: fast, poorer filter */# define	UNIV_U2SPEC_MASt11			(1<<10)	/* Master parameter t11 (DS hi time during BLT and MBLTs) */# define	UNIV_U2SPEC_READt27_DEFAULT	(0<<8)	/* VME master parameter t27: (latch data after DTAck + 25ns) */# define	UNIV_U2SPEC_READt27_FAST	(1<<8)	/* VME master parameter t27: (latch data faster than 25ns)  */# define	UNIV_U2SPEC_READt27_NODELAY	(2<<8)	/* VME master parameter t27: (latch data without any delay)  */# define	UNIV_U2SPEC_POSt28_FAST		(1<<2)	/* VME slave parameter t28: (faster time of DS to DTAck for posted write) */# define	UNIV_U2SPEC_PREt28_FAST		(1<<0)	/* VME slave parameter t28: (faster time of DS to DTAck for prefetch read) *//* Location Monitor control register */#define		UNIV_REGOFF_LM_CTL		0xf64# define	UNIV_LM_CTL_EN				(1<<31)	/* image enable */ # define	UNIV_LM_CTL_PGM				(1<<23)	/* program AM */# define	UNIV_LM_CTL_DATA			(1<<22)	/* data AM */# define	UNIV_LM_CTL_SUPER			(1<<21)	/* supervisor AM */# define	UNIV_LM_CTL_USER			(1<<20)	/* user AM */# define	UNIV_LM_CTL_VAS_A16			(0<<16)	/* A16 */# define	UNIV_LM_CTL_VAS_A24			(1<<16)	/* A16 */# define	UNIV_LM_CTL_VAS_A32			(2<<16)	/* A16 *//* Location Monitor base address */#define		UNIV_REGOFF_LM_BS		0xf68/* VMEbus register access image control register */#define		UNIV_REGOFF_VRAI_CTL	0xf70# define	UNIV_VRAI_CTL_EN			(1<<31)	/* image enable */ # define	UNIV_VRAI_CTL_PGM			(1<<23)	/* program AM */# define	UNIV_VRAI_CTL_DATA			(1<<22)	/* data AM */# define	UNIV_VRAI_CTL_SUPER			(1<<21)	/* supervisor AM */# define	UNIV_VRAI_CTL_USER			(1<<20)	/* user AM */# define	UNIV_VRAI_CTL_VAS_A16		(0<<16)	/* A16 */# define	UNIV_VRAI_CTL_VAS_A24		(1<<16)	/* A16 */# define	UNIV_VRAI_CTL_VAS_A32		(2<<16)	/* A16 *//* VMEbus register acces image base address register */#define		UNIV_REGOFF_VRAI_BS		0xf74/* VMEbus CSR control register */#define		UNIV_REGOFF_VCSR_CTL	0xf80# define	UNIV_VCSR_CTL_EN			(1<<31)	/* image enable */# define	UNIV_VCSR_CTL_LAS_PCI_MEM	(0<<0)	/* pci mem space */# define	UNIV_VCSR_CTL_LAS_PCI_IO	(1<<0)	/* pci IO space */# define	UNIV_VCSR_CTL_LAS_PCI_CFG	(2<<0)	/* pci config space *//* VMEbus CSR translation offset */#define		UNIV_REGOFF_VCSR_TO		0xf84/* VMEbus AM code error log */#define		UNIV_REGOFF_V_AMERR		0xf88# define	UNIV_V_AMERR_AMERR(reg)		(((reg)>>26)&0x3f)	/* extract error log code */# define	UNIV_V_AMERR_IACK			(1<<25)	/* VMEbus IACK signal */# define	UNIV_V_AMERR_M_ERR			(1<<24)	/* multiple errors occurred */# define	UNIV_V_AMERR_V_STAT			(1<<23)	/* log status valid (write 1 to clear) *//* VMEbus address error log */#define		UNIV_REGOFF_VAERR		0xf8c		/* address of fault address (if MERR_V_STAT valid) *//* VMEbus CSR bit clear register */#define		UNIV_REGOFF_VCSR_CLR	0xff4# define	UNIV_VCSR_CLR_RESET			(1<<31)	/* read/negate LRST (can only be written from VME bus */# define	UNIV_VCSR_CLR_SYSFAIL		(1<<30)	/* read/negate SYSFAIL */# define	UNIV_VCSR_CLR_FAIL			(1<<29)	/* read: board has failed *//* VMEbus CSR bit set register */#define		UNIV_REGOFF_VCSR_SET		(0xff8)# define	UNIV_VCSR_SET_RESET			(1<<31)	/* read/assert LRST (can only be written from VME bus */# define	UNIV_VCSR_SET_SYSFAIL		(1<<30)	/* read/assert SYSFAIL */# define	UNIV_VCSR_SET_FAIL			(1<<29)	/* read: board has failed *//* VMEbus CSR base address register */#define		UNIV_REGOFF_VCSR_BS		0xffc#define		UNIV_VCSR_BS_MASK			(0xfff80000)#ifdef __cplusplusextern "C" {#endif/* base address and IRQ line of 1st universe bridge * NOTE: vmeUniverseInit() must be called before *       these may be used. */extern volatile LERegister *vmeUniverse0BaseAddr;extern int vmeUniverse0PciIrqLine;/* Initialize the driver */intvmeUniverseInit(void);/* setup the universe chip, i.e. disable most of its * mappings, reset interrupts etc. */voidvmeUniverseReset(void);/* avoid pulling stdio.h into this header. * Applications that want a declaration of the * following routines should *  #include <stdio.h> *  #define _VME_UNIVERSE_DECLARE_SHOW_ROUTINES *  #include <vmeUniverse.h> */#ifdef _VME_UNIVERSE_DECLARE_SHOW_ROUTINES/* print the current configuration of all master ports to  * f (stderr if NULL) */voidvmeUniverseMasterPortsShow(FILE *f);/* print the current configuration of all slave ports to * f (stderr if NULL) */voidvmeUniverseSlavePortsShow(FILE *f);#elsevoidvmeUniverseMasterPortsShow();voidvmeUniverseSlavePortsShow();#endif/* disable all master or slave ports, respectively */voidvmeUniverseDisableAllMasters(void);voidvmeUniverseDisableAllSlaves(void);/* configure a master port *

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -