CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
match_ph_segments.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:01 2015
7 
8 #ifndef __match_ph_segments_h_file__
9 #define __match_ph_segments_h_file__
10 #include "vppc_sim_lib.h"
11 #include "find_segment.h"
12 #include "find_segment.h"
13 #include "find_segment.h"
14 #include "find_segment.h"
15 #include "find_segment.h"
16 #include "find_segment.h"
17 #include "find_segment.h"
18 #include "find_segment.h"
19 #include "find_segment.h"
20 #include "find_segment.h"
21 #include "find_segment.h"
22 #include "find_segment.h"
23 #include "find_segment.h"
24 #include "find_segment.h"
25 #include "find_segment.h"
26 #include "find_segment.h"
27 
29 {
30  public:
31  match_ph_segments(){built = false; glbl_gsr = true; defparam();}
32  void defparam();
33  void build();
34  bool built;
35  bool glbl_gsr;
36  unsigned station;
37  unsigned cscid;
38  // segments per chamber
39  unsigned seg_ch;
40  // bit widths of ph and th outputs, reduced precision
41 // have to be derived from pattern width on top level
42  unsigned bw_ph;
43  unsigned bw_th;
44  // bit widths of ph and th, full precision
45  unsigned bw_fph;
46  unsigned bw_fth;
47  // wiregroup input bit width (0..111)
48  unsigned bw_wg;
49  // bit width of dblstrip input (max 80 for ME234/1 with double-width strips)
50  unsigned bw_ds;
51  // width of halfstrip input
52  unsigned bw_hs;
53  // pattern half-width for stations 3,4
54  unsigned pat_w_st3; //4;
55  // pattern half-width for station 1
56  unsigned pat_w_st1;
57  // number of input bits for stations 3,4
58  unsigned full_pat_w_st3;
59  // number of input bits for st 1
60  unsigned full_pat_w_st1;
61  // width of zero padding for station copies
62  unsigned padding_w_st1;
63  unsigned padding_w_st3;
64  // full pattern widths (aka reduced pattern)
65  unsigned red_pat_w_st3;
66  unsigned red_pat_w_st1;
67  // number of folds for pattern detectors, do not set to 1
68  unsigned fold;
69  // number of th outputs for ME1/1
70  unsigned th_ch11;
71  unsigned bw_q;
72  unsigned bw_addr;
73  // strips per section, calculated so ph pattern would cover +/- 8 deg in st 1
74  unsigned ph_raw_w; // kludge to fix synth error, need to understand
75  unsigned th_raw_w;
76  // max possible drifttime
77  unsigned max_drift;
78  // bit widths of precise phi and eta outputs
79  unsigned bw_phi;
80  unsigned bw_eta;
81  // width of ph raw hits, max coverage +8 to cover possible chamber displacement
82  unsigned ph_hit_w; //80 + 8;
83  // for 20 deg chambers
84  unsigned ph_hit_w20;
85  // for 10 deg chambers
86  unsigned ph_hit_w10; //40 + 8;
87  // width of th raw hits, max coverage +8 to cover possible chamber displacement
88  unsigned th_hit_w;
89  unsigned endcap;
90  unsigned n_strips;
91  unsigned n_wg;
92  // theta range (take +1 because th_coverage contains max th value starting from 0)
93  unsigned th_coverage;
94  // phi range
95  unsigned ph_coverage; //80 : 40;
96  // number of th outputs takes ME1/1 th duplication into account
97  unsigned th_ch;
98  // is this chamber mounted in reverse direction?
99  unsigned ph_reverse;
100  unsigned th_mem_sz;
101  unsigned th_corr_mem_sz;
102  // multiplier bit width (phi + factor)
103  unsigned mult_bw;
104  // ph zone boundaries for chambers that cover more than one zone
105 // hardcoded boundaries must match boundaries in ph_th_match module
106  unsigned ph_zone_bnd1;
107  unsigned ph_zone_bnd2;
108  unsigned zone_overlap;
109  // sorter parameters
110  unsigned bwr; // rank width
111  unsigned bpow; // (1 << bpow) is count of input ranks
112  unsigned cnr; // internal rank count
113  unsigned cnrex; // actual input rank count, must be even
114 
123  signal_ vi; // valid (for each segment in chamber, so we can identify which th to use later)
124  signal_ hi; // bx index
125  signal_ ci; // chamber
126  signal_ si; // segment which has matching ph
127  signal_ ph_match; // matching phi
128  signal_ th_match; // matching th, 2 segments
129  signal_ th_match11; // matching th for ME11 (station 0 only), 4 segments (due to th duplication)
130  signal_ cpat_match; // matching patterns
132  // segments rerouted for find_segment inputs
133 // see find_segment_reroute.xlsx for details
134 // indexes are: [bx_history][chamber][segment]
199 
200 
201  unsigned i;
202  unsigned j;
203  unsigned k;
204  unsigned ki;
205 
206  void init ();
207  void operator()
208  (
209  signal_& ph_num__io,
210  signal_& ph_q__io,
211  signal_& ph__io,
212  signal_& vl__io,
213  signal_& th11__io,
214  signal_& th__io,
215  signal_& cpat__io,
216  signal_& vi__io,
217  signal_& hi__io,
218  signal_& ci__io,
219  signal_& si__io,
220  signal_& ph_match__io,
221  signal_& th_match__io,
222  signal_& th_match11__io,
223  signal_& cpat_match__io,
224  signal_& ph_qr__io,
225  signal_& clk__io
226  );
227  class gb__class
228  {
229  public:
231  {
232  public:
249 
250  void init();
251  };
252  map <ull, fs_loop__class> fs_loop;
253 
254  void init();
255  };
257 };
258 #endif
signal_storage ph_seg_v_z2_s3__storage
signal_storage ph_seg___z0_s3__storage
signal_storage ph_seg___z0_s0__storage
signal_storage cpat_seg___z0_s3__storage
signal_storage ph_seg_v_z1_s1__storage
signal_storage th_seg___z2_s2__storage
signal_storage th_seg___z1_s2__storage
signal_storage ph_seg___z1_s3__storage
signal_storage th_seg___z1_s1__storage
signal_storage ph_seg_v_z2_s0__storage
signal_storage ph_seg___z3_s1__storage
signal_storage ph_seg_v_z3_s2__storage
signal_storage ph_seg___z0_s2__storage
signal_storage ph_seg___z2_s2__storage
signal_storage ph_seg_v_z1_s0__storage
signal_storage ph_seg___z1_s1__storage
signal_storage ph_seg_v_z3_s0__storage
signal_storage th_seg___z2_s1__storage
signal_storage th_seg___z3_s1__storage
signal_storage th_seg___z3_s2__storage
signal_storage ph_seg___z1_s0__storage
signal_storage cpat_seg___z2_s1__storage
signal_storage th_seg___z1_s0__storage
signal_storage th_seg___z3_s0__storage
signal_storage th_seg___z2_s0__storage
signal_storage ph_seg___z3_s3__storage
signal_storage cpat_seg___z1_s2__storage
signal_storage th_seg___z0_s2__storage
signal_storage ph_seg_v_z0_s0__storage
signal_storage ph_seg_v_z3_s1__storage
signal_storage cpat_seg___z0_s1__storage
signal_storage ph_seg_v_z2_s1__storage
signal_storage ph_seg___z2_s0__storage
signal_storage cpat_seg___z2_s2__storage
signal_storage cpat_seg___z3_s2__storage
signal_storage cpat_seg___z2_s3__storage
signal_storage th_seg___z0_s1__storage
signal_storage ph_seg_v_z1_s2__storage
map< unsigned int, fs_loop__class > fs_loop
signal_storage ph_seg___z2_s3__storage
signal_storage cpat_seg___z1_s0__storage
signal_storage cpat_seg___z0_s2__storage
signal_storage ph_seg_v_z0_s3__storage
signal_storage cpat_seg___z2_s0__storage
signal_storage th_seg___z2_s3__storage
signal_storage cpat_seg___z3_s0__storage
signal_storage ph_seg_v_z2_s2__storage
signal_storage ph_seg_v_z0_s2__storage
signal_storage ph_seg_v_z0_s1__storage
signal_storage cpat_seg___z3_s3__storage
signal_storage th_seg___z0_s3__storage
signal_storage th_seg___z0_s0__storage
signal_storage th_seg___z1_s3__storage
signal_storage cpat_seg___z3_s1__storage
signal_storage ph_seg___z3_s2__storage
signal_storage ph_seg_v_z1_s3__storage
signal_storage ph_seg_v_z3_s3__storage
signal_storage ph_seg___z3_s0__storage
signal_storage ph_seg___z2_s1__storage
signal_storage cpat_seg___z1_s1__storage
signal_storage th_seg___z3_s3__storage
signal_storage cpat_seg___z1_s3__storage
signal_storage cpat_seg___z0_s0__storage
signal_storage ph_seg___z1_s2__storage
signal_storage ph_seg___z0_s1__storage