CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ph_pattern.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 __ph_pattern_h_file__
9 #define __ph_pattern_h_file__
10 #include "vppc_sim_lib.h"
11 
13 {
14  public:
15  ph_pattern(){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  // bx counters, one per pattern per fold
115 
116 
117  unsigned mi;
118 
119  void init ();
120  void operator()
121  (
122  signal_& st1__io,
123  signal_& st2__io,
124  signal_& st3__io,
125  signal_& st4__io,
126  signal_& drifttime__io,
127  signal_& foldn__io,
128  signal_& qcode__io,
129  signal_& clk__io
130  );
131 };
132 #endif
signal_ comp1
Definition: ph_pattern.h:112
unsigned seg_ch
Definition: ph_pattern.h:23
unsigned ph_hit_w20
Definition: ph_pattern.h:68
unsigned bwr
Definition: ph_pattern.h:94
signal_ qcode
Definition: ph_pattern.h:106
unsigned padding_w_st3
Definition: ph_pattern.h:47
unsigned red_pat_w_st3
Definition: ph_pattern.h:49
unsigned full_pat_w_st3
Definition: ph_pattern.h:42
unsigned bw_addr
Definition: ph_pattern.h:56
unsigned bw_fph
Definition: ph_pattern.h:29
unsigned station
Definition: ph_pattern.h:20
unsigned ph_zone_bnd2
Definition: ph_pattern.h:91
signal_ comp3
Definition: ph_pattern.h:114
signal_ st1
Definition: ph_pattern.h:99
unsigned bw_eta
Definition: ph_pattern.h:64
unsigned bw_phi
Definition: ph_pattern.h:63
unsigned mi
Definition: ph_pattern.h:117
signal_ st2
Definition: ph_pattern.h:100
unsigned th_hit_w
Definition: ph_pattern.h:72
signal_ straightness
Definition: ph_pattern.h:111
unsigned th_ch11
Definition: ph_pattern.h:54
signal_ comp2
Definition: ph_pattern.h:113
unsigned cnr
Definition: ph_pattern.h:96
unsigned th_coverage
Definition: ph_pattern.h:77
signal_ clk
Definition: ph_pattern.h:105
signal_ st3
Definition: ph_pattern.h:101
signal_ qcode_p
Definition: ph_pattern.h:110
void build()
unsigned pat_w_st3
Definition: ph_pattern.h:38
unsigned bw_wg
Definition: ph_pattern.h:32
unsigned endcap
Definition: ph_pattern.h:73
unsigned bw_hs
Definition: ph_pattern.h:36
unsigned th_ch
Definition: ph_pattern.h:81
unsigned full_pat_w_st1
Definition: ph_pattern.h:44
unsigned ph_raw_w
Definition: ph_pattern.h:58
unsigned bw_th
Definition: ph_pattern.h:27
unsigned ph_hit_w
Definition: ph_pattern.h:66
signal_storage straightness__storage
Definition: ph_pattern.h:111
unsigned bpow
Definition: ph_pattern.h:95
unsigned th_mem_sz
Definition: ph_pattern.h:84
unsigned bw_ds
Definition: ph_pattern.h:34
unsigned ph_coverage
Definition: ph_pattern.h:79
unsigned red_pat_w_st1
Definition: ph_pattern.h:50
unsigned ph_reverse
Definition: ph_pattern.h:83
unsigned pat_w_st1
Definition: ph_pattern.h:40
bool glbl_gsr
Definition: ph_pattern.h:19
signal_ st4
Definition: ph_pattern.h:102
unsigned n_strips
Definition: ph_pattern.h:74
signal_storage comp3__storage
Definition: ph_pattern.h:114
bool built
Definition: ph_pattern.h:18
signal_ bx
Definition: ph_pattern.h:108
unsigned n_wg
Definition: ph_pattern.h:75
unsigned bw_q
Definition: ph_pattern.h:55
unsigned ph_hit_w10
Definition: ph_pattern.h:70
unsigned cnrex
Definition: ph_pattern.h:97
signal_storage bx__storage
Definition: ph_pattern.h:108
unsigned bw_ph
Definition: ph_pattern.h:26
signal_ drifttime
Definition: ph_pattern.h:103
signal_ lyhits
Definition: ph_pattern.h:109
unsigned zone_overlap
Definition: ph_pattern.h:92
signal_storage comp2__storage
Definition: ph_pattern.h:113
signal_ foldn
Definition: ph_pattern.h:104
signal_storage comp1__storage
Definition: ph_pattern.h:112
unsigned ph_zone_bnd1
Definition: ph_pattern.h:90
unsigned mult_bw
Definition: ph_pattern.h:87
signal_storage lyhits__storage
Definition: ph_pattern.h:109
unsigned padding_w_st1
Definition: ph_pattern.h:46
unsigned fold
Definition: ph_pattern.h:52
unsigned bw_fth
Definition: ph_pattern.h:30
unsigned th_corr_mem_sz
Definition: ph_pattern.h:85
void defparam()
signal_storage qcode_p__storage
Definition: ph_pattern.h:110
unsigned th_raw_w
Definition: ph_pattern.h:59
unsigned cscid
Definition: ph_pattern.h:21
void init()
unsigned max_drift
Definition: ph_pattern.h:61