Project

General

Profile

dudaq software architecture

Document

Show

Overview

Hardware description

Communication between FPGA and CPU

AXI Direct Memory Access

Process and share memory

Communication by socket

Processes

SCOPE

SOCKET

COMMAND

MONITOR

Share memories "ring buffer"

All share memory are in "ring buffer" structure and use like "mqueue" message with unique writer and unique reader (TBC).

shm_ts

shm_gps

shm_ev

shm_cmd

shm_mon

Modules

dudaq.c (main)

Main features:

  • Content the main function
  • Create 5 share memories
  • Fork 3 processus and launch the main
    • du_scope_main()
    • du_monitor_main()
    • du_socket_main()

Important global variables

  • All share memories
  • ...

buffer.c

scope.c

Main features:

  • Read AXI memory via /dev/mem
  • copy event stored in evtbuf to shm_ev, see function scope_event_to_shm()

Important global variables

  • axi_ptr : pointor on AXI memory zone
  • evtbuf : like a ring buffer
    • alloc in scope_create_memory() like this
      • evtbuf = (uint16_t *)malloc(BUFSIZE*evtlen*sizeof(uint16_t));
      • #define BUFSIZE 3000
      • evtlen = 256 + 4* ??? like variable size trace, see line 192

monitor.c

ad_shm.c

Data flow

Communication between detector unit (DU) and central station (CS)

Configuration format

Data message format