CMS 3D CMS Logo

deltas.h
Go to the documentation of this file.
1 // This C++ header file was automatically generated
2 // by VPPC from a Verilog HDL project.
3 // VPPC web-page: http://www.phys.ufl.edu/~madorsky/vppc/
4 
5 // Author : madorsky
6 // Timestamp : Thu Mar 12 14:54:00 2015
7 
8 #ifndef __deltas_h_file__
9 #define __deltas_h_file__
10 #include "vppc_sim_lib.h"
11 #include "best_delta.h"
12 #include "best_delta.h"
13 #include "best_delta.h"
14 #include "best_delta.h"
15 #include "best_delta.h"
16 #include "best_delta.h"
17 
18 class deltas
19 {
20  public:
21  deltas(){built = false; glbl_gsr = true; defparam();}
22  void defparam();
23  void build();
24  bool built;
25  bool glbl_gsr;
26  unsigned station;
27  unsigned cscid;
28  unsigned me11;
29  // segments per chamber
30  unsigned seg_ch;
31  // bit widths of ph and th outputs, reduced precision
32 // have to be derived from pattern width on top level
33  unsigned bw_ph;
34  unsigned bw_th;
35  // bit widths of ph and th, full precision
36  unsigned bw_fph;
37  unsigned bw_fth;
38  // wiregroup input bit width (0..111)
39  unsigned bw_wg;
40  // bit width of dblstrip input (max 80 for ME234/1 with double-width strips)
41  unsigned bw_ds;
42  // width of halfstrip input
43  unsigned bw_hs;
44  // pattern half-width for stations 3,4
45  unsigned pat_w_st3; //4;
46  // pattern half-width for station 1
47  unsigned pat_w_st1;
48  // number of input bits for stations 3,4
49  unsigned full_pat_w_st3;
50  // number of input bits for st 1
51  unsigned full_pat_w_st1;
52  // width of zero padding for station copies
53  unsigned padding_w_st1;
54  unsigned padding_w_st3;
55  // full pattern widths (aka reduced pattern)
56  unsigned red_pat_w_st3;
57  unsigned red_pat_w_st1;
58  // number of folds for pattern detectors, do not set to 1
59  unsigned fold;
60  // number of th outputs for ME1/1
61  unsigned th_ch11;
62  unsigned bw_q;
63  unsigned bw_addr;
64  // strips per section, calculated so ph pattern would cover +/- 8 deg in st 1
65  unsigned ph_raw_w; // kludge to fix synth error, need to understand
66  unsigned th_raw_w;
67  // max possible drifttime
68  unsigned max_drift;
69  // bit widths of precise phi and eta outputs
70  unsigned bw_phi;
71  unsigned bw_eta;
72  // width of ph raw hits, max coverage +8 to cover possible chamber displacement
73  unsigned ph_hit_w; //80 + 8;
74  // for 20 deg chambers
75  unsigned ph_hit_w20;
76  // for 10 deg chambers
77  unsigned ph_hit_w10; //40 + 8;
78  // width of th raw hits, max coverage +8 to cover possible chamber displacement
79  unsigned th_hit_w;
80  unsigned endcap;
81  unsigned n_strips;
82  unsigned n_wg;
83  // theta range (take +1 because th_coverage contains max th value starting from 0)
84  unsigned th_coverage;
85  // phi range
86  unsigned ph_coverage; //80 : 40;
87  // number of th outputs takes ME1/1 th duplication into account
88  unsigned th_ch;
89  // is this chamber mounted in reverse direction?
90  unsigned ph_reverse;
91  unsigned th_mem_sz;
92  unsigned th_corr_mem_sz;
93  // multiplier bit width (phi + factor)
94  unsigned mult_bw;
95  // ph zone boundaries for chambers that cover more than one zone
96 // hardcoded boundaries must match boundaries in ph_th_match module
97  unsigned ph_zone_bnd1;
98  unsigned ph_zone_bnd2;
99  unsigned zone_overlap;
100  // sorter parameters
101  unsigned bwr; // rank width
102  unsigned bpow; // (1 << bpow) is count of input ranks
103  unsigned cnr; // internal rank count
104  unsigned cnrex; // actual input rank count, must be even
105  unsigned seg1; // number of segments station 1
106  unsigned bw_nm1;
107  unsigned bw_nm2;
108 
109  signal_ vi; // valid
110  signal_ hi; // bx index
111  signal_ ci; // chamber
112  signal_ si; // segment
113  signal_ ph_match; // matching ph
116  signal_ cpat_match; // matching pattern
117  signal_ ph_q; // pattern rank, carries straigtness and ph station information
118  signal_ th_window; // max th diff
127  signal_ rank; // output rank, to be used for sorting
128  signal_ vir; // valid
129  signal_ hir; // bx index
130  signal_ cir; // chamber
131  signal_ sir; // segment
132  signal_storage vstat__storage; signal_ vstat; // valid stations based on th coordinates
193 
201 
204  unsigned j;
205  unsigned k;
206 
207  void init ();
208  void operator()
209  (
210  signal_& vi__io,
211  signal_& hi__io,
212  signal_& ci__io,
213  signal_& si__io,
214  signal_& ph_match__io,
215  signal_& th_match__io,
216  signal_& th_match11__io,
217  signal_& cpat_match__io,
218  signal_& ph_q__io,
219  signal_& th_window__io,
220  signal_& phi__io,
221  signal_& theta__io,
222  signal_& cpattern__io,
223  signal_& delta_ph__io,
224  signal_& delta_th__io,
225  signal_& sign_ph__io,
226  signal_& sign_th__io,
227  signal_& rank__io,
228  signal_& vir__io,
229  signal_& hir__io,
230  signal_& cir__io,
231  signal_& sir__io,
232  signal_& clk__io
233  );
240 };
241 #endif
signal_ dph34
Definition: deltas.h:170
signal_storage phB__storage
Definition: deltas.h:162
signal_ sth34
Definition: deltas.h:154
unsigned bw_ds
Definition: deltas.h:41
signal_storage vmask3__storage
Definition: deltas.h:192
unsigned seg1
Definition: deltas.h:105
signal_ bsg12
Definition: deltas.h:177
signal_ th_match11
Definition: deltas.h:115
signal_storage bth14__storage
Definition: deltas.h:196
signal_ dth12
Definition: deltas.h:137
unsigned seg_ch
Definition: deltas.h:30
signal_storage bnm14__storage
Definition: deltas.h:157
signal_ bnm13
Definition: deltas.h:156
unsigned red_pat_w_st3
Definition: deltas.h:56
unsigned ph_zone_bnd2
Definition: deltas.h:98
signal_ cir
Definition: deltas.h:130
signal_storage dph34__storage
Definition: deltas.h:170
signal_ vmask2
Definition: deltas.h:191
signal_storage dph24__storage
Definition: deltas.h:169
signal_ delta_th
Definition: deltas.h:124
signal_ dph
Definition: deltas.h:163
unsigned bw_fth
Definition: deltas.h:37
unsigned th_ch
Definition: deltas.h:88
best_delta bd34
Definition: deltas.h:239
signal_storage i2__storage
Definition: deltas.h:203
signal_ sign_th
Definition: deltas.h:126
best_delta bd12
Definition: deltas.h:234
void init()
unsigned bw_eta
Definition: deltas.h:71
signal_storage thA__storage
Definition: deltas.h:133
signal_storage bsg23__storage
Definition: deltas.h:180
unsigned bw_hs
Definition: deltas.h:43
signal_ bth13
Definition: deltas.h:195
signal_storage sth13__storage
Definition: deltas.h:150
signal_ bsg34
Definition: deltas.h:182
signal_storage dth14__storage
Definition: deltas.h:139
signal_storage dvl34__storage
Definition: deltas.h:148
unsigned ph_hit_w
Definition: deltas.h:73
signal_storage bth23__storage
Definition: deltas.h:197
signal_storage bnm23__storage
Definition: deltas.h:158
unsigned pat_w_st1
Definition: deltas.h:47
signal_storage sth34__storage
Definition: deltas.h:154
signal_storage dvalid__storage
Definition: deltas.h:200
signal_ dvalid
Definition: deltas.h:200
unsigned bpow
Definition: deltas.h:102
signal_ dph13
Definition: deltas.h:166
signal_ vmask3
Definition: deltas.h:192
signal_ dph23
Definition: deltas.h:168
signal_storage sph13__storage
Definition: deltas.h:172
Definition: deltas.h:18
signal_ sth23
Definition: deltas.h:152
signal_storage dph__storage
Definition: deltas.h:163
signal_storage dth24__storage
Definition: deltas.h:141
signal_ ph_q
Definition: deltas.h:117
signal_storage bnm24__storage
Definition: deltas.h:159
unsigned cnrex
Definition: deltas.h:104
signal_ dvl14
Definition: deltas.h:145
signal_ cpat_match
Definition: deltas.h:116
unsigned th_raw_w
Definition: deltas.h:66
signal_ bsg13
Definition: deltas.h:178
signal_ dth13
Definition: deltas.h:138
signal_ dph24
Definition: deltas.h:169
signal_ bth24
Definition: deltas.h:198
signal_ sph
Definition: deltas.h:164
signal_storage sth14__storage
Definition: deltas.h:151
signal_ bvl12
Definition: deltas.h:183
signal_ i2
Definition: deltas.h:203
signal_storage phA__storage
Definition: deltas.h:161
signal_ bvl23
Definition: deltas.h:186
signal_storage dvl14__storage
Definition: deltas.h:145
signal_ hi
Definition: deltas.h:110
unsigned full_pat_w_st1
Definition: deltas.h:51
signal_ i1
Definition: deltas.h:202
signal_ dph14
Definition: deltas.h:167
unsigned bw_q
Definition: deltas.h:62
signal_ thA
Definition: deltas.h:133
signal_ bnm24
Definition: deltas.h:159
signal_ ci
Definition: deltas.h:111
unsigned full_pat_w_st3
Definition: deltas.h:49
unsigned th_coverage
Definition: deltas.h:84
unsigned bw_ph
Definition: deltas.h:33
signal_storage dvl23__storage
Definition: deltas.h:146
signal_ dth
Definition: deltas.h:135
signal_ vir
Definition: deltas.h:128
signal_storage bvl24__storage
Definition: deltas.h:187
signal_ sth14
Definition: deltas.h:151
signal_ dth24
Definition: deltas.h:141
unsigned padding_w_st1
Definition: deltas.h:53
signal_storage sth12__storage
Definition: deltas.h:149
signal_storage dph12__storage
Definition: deltas.h:165
signal_ sph12
Definition: deltas.h:171
signal_ sign_ph
Definition: deltas.h:125
signal_ bsg23
Definition: deltas.h:180
signal_ bvl13
Definition: deltas.h:184
signal_storage dth12__storage
Definition: deltas.h:137
signal_ bvl34
Definition: deltas.h:188
unsigned ph_hit_w20
Definition: deltas.h:75
unsigned n_strips
Definition: deltas.h:81
best_delta bd23
Definition: deltas.h:237
unsigned bw_nm1
Definition: deltas.h:106
unsigned bw_wg
Definition: deltas.h:39
signal_storage dph13__storage
Definition: deltas.h:166
signal_storage bnm12__storage
Definition: deltas.h:155
signal_ bnm34
Definition: deltas.h:160
signal_ sph23
Definition: deltas.h:174
unsigned bw_th
Definition: deltas.h:34
void defparam()
signal_ sth
Definition: deltas.h:189
signal_ phi
Definition: deltas.h:120
signal_ bsg14
Definition: deltas.h:179
unsigned th_mem_sz
Definition: deltas.h:91
signal_storage thB__storage
Definition: deltas.h:134
signal_storage dvl24__storage
Definition: deltas.h:147
signal_ sth13
Definition: deltas.h:150
signal_storage dth34__storage
Definition: deltas.h:142
best_delta bd13
Definition: deltas.h:235
signal_storage sph14__storage
Definition: deltas.h:173
signal_ phA
Definition: deltas.h:161
signal_ ph_match
Definition: deltas.h:113
signal_ bnm23
Definition: deltas.h:158
signal_ bth23
Definition: deltas.h:197
bool glbl_gsr
Definition: deltas.h:25
signal_storage dvl12__storage
Definition: deltas.h:143
unsigned bw_nm2
Definition: deltas.h:107
signal_storage sph23__storage
Definition: deltas.h:174
signal_ vmask1
Definition: deltas.h:190
unsigned zone_overlap
Definition: deltas.h:99
signal_ theta
Definition: deltas.h:121
signal_ bth34
Definition: deltas.h:199
signal_storage dph14__storage
Definition: deltas.h:167
signal_storage bvl23__storage
Definition: deltas.h:186
signal_ vstat
Definition: deltas.h:132
signal_storage sth__storage
Definition: deltas.h:189
unsigned th_hit_w
Definition: deltas.h:79
unsigned bwr
Definition: deltas.h:101
unsigned n_wg
Definition: deltas.h:82
unsigned cscid
Definition: deltas.h:27
unsigned bw_phi
Definition: deltas.h:70
unsigned bw_addr
Definition: deltas.h:63
unsigned th_ch11
Definition: deltas.h:61
unsigned bw_fph
Definition: deltas.h:36
signal_storage sth24__storage
Definition: deltas.h:153
signal_ dvl12
Definition: deltas.h:143
signal_ delta_ph
Definition: deltas.h:123
signal_storage sph34__storage
Definition: deltas.h:176
unsigned fold
Definition: deltas.h:59
signal_ dth14
Definition: deltas.h:139
signal_storage sph12__storage
Definition: deltas.h:171
unsigned me11
Definition: deltas.h:28
signal_storage bth24__storage
Definition: deltas.h:198
signal_storage bvl13__storage
Definition: deltas.h:184
unsigned ph_hit_w10
Definition: deltas.h:77
unsigned padding_w_st3
Definition: deltas.h:54
signal_storage dth23__storage
Definition: deltas.h:140
unsigned ph_raw_w
Definition: deltas.h:65
signal_ bvl14
Definition: deltas.h:185
signal_storage vmask2__storage
Definition: deltas.h:191
signal_ phB
Definition: deltas.h:162
signal_ dth23
Definition: deltas.h:140
signal_storage sth23__storage
Definition: deltas.h:152
signal_ sph24
Definition: deltas.h:175
signal_storage bvl12__storage
Definition: deltas.h:183
signal_ dvl24
Definition: deltas.h:147
signal_ th_window
Definition: deltas.h:118
signal_storage bsg14__storage
Definition: deltas.h:179
signal_ si
Definition: deltas.h:112
deltas()
Definition: deltas.h:21
signal_storage bvl14__storage
Definition: deltas.h:185
signal_storage bvl34__storage
Definition: deltas.h:188
signal_ rank
Definition: deltas.h:127
unsigned station
Definition: deltas.h:26
signal_ dth34
Definition: deltas.h:142
signal_ dvl
Definition: deltas.h:136
signal_ sir
Definition: deltas.h:131
signal_storage dth__storage
Definition: deltas.h:135
unsigned k
Definition: deltas.h:205
signal_ vi
Definition: deltas.h:109
signal_ dvl23
Definition: deltas.h:146
signal_ cpattern
Definition: deltas.h:122
signal_storage vstat__storage
Definition: deltas.h:132
unsigned max_drift
Definition: deltas.h:68
signal_storage bnm13__storage
Definition: deltas.h:156
signal_storage bsg24__storage
Definition: deltas.h:181
signal_ bnm12
Definition: deltas.h:155
signal_storage dvl__storage
Definition: deltas.h:136
unsigned mult_bw
Definition: deltas.h:94
signal_storage bsg13__storage
Definition: deltas.h:178
bool built
Definition: deltas.h:24
signal_ bsg24
Definition: deltas.h:181
signal_storage bth13__storage
Definition: deltas.h:195
signal_ thB
Definition: deltas.h:134
unsigned j
Definition: deltas.h:204
signal_ dph12
Definition: deltas.h:165
signal_storage bnm34__storage
Definition: deltas.h:160
unsigned pat_w_st3
Definition: deltas.h:45
signal_ sth12
Definition: deltas.h:149
signal_ sph34
Definition: deltas.h:176
signal_ hir
Definition: deltas.h:129
signal_ clk
Definition: deltas.h:119
best_delta bd24
Definition: deltas.h:238
unsigned th_corr_mem_sz
Definition: deltas.h:92
signal_storage bsg12__storage
Definition: deltas.h:177
signal_storage dph23__storage
Definition: deltas.h:168
unsigned ph_zone_bnd1
Definition: deltas.h:97
signal_storage i1__storage
Definition: deltas.h:202
unsigned ph_coverage
Definition: deltas.h:86
signal_ th_match
Definition: deltas.h:114
signal_storage dvl13__storage
Definition: deltas.h:144
signal_ sph14
Definition: deltas.h:173
signal_ bth14
Definition: deltas.h:196
signal_ bnm14
Definition: deltas.h:157
unsigned cnr
Definition: deltas.h:103
signal_storage bth12__storage
Definition: deltas.h:194
signal_storage vmask1__storage
Definition: deltas.h:190
signal_ sth24
Definition: deltas.h:153
unsigned ph_reverse
Definition: deltas.h:90
unsigned endcap
Definition: deltas.h:80
best_delta bd14
Definition: deltas.h:236
void build()
signal_storage bsg34__storage
Definition: deltas.h:182
signal_ dvl34
Definition: deltas.h:148
unsigned red_pat_w_st1
Definition: deltas.h:57
signal_storage bth34__storage
Definition: deltas.h:199
signal_ bvl24
Definition: deltas.h:187
signal_ bth12
Definition: deltas.h:194
signal_storage sph__storage
Definition: deltas.h:164
signal_storage dth13__storage
Definition: deltas.h:138
signal_storage sph24__storage
Definition: deltas.h:175
signal_ dvl13
Definition: deltas.h:144
signal_ sph13
Definition: deltas.h:172