CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
deltas_sector.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_sector_h_file__
9 #define __deltas_sector_h_file__
10 #include "vppc_sim_lib.h"
11 #include "deltas.h"
12 #include "deltas.h"
13 
15 {
16  public:
17  deltas_sector(){built = false; glbl_gsr = true; defparam();}
18  void defparam();
19  void build();
20  bool built;
21  bool glbl_gsr;
22  unsigned station;
23  unsigned cscid;
24  unsigned me11;
25  // segments per chamber
26  unsigned seg_ch;
27  // bit widths of ph and th outputs, reduced precision
28 // have to be derived from pattern width on top level
29  unsigned bw_ph;
30  unsigned bw_th;
31  // bit widths of ph and th, full precision
32  unsigned bw_fph;
33  unsigned bw_fth;
34  // wiregroup input bit width (0..111)
35  unsigned bw_wg;
36  // bit width of dblstrip input (max 80 for ME234/1 with double-width strips)
37  unsigned bw_ds;
38  // width of halfstrip input
39  unsigned bw_hs;
40  // pattern half-width for stations 3,4
41  unsigned pat_w_st3; //4;
42  // pattern half-width for station 1
43  unsigned pat_w_st1;
44  // number of input bits for stations 3,4
45  unsigned full_pat_w_st3;
46  // number of input bits for st 1
47  unsigned full_pat_w_st1;
48  // width of zero padding for station copies
49  unsigned padding_w_st1;
50  unsigned padding_w_st3;
51  // full pattern widths (aka reduced pattern)
52  unsigned red_pat_w_st3;
53  unsigned red_pat_w_st1;
54  // number of folds for pattern detectors, do not set to 1
55  unsigned fold;
56  // number of th outputs for ME1/1
57  unsigned th_ch11;
58  unsigned bw_q;
59  unsigned bw_addr;
60  // strips per section, calculated so ph pattern would cover +/- 8 deg in st 1
61  unsigned ph_raw_w; // kludge to fix synth error, need to understand
62  unsigned th_raw_w;
63  // max possible drifttime
64  unsigned max_drift;
65  // bit widths of precise phi and eta outputs
66  unsigned bw_phi;
67  unsigned bw_eta;
68  // width of ph raw hits, max coverage +8 to cover possible chamber displacement
69  unsigned ph_hit_w; //80 + 8;
70  // for 20 deg chambers
71  unsigned ph_hit_w20;
72  // for 10 deg chambers
73  unsigned ph_hit_w10; //40 + 8;
74  // width of th raw hits, max coverage +8 to cover possible chamber displacement
75  unsigned th_hit_w;
76  unsigned endcap;
77  unsigned n_strips;
78  unsigned n_wg;
79  // theta range (take +1 because th_coverage contains max th value starting from 0)
80  unsigned th_coverage;
81  // phi range
82  unsigned ph_coverage; //80 : 40;
83  // number of th outputs takes ME1/1 th duplication into account
84  unsigned th_ch;
85  // is this chamber mounted in reverse direction?
86  unsigned ph_reverse;
87  unsigned th_mem_sz;
88  unsigned th_corr_mem_sz;
89  // multiplier bit width (phi + factor)
90  unsigned mult_bw;
91  // ph zone boundaries for chambers that cover more than one zone
92 // hardcoded boundaries must match boundaries in ph_th_match module
93  unsigned ph_zone_bnd1;
94  unsigned ph_zone_bnd2;
95  unsigned zone_overlap;
96  // sorter parameters
97  unsigned bwr; // rank width
98  unsigned bpow; // (1 << bpow) is count of input ranks
99  unsigned cnr; // internal rank count
100  unsigned cnrex; // actual input rank count, must be even
101  unsigned seg1; // number of segments station 1
102 
103  signal_ vi; // valid
104  signal_ hi; // bx index
105  signal_ ci; // chamber
106  signal_ si; // segment
107  signal_ ph_match; // matching ph
108  signal_ th_match; // matching th, 2 segments
109  signal_ th_match11; // matching th for ME11 (station 0 only), 4 segments (due to th duplication)
110  signal_ cpat_match; // matching pattern
112  signal_ th_window; // max th diff
122  signal_ vir; // valid
123  signal_ hir; // bx index
124  signal_ cir; // chamber
125  signal_ sir; // segment
126 
128 
129  unsigned i;
130  unsigned j;
131 
132  void init ();
133  void operator()
134  (
135  signal_& vi__io,
136  signal_& hi__io,
137  signal_& ci__io,
138  signal_& si__io,
139  signal_& ph_match__io,
140  signal_& th_match__io,
141  signal_& th_match11__io,
142  signal_& cpat_match__io,
143  signal_& ph_q__io,
144  signal_& th_window__io,
145  signal_& phi__io,
146  signal_& theta__io,
147  signal_& cpattern__io,
148  signal_& delta_ph__io,
149  signal_& delta_th__io,
150  signal_& sign_ph__io,
151  signal_& sign_th__io,
152  signal_& rank__io,
153  signal_& vir__io,
154  signal_& hir__io,
155  signal_& cir__io,
156  signal_& sir__io,
157  signal_& clk__io
158  );
159  class gb__class
160  {
161  public:
163  {
164  public:
165  class pl__class
166  {
167  public:
169 
170  void init();
171  };
172  map <ull, pl__class> pl;
173 
174  void init();
175  };
176  map <ull, zl11__class> zl11;
177  class zl__class
178  {
179  public:
180  class pl__class
181  {
182  public:
184 
185  void init();
186  };
187  map <ull, pl__class> pl;
188 
189  void init();
190  };
191  map <ull, zl__class> zl;
192 
193  void init();
194  };
196 };
197 #endif
unsigned bw_hs
Definition: deltas_sector.h:39
unsigned th_ch11
Definition: deltas_sector.h:57
unsigned bw_wg
Definition: deltas_sector.h:35
map< unsigned int, zl__class > zl
signal_ th_match
unsigned bwr
Definition: deltas_sector.h:97
unsigned bw_addr
Definition: deltas_sector.h:59
unsigned ph_raw_w
Definition: deltas_sector.h:61
unsigned bw_ds
Definition: deltas_sector.h:37
signal_ delta_ph
signal_ delta_th
unsigned bw_th
Definition: deltas_sector.h:30
unsigned mult_bw
Definition: deltas_sector.h:90
unsigned zone_overlap
Definition: deltas_sector.h:95
map< unsigned int, zl11__class > zl11
signal_ cpattern
signal_storage dummy__storage
unsigned th_mem_sz
Definition: deltas_sector.h:87
unsigned th_ch
Definition: deltas_sector.h:84
unsigned pat_w_st1
Definition: deltas_sector.h:43
Definition: deltas.h:18
unsigned ph_hit_w20
Definition: deltas_sector.h:71
unsigned red_pat_w_st1
Definition: deltas_sector.h:53
unsigned padding_w_st1
Definition: deltas_sector.h:49
unsigned bw_q
Definition: deltas_sector.h:58
unsigned th_hit_w
Definition: deltas_sector.h:75
signal_ th_match11
unsigned cscid
Definition: deltas_sector.h:23
unsigned th_corr_mem_sz
Definition: deltas_sector.h:88
unsigned full_pat_w_st3
Definition: deltas_sector.h:45
unsigned ph_reverse
Definition: deltas_sector.h:86
unsigned seg_ch
Definition: deltas_sector.h:26
unsigned me11
Definition: deltas_sector.h:24
unsigned bw_phi
Definition: deltas_sector.h:66
unsigned ph_zone_bnd1
Definition: deltas_sector.h:93
unsigned cnrex
unsigned ph_coverage
Definition: deltas_sector.h:82
unsigned pat_w_st3
Definition: deltas_sector.h:41
unsigned red_pat_w_st3
Definition: deltas_sector.h:52
unsigned full_pat_w_st1
Definition: deltas_sector.h:47
unsigned station
Definition: deltas_sector.h:22
signal_ cpat_match
unsigned th_raw_w
Definition: deltas_sector.h:62
gb__class gb
unsigned endcap
Definition: deltas_sector.h:76
unsigned fold
Definition: deltas_sector.h:55
signal_ th_window
unsigned n_strips
Definition: deltas_sector.h:77
unsigned th_coverage
Definition: deltas_sector.h:80
map< unsigned int, pl__class > pl
unsigned bw_eta
Definition: deltas_sector.h:67
unsigned bw_fth
Definition: deltas_sector.h:33
signal_ ph_match
unsigned bw_ph
Definition: deltas_sector.h:29
map< unsigned int, pl__class > pl
unsigned bpow
Definition: deltas_sector.h:98
unsigned n_wg
Definition: deltas_sector.h:78
unsigned bw_fph
Definition: deltas_sector.h:32
unsigned ph_hit_w
Definition: deltas_sector.h:69
unsigned max_drift
Definition: deltas_sector.h:64
unsigned ph_zone_bnd2
Definition: deltas_sector.h:94
unsigned cnr
Definition: deltas_sector.h:99
unsigned ph_hit_w10
Definition: deltas_sector.h:73
unsigned padding_w_st3
Definition: deltas_sector.h:50