Skip to content

Commit 866bb0f

Browse files
committed
GIT: Merge branch 'development'
2 parents ba58f34 + ba96613 commit 866bb0f

File tree

121 files changed

+9495
-2970
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+9495
-2970
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,14 @@ firmware/mmc3_m26_eth/vivado/*
104104
firmware/mmc3_beast_eth/vivado/*
105105
!firmware/mmc3_beast_eth/vivado/*.xpr
106106

107+
# MMC3 8chip firmware
108+
firmware/mmc3_8chip_eth/vivado/*
109+
!firmware/mmc3_8chip_eth/vivado/*.xpr
110+
111+
# MMC3 8chip with multi TX firmware
112+
firmware/mmc3_8chip_multi_tx_eth/vivado/*
113+
!firmware/mmc3_8chip_multi_tx_eth/vivado/*.xpr
114+
107115
# Simulation output
108116
firmware/mio/cosim/sim_build
109117
firmware/mio/cosim/sim_build.zip

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,25 @@ pyBAR - Bonn ATLAS Readout in Python
66
PyBAR is a versatile readout and test system for the ATLAS FEI4(A/B) pixel readout chip. It uses the [basil](https://github.com/SiLab-Bonn/basil) framework to access the readout hardware.
77
PyBAR's FPGA firmware and host software includes support for different hardware platforms.
88

9-
PyBAR is *not only* targeting experienced users and developers. The easy-to-use scripts allow a quick setup and start. PyBAR is a very flexible readout and test system and provides the capability to conduct tests and characterization measurements of individual chips.
9+
PyBAR is *not only* targeting experienced users and developers. The easy-to-use scripts allow a quick setup and start. PyBAR is a very flexible readout and test system and provides the capability to conduct tests and characterization measurements of individual chips, and tests of large-scale detectors with multiple multi-chip modules and multiple readout boards.
1010

1111
The features of the FPGA firmware in a nutshell:
1212
- supported readout boards:
1313
any hardware that is supported by basil (e.g., MIO2, MIO3, and MMC3)
1414
- supported adapter cards:
1515
Single Chip Adapter Card, Burn-in Card (Quad Module Adapter Card) and the General Purpose Analog Card (GPAC)
16-
- readout of single chip modules
16+
- readout of multiple readout boards
17+
- readout of multiple multi-chip modules (e.g., single, dual, quad module, and any combination of those)
18+
- simultaneous readout (e.g., data taking with external trigger, individual tuning of chips)
1719
- continuous data taking
18-
- automatic data to clock phase alignment
20+
- individual and automatic data to clock phase alignment on each channel
1921
- full support of EUDAQ TLU and availability of EUDAQ Producer
2022

2123
The features of the host software in Python:
2224
- no GUI
2325
- support for Windows, Linux and macOS
2426
- scan/tuning/calibration algorithms are implemented in stand-alone scripts
27+
- scripts are implemented for operating single chips but are working with multi-chip configurations as well
2528
- fast development and implementation of new scan/tuning/calibration algorithms
2629
- configuration files are human readable (compatible to RCE/HSIO)
2730
- full control over FEI4 command generation, sending any arbitrary bit stream and configuration sequence to the FEI4
@@ -33,7 +36,7 @@ The features of the host software in Python:
3336

3437
The following packages are required for pyBAR's core functionality:
3538
```
36-
basil_daq bitarray cython matplotlib numba numpy pixel_clusterizer progressbar-latest pytables pyyaml scipy
39+
basil_daq bitarray contextlib2 cython matplotlib numba numpy pixel_clusterizer progressbar-latest pytables pyyaml scipy
3740
```
3841

3942
For full functionality, the following additional packages are required:
@@ -43,7 +46,7 @@ For full functionality, the following additional packages are required:
4346

4447
Run the **following commands** to install the packages:
4548
```
46-
conda install python=2.7 bitarray cython ipython matplotlib mock nose numba numpy pyserial pytables pyyaml pyzmq scipy sphinx
49+
conda install python=2.7 bitarray contextlib2 cython ipython matplotlib mock nose numba numpy pyserial pytables pyyaml pyzmq scipy sphinx
4750
4851
pip install progressbar-latest pyvisa pyvisa-py git+https://github.com/pyqtgraph/pyqtgraph.git@pyqtgraph-0.10.0
4952
```
@@ -68,7 +71,7 @@ On Windows, the `pywin32` package is required:
6871
pip install 'pixel_clusterizer>=3.1,<3.2'
6972
```
7073

71-
To enable support for USB devices (MIO, MIO3 and MMC3), the following additional packages are required:
74+
To enable support for USB devices (MIO2), the following additional packages are required:
7275
- [PyUSB](https://github.com/walac/pyusb) (>=1.0.0rc1):
7376
```
7477
pip install pyusb

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.0
1+
3.0.0

examples/example_run_manager/example_run_manager.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# The initial FE configuration will be created during the first run.
1010
#
1111
# (from configuration.yaml)
12-
# fe_flavor : fei4a
12+
# flavor : fei4a
1313
# ...
1414
#
1515
# Initializing the run manager:
@@ -18,17 +18,17 @@
1818
# During the first run, an module data directory relative to the configuration.yaml file will be created.
1919
# If configuration.yaml is placed inside /host/pybar/ the module data will be stored inside /host/pybar/<module_id> (where <module_id> is defined inside configuration.yaml).
2020
#
21-
# If fe_configuration inside configuration.yaml is not given, the latest valid FE configuration file will be taken (the file with the highest run number and run status 'FINISHED').
21+
# If configuration inside configuration.yaml is not given, the latest valid FE configuration file will be taken (the file with the highest run number and run status 'FINISHED').
2222
#
2323
# (from configuration.yaml)
24-
# fe_configuration:
24+
# configuration:
2525
# ...
2626
#
27-
# If no configuration file exists, a initial configuration will be create according to fe_flavor.
27+
# If no configuration file exists, a initial configuration will be create according to flavor.
2828
# To load a specific configuration file, a path to FE configuration file or a run number (e.g. 5) can be given:
2929
#
3030
# (from configuration.yaml)
31-
# fe_configuration: 1
31+
# configuration: 1
3232
# ...
3333
#
3434
# This will retain the configuration for the following scans.

firmware/lx9/src/top.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ module top (
266266
.BUS_DATA(BUS_DATA)
267267
);
268268

269-
//MODULE ADREESSES
269+
//MODULE ADDRESSES
270270

271271
localparam CMD_BASEADDR = 32'h0000;
272272
localparam CMD_HIGHADDR = 32'h8000-1;
@@ -343,7 +343,7 @@ module top (
343343
.FIFO_EMPTY(FE_FIFO_EMPTY[i]),
344344
.FIFO_DATA(FE_FIFO_DATA[i]),
345345

346-
.RX_FIFO_FULL(RX_FIFO_FULL[i]),
346+
.RX_FIFO_FULL(RX_FIFO_FULL[i]),
347347
.RX_ENABLED(),
348348

349349
.BUS_CLK(BUS_CLK),

firmware/mio/cosim/sim.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,23 @@ hw_drivers:
1919
# interface : USB
2020
# base_addr : 0x0
2121

22-
- name : CH4
22+
- name : DATA_CH4
2323
type : fei4_rx
2424
interface : USB
2525
base_addr : 0x18300
2626

2727
# Uncomment for FEI4QuadModuleAdapterCard
28-
- name : CH3
28+
- name : DATA_CH3
2929
type : fei4_rx
3030
interface : USB
3131
base_addr : 0x18400
32-
33-
- name : CH2
32+
33+
- name : DATA_CH2
3434
type : fei4_rx
3535
interface : USB
3636
base_addr : 0x18500
37-
38-
- name : CH1
37+
38+
- name : DATA_CH1
3939
type : fei4_rx
4040
interface : USB
4141
base_addr : 0x18600
@@ -89,7 +89,7 @@ hw_drivers:
8989
base_addr : 0x18900
9090

9191
user_drivers:
92-
92+
9393
registers:
9494
- name : ENABLE_CHANNEL
9595
type : StdRegister
@@ -102,16 +102,16 @@ registers:
102102
- name : TLU
103103
size : 1
104104
offset : 4
105-
- name : CH4
105+
- name : DATA_CH4
106106
size : 1
107107
offset : 3
108-
- name : CH3
108+
- name : DATA_CH3
109109
size : 1
110110
offset : 2
111-
- name : CH2
111+
- name : DATA_CH2
112112
size : 1
113113
offset : 1
114-
- name : CH1
114+
- name : DATA_CH1
115115
size : 1
116116
offset : 0
117117

firmware/mio/cosim/sim_test.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
dut['POWER_SCC'].write()
2323

2424
# enabling readout
25-
dut['rx']['CH1'] = 1
26-
dut['rx']['CH2'] = 1
27-
dut['rx']['CH3'] = 1
28-
dut['rx']['CH4'] = 1
25+
dut['rx']['DATA_CH1'] = 1
26+
dut['rx']['DATA_CH2'] = 1
27+
dut['rx']['DATA_CH3'] = 1
28+
dut['rx']['DATA_CH4'] = 1
2929
dut['rx']['TLU'] = 1
3030
dut['rx']['TDC'] = 1
3131
dut['rx'].write()
@@ -45,7 +45,8 @@ def cmd(data, size):
4545
cmd([0xB1, 0x00], 9) # ECR
4646
cmd([0xB4, 0x50, 0x0E], 23) # conf mode
4747

48-
dut['rx_1']['RESET'] # let rx sync
48+
dut['rx_1']['RX_RESET'] # RX sync
49+
dut['rx_1']['ENABLE_RX'] # enable RX
4950

5051
cmd([0xB4, 0x08, 0x00], 23) # readbck a register
5152

firmware/mio/src/top.v

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,11 @@ assign TRIGGER_ACKNOWLEDGE_FLAG = CMD_READY & ~CMD_READY_FF;
201201

202202
wire CMD_START_FLAG; // sending FE command triggered by external devices
203203
//reg CMD_CAL; // when CAL command is send
204+
wire TRIGGER_ENABLED, TLU_ENABLED;
204205

205206
// LEMO Tx
206207
assign TX[0] = TLU_CLOCK;
207-
assign TX[1] = EXT_TRIGGER_ENABLE ? TLU_BUSY : ~CMD_READY;
208+
assign TX[1] = TLU_ENABLED ? TLU_BUSY : ~CMD_READY;
208209
assign TX[2] = RJ45_TRIGGER;
209210

210211
// ------- RESRT/CLOCK ------- //
@@ -307,7 +308,7 @@ clock_divider #(
307308
.CLOCK(CLK_3HZ)
308309
);
309310

310-
// ------- MODULE ADREESSES ------- //
311+
// ------- MODULE ADDRESSES ------- //
311312
localparam CMD_BASEADDR = 16'h0000;
312313
localparam CMD_HIGHADDR = 16'h8000-1;
313314

@@ -511,7 +512,7 @@ tdc_s3 #(
511512
.BASEADDR(TDC_BASEADDR),
512513
.HIGHADDR(TDC_HIGHADDR),
513514
.CLKDV(4),
514-
.DATA_IDENTIFIER(4'b0100), // one-hot
515+
.DATA_IDENTIFIER(4'b0100),
515516
.FAST_TDC(1),
516517
.FAST_TRIGGER(1)
517518
) i_tdc (
@@ -586,11 +587,15 @@ tlu_controller #(
586587

587588
.FIFO_PREEMPT_REQ(TRIGGER_FIFO_PEEMPT_REQ),
588589

590+
.TRIGGER_ENABLED(TRIGGER_ENABLED),
591+
.TRIGGER_SELECTED(),
592+
.TLU_ENABLED(TLU_ENABLED),
593+
589594
.TRIGGER({3'b0, CCPD_TDC_FROM_TDC, TDC_IN_FROM_TDC, MULTI_PURPOSE, LEMO_TRIGGER_FROM_TDC, MONHIT}),
590595
.TRIGGER_VETO({6'b0, MULTI_PURPOSE, FIFO_FULL}),
591596

592597
.EXT_TRIGGER_ENABLE(EXT_TRIGGER_ENABLE),
593-
.TRIGGER_ACKNOWLEDGE(EXT_TRIGGER_ENABLE == 1'b0 ? TRIGGER_ACCEPTED_FLAG : TRIGGER_ACKNOWLEDGE_FLAG),
598+
.TRIGGER_ACKNOWLEDGE(TRIGGER_ACKNOWLEDGE_FLAG),
594599
.TRIGGER_ACCEPTED_FLAG(TRIGGER_ACCEPTED_FLAG),
595600

596601
.TLU_TRIGGER(RJ45_TRIGGER),
@@ -663,11 +668,15 @@ tlu_controller #(
663668

664669
.FIFO_PREEMPT_REQ(TRIGGER_FIFO_PEEMPT_REQ),
665670

671+
.TRIGGER_ENABLED(TRIGGER_ENABLED),
672+
.TRIGGER_SELECTED(),
673+
.TLU_ENABLED(TLU_ENABLED),
674+
666675
.TRIGGER({4'b0, TDC_IN_FROM_TDC, MULTI_PURPOSE, LEMO_TRIGGER_FROM_TDC, MONHIT}),
667676
.TRIGGER_VETO({6'b0, MULTI_PURPOSE, FIFO_FULL}),
668677

669678
.EXT_TRIGGER_ENABLE(EXT_TRIGGER_ENABLE),
670-
.TRIGGER_ACKNOWLEDGE(EXT_TRIGGER_ENABLE == 1'b0 ? TRIGGER_ACCEPTED_FLAG : TRIGGER_ACKNOWLEDGE_FLAG),
679+
.TRIGGER_ACKNOWLEDGE(TRIGGER_ACKNOWLEDGE_FLAG),
671680
.TRIGGER_ACCEPTED_FLAG(TRIGGER_ACCEPTED_FLAG),
672681

673682
.TLU_TRIGGER(RJ45_TRIGGER),

firmware/mio3/src/KX7_IF_Test_Top.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ PLLE2_BASE #(
183183
.I(clk16mhz_pll) // Clock buffer input
184184
);
185185

186-
// ------- MODULE ADREESSES ------- //
186+
// ------- MODULE ADDRESSES ------- //
187187
localparam CMD_BASEADDR = 32'h0000;
188188
localparam CMD_HIGHADDR = 32'h8000-1;
189189

firmware/mio3/src/mmc3_top.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ PLLE2_BASE #(
182182
.I(clk16mhz_pll) // Clock buffer input
183183
);
184184

185-
// ------- MODULE ADREESSES ------- //
185+
// ------- MODULE ADDRESSES ------- //
186186
localparam CMD_BASEADDR = 32'h0000;
187187
localparam CMD_HIGHADDR = 32'h1000-1;
188188

0 commit comments

Comments
 (0)