Skip to content

Commit 2890320

Browse files
committed
move docs around, write a bit of README, new dockerfile for debian:testing
1 parent cab2dd2 commit 2890320

10 files changed

+88
-70
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/

README.md

+62-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# mesytec-mvlc - driver and utilities for the [mesytec MVLC VME Controller](https://mesytec.com/products/nuclear-physics/MVLC.html)
1+
# mesytec-mvlc - driver and utilities for the mesytec MVLC VME Controller
22

33
*mesytec-mvlc* is a driver and utility library for the [Mesytec MVLC VME
44
controller](https://mesytec.com/products/nuclear-physics/MVLC.html) written in
@@ -24,4 +24,64 @@ to build high-performance MVLC based DAQ readout systems are provided:
2424
* Various counters for monitoring the system.
2525

2626
mesytec-mvlc is used in the [mvme](https://mesytec.com/downloads/mvme.html) DAQ
27-
software to implement MVLC support.
27+
software.
28+
29+
## Documentation
30+
31+
* [MVLC command format](doc/command_format.md)
32+
* [MVLC data format](doc/data_format.md)
33+
* [mvme manual](https://mesytec.com/downloads/mvme/mvme.pdf)
34+
35+
The mvme manual contains a section about the MVLC Trigger/IO system. mvme VME
36+
script supports all implemented MVLC commands.
37+
38+
## Building
39+
40+
```sh
41+
apt-get update && apt-get install -y --no-install-recommends \
42+
ca-certificates build-essential git cmake ninja-build zlib1g-dev \
43+
libzmq3-dev cppzmq-dev
44+
45+
mkdir build && cd build
46+
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/local/mesytec-mvlc .. \
47+
cmake --build . --target all
48+
ctest .
49+
```
50+
51+
Dockerfiles can be found [here](tools/dockerfiles).
52+
53+
## Tools
54+
55+
* `mvlc-cli`: command line interface to the MVLC. Useful subcommands:
56+
- scanbus: Scans the upper 16 bits of the VME address space for (mesytec) VME modules.
57+
- register_read/register_write: Internal register access.
58+
- vme_read/vme_write: Single cycle VME access.
59+
- stack_info: Print readout command stack and trigger information.
60+
- show_usb_devices: Info about MVLC USB devices found on the system.
61+
62+
`mvlc-cli -h -a` shows help for all implemented commands.
63+
64+
* `mvlc-mini-daq`: Standalone minimal DAQ tool. Configuration via .yaml/json
65+
files exported from mvme. Writes readout data to listfile and/or dumps it to
66+
console.
67+
68+
Pass `-DMVLC_BUILD_DEV_TOOLS=ON -DMVLC_BUILD_TOOLS=ON` to cmake to build additional tools.
69+
70+
* `mvlc-listfile-info <zipfile>`: Processes the input listfile, showing
71+
information about the contained configuration and decoded readout/system
72+
events. Quick as it does not process the actual readout data.
73+
74+
* `decode-mvlc-frame-header`: reads raw frame headers from stdin, attempts to
75+
decode and print information:
76+
```
77+
$ ./decode-mvlc-frame-header 0xf380001f
78+
0xf380001f -> StackResultFrame (len=31, stackNum=0, ctrlId=0, frameFlags=continue)
79+
```
80+
81+
* `decode-mvlc-eth-headers <header0> <header1>`: decodes the ETH frame header words:
82+
```
83+
./decode-mvlc-eth-headers 0x00070004 0x00010000
84+
header0 = 0x00070004, header1 = 0x00010000
85+
header0: packetChannel=0, packetNumber=7, controllerId=0, dataWordCount=4
86+
header1: udpTimestamp=16, nextHeaderPointer=0x0000, isHeaderPointerPresent=1
87+
```

doc/command_format.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ vme_read_mem 0x09 d16 0x0000
4747
```
4848

4949
In combination with **read_to_accu** and **mask_shift_accu** this can be used to
50-
read a transfer count from a module and use it to create a fake block transfer.
50+
read a transfer count from a module to create a fake block transfer.
5151

5252
**signal_accu** creates an MVLC internal IRQ signal using the current accu
5353
*value. This can be used to dispatch
File renamed without changes.
File renamed without changes.
File renamed without changes.

doc/old-markdown-files/usage_guide.md doc/dev/usage_guide.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
** Incomplete, old and untested **
3+
14
Using the mesytec-mvlc library {#usage-guide}
25
=============================================
36

doc/old-markdown-files/data_format.md

-67
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# syntax=docker/dockerfile:1.5
2+
# vim:ft=dockerfile
3+
4+
# Dockerfile building the mesytec-mvlc library in debug mode and running the
5+
# libraries unit tests.
6+
7+
# Example docker build invocation from the root of the source tree:
8+
# DOCKER_BUILDKIT=1 docker build -f ./tools/dockerfiles/Dockerfile.debian-testing_ctest .
9+
10+
FROM debian:testing
11+
12+
RUN apt-get update && apt-get install -y --no-install-recommends \
13+
ca-certificates build-essential git cmake ninja-build zlib1g-dev \
14+
libzmq3-dev cppzmq-dev
15+
16+
COPY . /sources
17+
WORKDIR /build
18+
19+
# Run cmake then compile and install the server binary.
20+
RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/install /sources \
21+
&& ninja && ninja install && ctest .

0 commit comments

Comments
 (0)