embedded solutions for epics based control systems miroslaw dach goran marinkovic paul scherrer...

19
Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

Upload: marie-vinyard

Post on 15-Jan-2016

225 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

Embedded Solutions for EPICS Based Control Systems

Miroslaw Dach

Goran MarinkovicPaul Scherrer Institut

Switzerland

Page 2: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

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

Background

Page 3: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

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.

Page 4: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

Main concept

FPGA

Xilinx chip

PPC405RAM

I/O Dev

LAN

Proposal: to run EPICS on top of Linux OS

Page 5: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

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

Page 6: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

• 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

Page 7: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

Step by step booting

Virtex-4 EEPROM

SDRAMFLASH

u-bootu-boot cfg

Linux +

Root FS

BRAMPPC

FPGABit-stream Boot loader

Page 8: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

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

Page 9: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

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

Page 10: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

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

Page 11: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

Board could be easily setup through web pages.

Board Setup

Page 12: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

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.

Page 13: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

EPICS and GPMM

GPMM could be used under VxWorks

or Linux operating systems.

Page 14: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

EPICS and GPMM

GPMM in brief

Page 15: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

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)

Page 16: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

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

Page 17: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

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

Page 18: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

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

Page 19: Embedded Solutions for EPICS Based Control Systems Miroslaw Dach Goran Marinkovic Paul Scherrer Institut Switzerland

Thank youfor your attention