CMS 3D CMS Logo

best_tracks.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 __best_tracks_h_file__
9 #define __best_tracks_h_file__
10 #include "vppc_sim_lib.h"
11 
13 {
14  public:
15  best_tracks(){built = false; glbl_gsr = true; defparam();}
16  void defparam();
17  void build();
18  bool built;
19  bool glbl_gsr;
20  unsigned station;
21  unsigned cscid;
22  // segments per chamber
23  unsigned seg_ch;
24  // bit widths of ph and th outputs, reduced precision
25 // have to be derived from pattern width on top level
26  unsigned bw_ph;
27  unsigned bw_th;
28  // bit widths of ph and th, full precision
29  unsigned bw_fph;
30  unsigned bw_fth;
31  // wiregroup input bit width (0..111)
32  unsigned bw_wg;
33  // bit width of dblstrip input (max 80 for ME234/1 with double-width strips)
34  unsigned bw_ds;
35  // width of halfstrip input
36  unsigned bw_hs;
37  // pattern half-width for stations 3,4
38  unsigned pat_w_st3; //4;
39  // pattern half-width for station 1
40  unsigned pat_w_st1;
41  // number of input bits for stations 3,4
42  unsigned full_pat_w_st3;
43  // number of input bits for st 1
44  unsigned full_pat_w_st1;
45  // width of zero padding for station copies
46  unsigned padding_w_st1;
47  unsigned padding_w_st3;
48  // full pattern widths (aka reduced pattern)
49  unsigned red_pat_w_st3;
50  unsigned red_pat_w_st1;
51  // number of folds for pattern detectors, do not set to 1
52  unsigned fold;
53  // number of th outputs for ME1/1
54  unsigned th_ch11;
55  unsigned bw_q;
56  unsigned bw_addr;
57  // strips per section, calculated so ph pattern would cover +/- 8 deg in st 1
58  unsigned ph_raw_w; // kludge to fix synth error, need to understand
59  unsigned th_raw_w;
60  // max possible drifttime
61  unsigned max_drift;
62  // bit widths of precise phi and eta outputs
63  unsigned bw_phi;
64  unsigned bw_eta;
65  // width of ph raw hits, max coverage +8 to cover possible chamber displacement
66  unsigned ph_hit_w; //80 + 8;
67  // for 20 deg chambers
68  unsigned ph_hit_w20;
69  // for 10 deg chambers
70  unsigned ph_hit_w10; //40 + 8;
71  // width of th raw hits, max coverage +8 to cover possible chamber displacement
72  unsigned th_hit_w;
73  unsigned endcap;
74  unsigned n_strips;
75  unsigned n_wg;
76  // theta range (take +1 because th_coverage contains max th value starting from 0)
77  unsigned th_coverage;
78  // phi range
79  unsigned ph_coverage; //80 : 40;
80  // number of th outputs takes ME1/1 th duplication into account
81  unsigned th_ch;
82  // is this chamber mounted in reverse direction?
83  unsigned ph_reverse;
84  unsigned th_mem_sz;
85  unsigned th_corr_mem_sz;
86  // multiplier bit width (phi + factor)
87  unsigned mult_bw;
88  // ph zone boundaries for chambers that cover more than one zone
89 // hardcoded boundaries must match boundaries in ph_th_match module
90  unsigned ph_zone_bnd1;
91  unsigned ph_zone_bnd2;
92  unsigned zone_overlap;
93  // sorter parameters
94  unsigned bwr; // rank width
95  unsigned bpow; // (1 << bpow) is count of input ranks
96  unsigned cnr; // internal rank count
97  unsigned cnrex; // actual input rank count, must be even
98 
107  signal_ vi; // valid
108  signal_ hi; // bx index
109  signal_ ci; // chamber
110  signal_ si; // segment
120  signal_ bt_vi; // valid
121  signal_ bt_hi; // bx index
122  signal_ bt_ci; // chamber
123  signal_ bt_si; // segment
124  // segment ids reformatted to chamber ids in sector
125 //[zone][pattern_num][station 0-4]
143 
144 
145  unsigned z;
146  unsigned n;
147  unsigned s;
148  unsigned bn;
149  unsigned i;
150  unsigned j;
151 
152  void init ();
153  void operator()
154  (
155  signal_& phi__io,
156  signal_& theta__io,
157  signal_& cpattern__io,
158  signal_& delta_ph__io,
159  signal_& delta_th__io,
160  signal_& sign_ph__io,
161  signal_& sign_th__io,
162  signal_& rank__io,
163  signal_& vi__io,
164  signal_& hi__io,
165  signal_& ci__io,
166  signal_& si__io,
167  signal_& bt_phi__io,
168  signal_& bt_theta__io,
169  signal_& bt_cpattern__io,
170  signal_& bt_delta_ph__io,
171  signal_& bt_delta_th__io,
172  signal_& bt_sign_ph__io,
173  signal_& bt_sign_th__io,
174  signal_& bt_rank__io,
175  signal_& bt_vi__io,
176  signal_& bt_hi__io,
177  signal_& bt_ci__io,
178  signal_& bt_si__io,
179  signal_& clk__io
180  );
181 };
182 #endif
signal_ larger
Definition: best_tracks.h:130
signal_storage ri__storage
Definition: best_tracks.h:131
signal_storage real_ch__storage
Definition: best_tracks.h:139
unsigned endcap
Definition: best_tracks.h:73
signal_storage cn_vi__storage
Definition: best_tracks.h:126
unsigned ph_zone_bnd2
Definition: best_tracks.h:91
signal_ bt_rank
Definition: best_tracks.h:119
signal_storage sh_segs__storage
Definition: best_tracks.h:142
signal_storage cn_si__storage
Definition: best_tracks.h:129
unsigned bw_phi
Definition: best_tracks.h:63
signal_ real_ch
Definition: best_tracks.h:139
unsigned ph_raw_w
Definition: best_tracks.h:58
signal_ real_st
Definition: best_tracks.h:140
unsigned bn
Definition: best_tracks.h:148
signal_ cn_ci
Definition: best_tracks.h:128
unsigned th_corr_mem_sz
Definition: best_tracks.h:85
unsigned pat_w_st3
Definition: best_tracks.h:38
unsigned th_raw_w
Definition: best_tracks.h:59
signal_ bt_theta
Definition: best_tracks.h:113
signal_ bt_vi
Definition: best_tracks.h:120
unsigned mult_bw
Definition: best_tracks.h:87
signal_storage sum__storage
Definition: best_tracks.h:141
signal_storage rj__storage
Definition: best_tracks.h:132
signal_ hi
Definition: best_tracks.h:108
unsigned th_mem_sz
Definition: best_tracks.h:84
unsigned red_pat_w_st3
Definition: best_tracks.h:49
unsigned ph_reverse
Definition: best_tracks.h:83
unsigned bw_ds
Definition: best_tracks.h:34
signal_ bt_sign_ph
Definition: best_tracks.h:117
unsigned th_ch11
Definition: best_tracks.h:54
signal_ sum
Definition: best_tracks.h:141
signal_storage cham__storage
Definition: best_tracks.h:138
signal_ delta_th
Definition: best_tracks.h:103
signal_ sh_segs
Definition: best_tracks.h:142
signal_ bt_ci
Definition: best_tracks.h:122
unsigned bw_addr
Definition: best_tracks.h:56
unsigned padding_w_st1
Definition: best_tracks.h:46
signal_ bt_delta_th
Definition: best_tracks.h:116
unsigned seg_ch
Definition: best_tracks.h:23
signal_storage real_st__storage
Definition: best_tracks.h:140
signal_ gt
Definition: best_tracks.h:136
signal_ cn_si
Definition: best_tracks.h:129
unsigned n_wg
Definition: best_tracks.h:75
unsigned i
Definition: best_tracks.h:149
unsigned th_coverage
Definition: best_tracks.h:77
unsigned bw_q
Definition: best_tracks.h:55
signal_ theta
Definition: best_tracks.h:100
unsigned red_pat_w_st1
Definition: best_tracks.h:50
bool glbl_gsr
Definition: best_tracks.h:19
unsigned full_pat_w_st3
Definition: best_tracks.h:42
signal_storage gt__storage
Definition: best_tracks.h:136
unsigned ph_hit_w
Definition: best_tracks.h:66
void defparam()
signal_ sign_ph
Definition: best_tracks.h:104
unsigned th_hit_w
Definition: best_tracks.h:72
unsigned ph_hit_w10
Definition: best_tracks.h:70
signal_ ri
Definition: best_tracks.h:131
signal_ si
Definition: best_tracks.h:110
signal_storage cn_hi__storage
Definition: best_tracks.h:127
unsigned ph_zone_bnd1
Definition: best_tracks.h:90
unsigned z
Definition: best_tracks.h:145
unsigned bwr
Definition: best_tracks.h:94
signal_storage winner__storage
Definition: best_tracks.h:135
signal_ delta_ph
Definition: best_tracks.h:102
unsigned padding_w_st3
Definition: best_tracks.h:47
unsigned fold
Definition: best_tracks.h:52
unsigned n_strips
Definition: best_tracks.h:74
unsigned bw_fph
Definition: best_tracks.h:29
unsigned cnrex
Definition: best_tracks.h:97
unsigned s
Definition: best_tracks.h:147
signal_ bt_phi
Definition: best_tracks.h:112
signal_ vi
Definition: best_tracks.h:107
void build()
signal_ cn_vi
Definition: best_tracks.h:126
unsigned th_ch
Definition: best_tracks.h:81
signal_ eq
Definition: best_tracks.h:137
signal_ sign_th
Definition: best_tracks.h:105
signal_storage exists__storage
Definition: best_tracks.h:133
unsigned cnr
Definition: best_tracks.h:96
signal_ bt_cpattern
Definition: best_tracks.h:114
unsigned max_drift
Definition: best_tracks.h:61
unsigned zone_overlap
Definition: best_tracks.h:92
unsigned bpow
Definition: best_tracks.h:95
signal_storage eq__storage
Definition: best_tracks.h:137
unsigned bw_wg
Definition: best_tracks.h:32
signal_ cn_hi
Definition: best_tracks.h:127
signal_ kill1
Definition: best_tracks.h:134
signal_ rj
Definition: best_tracks.h:132
unsigned cscid
Definition: best_tracks.h:21
signal_ phi
Definition: best_tracks.h:99
unsigned ph_hit_w20
Definition: best_tracks.h:68
signal_ rank
Definition: best_tracks.h:106
signal_ bt_hi
Definition: best_tracks.h:121
unsigned pat_w_st1
Definition: best_tracks.h:40
unsigned bw_eta
Definition: best_tracks.h:64
unsigned n
Definition: best_tracks.h:146
unsigned bw_ph
Definition: best_tracks.h:26
signal_storage cn_ci__storage
Definition: best_tracks.h:128
signal_ cham
Definition: best_tracks.h:138
signal_ cpattern
Definition: best_tracks.h:101
signal_ ci
Definition: best_tracks.h:109
unsigned bw_th
Definition: best_tracks.h:27
unsigned bw_fth
Definition: best_tracks.h:30
signal_ bt_si
Definition: best_tracks.h:123
unsigned ph_coverage
Definition: best_tracks.h:79
signal_ bt_sign_th
Definition: best_tracks.h:118
unsigned bw_hs
Definition: best_tracks.h:36
signal_storage larger__storage
Definition: best_tracks.h:130
unsigned j
Definition: best_tracks.h:150
signal_storage kill1__storage
Definition: best_tracks.h:134
signal_ winner
Definition: best_tracks.h:135
signal_ bt_delta_ph
Definition: best_tracks.h:115
signal_ clk
Definition: best_tracks.h:111
unsigned station
Definition: best_tracks.h:20
unsigned full_pat_w_st1
Definition: best_tracks.h:44
signal_ exists
Definition: best_tracks.h:133