Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer...

Post on 15-Jan-2016

223 views 1 download

Tags:

Transcript of Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer...

Embedded Solutions for EPICS Based Control Systems

Miroslaw Dach

Goran MarinkovicPaul Scherrer Institut

Switzerland

Embedded systems with FPGA circuits are becoming very popular for new developments including physics facilities like accelerators.

Background

Work Objectives

Integration of Xilinx based boards with the

SLS control system

Integration of Xilinx based boards with the

SLS control system in order to control and

to monitor the FPGAs by means of EPICS.

Main concept

FPGA

Xilinx chip

PPC405RAM

I/O Dev

LAN

Proposal: to run EPICS on top of Linux OS

Avnet Xilinx Virtex-4 evaluation board• Virtex-4 with PPC405• JTAG• Serial interface• Network interface• EEPROM 8 MB• FLASH 4 MB• SDRAM 32 MB• LCD display • LEDs, Dip-switches• User I/O

• Cross development tool-chain– gcc 4.0.2 glibc 2.3.2

• Das u-Boot 1.2.0 (Universal boot loader)

• Linux kernel 2.6.23

• Busy box 1.4.2 (core of the root file system)– ssh, ntpd, screen, web server

• Epics server– GPMM drviver (with interrupt handling)– PCMON– SYNAPS, STREAM driver

Software components

Step by step booting

Virtex-4 EEPROM

SDRAMFLASH

u-bootu-boot cfg

Linux +

Root FS

BRAMPPC

FPGABit-stream Boot loader

Virtex-4 EEPROM

SDRAMFLASH

u-bootu-boot cfg

BRAMPPC

FPGA

Linux +

Root FS

u-boot cfg

u-boot

Step by step booting

Linux

BRAM

Remote booting

u-bootu-boot cfg

Virtex-4 EEPROM

SDRAMFLASH

u-bootu-boot cfg

BRAMPPC

FPGA

Linux +

Root FS

EPICS DB

u-bootu-boot cfg

Remote booting

Linux

Root FSNFS mout

NFS mout/work

EPICS DBEPICS DB

Virtex-4 EEPROM

SDRAMFLASH

u-bootu-boot cfg

BRAMPPC

FPGA

Linux +

Root FS

u-boot cfg

u-boot

On board booting

EPICS DBu-boot cfg

Linux

Root FS

Linux+

Root FS

u-boot

EPICS DBEPICS DB

Board could be easily setup through web pages.

Board Setup

EPICS and GPMM

GPMM (General Purpose Memory Mapped)

driver provides an easy and flexible way to

interface most of the new generation cards

and borads to the EPICS based control

system.

EPICS and GPMM

GPMM could be used under VxWorks

or Linux operating systems.

EPICS and GPMM

GPMM in brief

EPICS and GPMM

Status and Control register

ADC offset register

ADC FIFO

Memory Mapped Board

0xB0000000

0xB0000004

0xB0000008

EPICS startup script

GPMMConfigure (0,0xB0000000,”ADC”,”A32”,”D32”)addGPMMRegister(0,0,0x0,4,”X”,”Stat-Ctrl”,0)addGPMMRegister(0,1,0x4,4,”X”,”ADC_offset”,0)addGPMMRegister(0,2,0x8,4,”X”,”ADC_FIFO”,0)

EPICS and GPMM

Status and Control register

ADC offset register

ADC FIFO

Memory Mapped Board

0xB0000000

0xB0000004

0xB0000008

EPICS startup script

GPMMConfigure (0,0xB0000000,”ADC”,”A32”,”D32”)addGPMMRegister(0,0,0x0,4,”X”,”Stat-Ctrl”,0)addGPMMRegister(0,1,0x4,4,”X”,”ADC_offset”,0)addGPMMRegister(0,2,0x8,4,”X”,”ADC_FIFO”,0)

record(bi,”Xilinx:acqusition”){

EPICS database

field(DTYP,”GPMM”) field(INP,”#C00

0,0,0,0,

S0 @Stat-Ctrl,s=30”)s=30”)

3130 29 2

System Implementations

Systems based on generic board:

– Vibration measurement system– Micro Ioc with 8 serial ports (RS232/RS485)

The same software on other hardware:

– Concentrator board with fast fiber links– EPICS router with 2 network interfaces

WAN

LAN

PLC Oscilloscope

EPICS Server

TCP IP/RS232

MotionController

The performance of embedded systems has increased significantly over last years. Therefore they could be easily integrated to the control system with EPICS server running locally. In order to speedup the development process the GPMM driver was introduced.

Conclusions

Thank youfor your attention