Network configuration

A lot of parameters cn be set using the generics in each top entity. Nevertheless, some of these have to be common for all network devices. These generics are set using constants defined in trb_net_std.vhd. Other generics can be set according to the needs of every user. For those some standard values are given again in trb_net_std.vhd.

For better readability there are some keywords defined, such as API_PASSIVE or API_ACTIVE that can be used instead of the integer values 0 and 1.

Generics for Configuration

The purpose of each generic is denoted by a letter: C: configuration, S: lower space consumption (use with care!)

The column "change" shows, in which case a generic can be alterd: N: no change possible, F: fixed by network setup, U: configuration is up to each user, W: user may change this value if really necessary

Multiplexer

name range default purpose change description
MUX_SECURE_MODE 0 - 1 0 S W if 0, a simple FF is used on the med_to_int interface instead of a sbuf.

IOBUF

name range default purpose change description
INIT_DEPTH 0 - 6 1 C U fifo depth for the init channel
REPLY_DEPTH 0 - 6 1 C U fifo depth for the reply channel
IBUF_SECURE_MODE y/n yes S W if 0, the ibuf-to-api-interface will not use an sbuf. The data output will not be registered!
SBUF_VERSION 0 - 1 0 S W if 1, a smaller but slow sbuf is used
USE_ACKNOWLEDGE y/n y C F acknowledge each transfered buffer?
USE_REPLY_CHANNEL y/n y C F is there a reply channel?
INIT_CAN_SEND_DATA y/n y S U if 0, no packets can be sent on the init channel - can be used for passive apis
REPLY_CAN_SEND_DATA y/n y S U if 0, no packets can be sent on the reply channel - can be used for active apis
OBUF_DATA_COUNT_WIDTH 1 - 7 7 S W width of the counter for buffer sizes. if you are sure that you don't want to send more than 2**DATA_COUNT_WIDTH * 48 Bit with each transfer, this number can be reduced

API

name range default purpose change description
API_TYPE 0 - 1 1 C U selects whether an active or a passive API is used
FIFO_TO_INT_DEPTH 0 6 1 C U depth of fifo in api from application to network
FIFO_TO_APL_DEPTH 0 6 1 C U depth of fifo in api from network to application
USE_REPLY_CHANNEL y/n y C F is there a reply channel?
FORCE_REPLY y/n y C F If yes, every init transfer must be answered
SBUF_VERSION 0 - 1 0 S W if 1, a smaller but slow sbuf is used

Endpoints

An endpoint contains most of the generics used for the MUX, IOBUF and API. Most endpoints will contain more than one IOBUF and API. To distinguish these, a prefix is used for every single generic, for example DATn_ or TRGn_, where n is a number.

name range default purpose change description
CHANNEL 0 3 3 C U number of the channel the corresponding endpoint is connected to
TRG_SECURE_MODE 0 1 1 C U if 0, error pattern and dtype must be valid until next trigger comes in. if 1 these can be valid on falling edge of hold_trm only

Hub

name range default purpose change description
HUB_CTRL_CHANNELNUM 0 3 3 C F number of the channel the control endpoint is connected to
HUB_CTRL_DEPTH 1 6 3 C W fifo depth used for configuration api
HUB_CTRL_REG_ADDR_WIDTH 1 6 4 C W number of ctrl / stat registered accesible via slow control
HUB_USED_CHANNELS y/n yes C W selects, which channels are used on the hub and which should be terminated
IBUF_SECURE_MODE y/n no S W if 0, the ibuf-to-api-interface will not use an sbuf. The data output will not be registered!

MII_NUMBER 0 15 2 C U number of media interfaces
MII_INIT_DEPTH 1 - 6 6 C W An array of fifo depths for all init_ibufs. Each line configures one media independent interface. The first value of each line corresponds to channel 0, the last one to the highest channel number
MII_REPLY_DEPTH 1 - 6 6 C W An array of fifo depths for all reply_ibufs. Each line configures one media independent interface. The first value of each line corresponds to channel 0, the last one to the highest channel number
API_NUMBER 0 15 0 C U number of application interfaces
API_CHANNELS 0 3 0 C U array of channel numbers each application is connected to
API_TYPE 0 1 1 C U array of api types (active / passive)
API_FIFO_TO_INT_DEPTH 0 6 1 C U array of depths of fifos in apis from application to network
API_FIFO_TO_APL_DEPTH 0 6 1 C U array of depths of fifos in apis from network to application
TRG_NUMBER 0 15 0 C U number of trigger interfaces
TRG_CHANNELS 0 3 0 C U array of channel numbers each trigger interface is connected to

Unused values in arrays will be ignored. The total number of points connected to each channel should not exceed 16.

Constants for easier configuration

There are some constants declared in trb_net_std to use for better readability:

Name Numeric Value Purpose
c_TRG_LVL1_CHANNEL 0 Channel for level 1 trigger
c_TRG_LVL2_CHANNEL 1 Channel for level 2 trigger
c_DATA_CHANNEL 2 Channel for IPU Data
c_SLOW_CTRL_CHANNEL 3 Channel for slow control
c_SBUF_FAST 0 full and fast sbuf version
c_SBUF_SLOW 1 smaller but slower sbuf version
c_SECURE_MODE 1 use secure, registered mode in ibuf / mux / trg
c_NON_SECURE_MODE 0 use secure, registered mode in ibuf / mux / trg
c_FIFO_NONE 0 use a dummy fifo instead of a real one
c_FIFO_SMALL 1 use a fifo with depth 16 / buffer size 2
c_FIFO_MEDIUM 2 use a fifo with depth 32 / buffer size 4 (not recommended)
c_FIFO_BIG 3 use a fifo with depth 64 / buffer size 8 (not recommended)
c_FIFO_BRAM 6 use a Block RAM as fifo with depth 1023 / buffer size 127
c_FIFO_BRAM 6 use a Block RAM as fifo with depth 1023 / buffer size 127
c_API_ACTIVE 1 select active API
c_API_PASSIVE 0 select passive API
c_NO 0 sets generic to false / negative / no
c_YES 1 sets generic to true / positive / yes

The following are standard values that can be used for most hardware designs

Name Value Purpose
std_SBUF_VERSION c_SBUF_FAST normal sbuf version (fast)
std_IBUF_SECURE_MODE c_SECURE_MODE an sbuf is used in ibuf
std_USE_ACKNOWLEDGE c_YES each buffer is acknowledged
std_USE_REPLY_CHANNEL c_YES a reply channel is used
std_FORCE_REPLY c_YES a reply must be sent
std_FIFO_DEPTH c_FIFO_BRAM a bram fifo should be standard
std_TERM_SECURE_MODE c_NO no secure mode for trg interface
std_MUX_SECURE_MODE c_NO no sbufs are used for MUX

The next table shows some configuration settings for the whole network.

Name Value Purpose
cfg_USE_ACKNOWLEDGE y/y/y/y selects if using acknowledge for each channel
cfg_FORCE_REPLY y/y/y/y selects if a reply is necessary for each channel
cfg_USE_REPLY_CHANNEL y/y/y/y selects if a reply channel is used
c_DATA_WIDTH 16 width of data paths
c_NUM_WIDTH 2 width of packet number
c_MUX_WIDTH 3 number of channels
BROADCAST_ADDRESS 0xFFFF the address to send broadcasts

-- JanMichel - 22 Jan 2007

This topic: DaqSlowControl > OutdatedPages > DaqNetwork > TrbNetUsersGuide > TrbNetConfiguration
Topic revision: 2008-01-22, JanMichel
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki Send feedback | Imprint | Privacy Policy (in German)