EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: Power PC and EPICS
From: "Noboru Yamamoto" <[email protected]>
To: "Andy Foster" <[email protected]>
Cc: "Epics Questions" <[email protected]>, [email protected], [email protected]
Date: 28 Jul 98 18:18:39 +0900
> 
> Dear All,
> 
> We are considering upgrading to a Power PC based CPU board.
> I would be interested to hear of users experiences with
> EPICS on any Power PC based board.
> 
We uses Force PowerCore 603 for development of KEKB control system.
In a few weeks, we will get Force PowerCore6750, which uses  PPC-750
as a CPU.
EPICS R3.13beta11 runs on PCore603. 
So far ,  We have tested  limited number  of dirvers:
	drvGpib.c
	Camac support and  camacLib with Hytec 2992 Serial Driver
	drvSerial/devSerial
	Modbus+ suppport
	Arcnet driver

Mr. Jun-ich Odagiri is the person who ported EPICS to Froce PPC board
in KEK. He wrote a memo on the port of EPICS to PPC in Japanse ( sorry).
Here I briefly summarize his memo. There are two categories in the 
modifications. One related to the difference between compilers 
for 68K and PPC. Another is CPU board specific.

1) Compiler differences.
 1-1) signed or unsigned integral variables.
 According to our study, the compiler for MC68K and the compiler for PPC
in VxWorks have different default types for integral variables.

		char		|	short	|	int		|	long
68k	|	signed	|	signed	|	unsigned	|	unsigned
PPC	|	unsigned |	unsigned |	signed	|	signed

In some cases, this difference causes different behaviour between
two platforms. You must use "signed" or "unsigned"  keywords explicitly.

For "char" type, compiler option "-fsigned-char" can be used.

  1-2) "_" in the global name.
 EPICS uses global symbol table(i.e. it uses symFindByName() function)
 to find device/record support routines.
68K compiler adds "_" in a front of the global symbol name, however,
PPC compiler DOES NOT.
Some EPICS routines assume that the global name have "_" at the front of 
symbol name. You need to fix this in the following files.

 bdt/bdtServ.c
 db/devLib.c
 db/drvTS.c
 db/iocInit.c
 dbStatic/dbStaticRun.c
 dbTools/PVSvx.c
 dev/devAiSymb.c
 dev/devAoSymb.c
 dev/devLiSymb.c
 dev/devLoSymb.c
 dev/devSiSymb.c
 dev/old/drvGpib.c ( for Hideos support)
 rec/gsubRecord.c
 rec/subRecord.c
 drv/ansi/drvEpvxi.c
 libvxWorks/ldpp.c

 1-3) -mnobitfield option
 A compiler option "-mnobitfield" does not exists for PPC compiler.

 1-4) va_list in errPrintfVX.c.

 In 68K compiler, va_list is "typedef"-ed as pointer type, while PPC 
compiler "typedef" va_list as an array type. There is a code segment
in src/libCoom/errPrintfVX.c which assgined "va_list" value 
to a "va_list" variable.
 In 68K compiler, it is a simple pointer assignment. In PPC compiler,
it turns to be an array assginment which is not allowed in the 
current compiler.

2) Board specific problems .
 2-1) vxMemProbe() does not work on Force PPC board.  Because of
this, some device/driver support routine fail to find VME modules.
 We currently uses  workaround to fix this problem. That is to supply
numbers of VME modules in a startup script, like:

 nigpib_num_links=2
 ht2992_num_cards=1

  2-2)Slave A24 access to a main memory.
  NI-1014, GP-IB interface board for VME from Natinal Instruments, uses 
DMA to exchange data between the board and a cpu board. It uses slave A24
access to the main memory on the CPU board. Default settiing of BSP for
Force CPU disables slave A24 access. 

 2-3) Word bundary.
 GP-IB driver for NI-1014 uses data structure cc_ary shown below:

 struct cc_ary{
	void *cc_ccb;
 	short cc_ONE;
	void *cc_n_1addr;
	short cc_TWO;
}

This structure relflects structure of registers on NI-1014 board and 
should not be changed. However, compiler for Power PC add pad bytes between
cc_ccb and cc_ONE. 

We have modified the structure as follows:

typedef struct DmaStuffStruct {
	char cc_array[12];
	char cc_byte;
}
 
>
> In particular, did anyone make use of the following drivers and
> did they have to make any code changes to get them working:
> 
> "drvBc635"   - Bancomm driver - not likely to have been used by anyone
> outside of this
>                project.
> "drvXy240"   - TTL Card.
> "drvXy566"   - Analogue Input.
> "drvOms"     - Motor controller.
> "drvTip810"  - CanBus.
> "drvAb"      - Allen-Bradley.
> "drvPmac"    - PMAC Motion Controller.
Sorry, we use NONE of these driver in our system and don't have chance to
test them.

> 
> Many thanks for your time,
> 
> Andy
> 
> ===================================================================
> Andy Foster
> Gemini 8-m Telescopes Project	Tel:       1 (808) 933 7106 (direct)
> Suite 207			Fax:       1 (808) 933 7123
> Hilo Plaza			E-mail:    [email protected] or
> 180 Kinoole Street                         [email protected]
> Hilo
> Hawaii 96720
> USA
> 

Best regards,
Noboru Yamamoto




Navigate by Date:
Prev: Re: XVME 566 driver problem Bob Dalesio
Next: Re: Power PC and EPICS William Lupton
Index: 1994  1995  1996  1997  <19981999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Power PC and EPICS Andy Foster
Next: Re: Power PC and EPICS William Lupton
Index: 1994  1995  1996  1997  <19981999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·