|
entity CandidateSorterSorts muon candidates according to their Pt. |
The Candidate sorter is written with muon candidates of one event. Internally it sorts the Candidates according to their exceeded Pt threshold. After writing all candidates of an event into the Sorter the candidates can be read out again. They appear at the output most energetic candidates first.
The width of the data words is fixed to 23 bits. Their meaning in the Lvl2Processor is as follows:
Generics:
| NUMBER_OF_THRESHOLDS | determines the maximal number of different threshold values of the candidates. The maximum is 7. (The threshold is coded in a 3 bit number). |
| BUCKET_DEPTH | is the maximal number of muon candidates of the same Pt which can be hold in the sorter. MUST be at least 2. |
Ports:
| input | is the data input. |
| input_valid | is used to clock the input data into the CandidateSorter at the next rising edge of the clock. |
| read_write | determines the functionality of the CandidateSorter: if '1' it can be read, if '0' it can be written. |
| read_next | is used to let appear the next data word at at the output after the next rising edge. |
| output | is the data output. |
| output_valid | indicates that the current data_word at the output is a valid data word, i.e. that it is a word which has been previously written to the CandidateSorter. If '0' it means that the CandidateSortere is empty. |
| data_loss | indicates that somewhere the maximal capacity of the sorter has been exceeded and that data has been lost. To be sure that no data will be lost the number of words for each threshold must not exceed NUMBER_OF_THRESHOLDS. |
See also: Lvl2Processor