Timing Messages: How-To test the ECA queue from LM32 Soft-CPU and PC

Introduction

The specified ECA queue is used to storage timing events filtered by eventID. The size of this queue is 0x100. Now this ECA queue is used for a LM32 Soft CPU for the Bunch to Bucket transfer.

Prerequisites

  • Saftlib is either running on SCU or PC. For the installation of Saftlib on PC, please see here. To start the saftlib, please use
    • sudo saftd baseboard:dev/wbm0
  • If SCU is used to configure the filter of the ECA queue, please login to SCU.

How the ECA queue works

ECA queue is a VHDL component. It takes an ECA action channel and provides a FIFO interface (see Fig. 1). There are two instantiations of ECA queue of the existing bel_projects. The ECA queue with channel 0 is now used to connect to a LM32 soft CPU. The filter of this channel is configured by saftlib (see Test configuration). The filter could be part or all of 64 bits eventID. After configuration, the timing events with the specified eventID will be stored in the ECA queue in order. When the ECA queue is full, new coming timing events could not be stored until at least one timing event is popped out from the ECA queue.

eca queue.png

Figure 1. The topology of ECA queue connection to the Dev crossbar

Code Snippet

Checkout the example contained in .../bel_projects/modules/lm32-example/example.c .

Test configuration

  • One terminal is used for the configuration of a filter of ECA queue
-- Clean all rules for the filter of the ECA queue channel 
saft-ecpu-ctl baseboard -x
-- Create a filter for the ECA queue channel, 32 bits of eventID 0x1122334455667788, namely 0x11223344, works as the filter. Offset is 0 and event tag is 0.
saft-ecpu-ctl baseboard -c 0x1122334455667788 64 0 0
  • Another terminal is used to inject events
-- Inject a timing event with eventID 0x1122334411111111, param 0xbabebabebabebabe and execution time 0x028a3a5d7df966bb to the ECA queue channel.
saft-ctl baseboard inject 0x1122334411111111 0xbabebabebabebabe 0x028a3a5d7df966bb
  • After readout of a timing event from the ECA queue, please pop the event out from the ECA queue. BA means base address. Registers of ECA queue please see eca_queue_regs.h.

-- DietrichBeck - 13 Mar 2017
Topic revision: r17 - 19 Jun 2019, DietrichBeck
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback