CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
zone_best3.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 __zone_best3_h_file__
9 #define __zone_best3_h_file__
10 #include "vppc_sim_lib.h"
11 #include "zone_best.h"
12 
14 {
15  public:
16  zone_best3(){built = false; glbl_gsr = true; defparam();}
17  void defparam();
18  void build();
19  bool built;
20  bool glbl_gsr;
21  unsigned station;
22  unsigned cscid;
23  // segments per chamber
24  unsigned seg_ch;
25  // bit widths of ph and th outputs, reduced precision
26 // have to be derived from pattern width on top level
27  unsigned bw_ph;
28  unsigned bw_th;
29  // bit widths of ph and th, full precision
30  unsigned bw_fph;
31  unsigned bw_fth;
32  // wiregroup input bit width (0..111)
33  unsigned bw_wg;
34  // bit width of dblstrip input (max 80 for ME234/1 with double-width strips)
35  unsigned bw_ds;
36  // width of halfstrip input
37  unsigned bw_hs;
38  // pattern half-width for stations 3,4
39  unsigned pat_w_st3; //4;
40  // pattern half-width for station 1
41  unsigned pat_w_st1;
42  // number of input bits for stations 3,4
43  unsigned full_pat_w_st3;
44  // number of input bits for st 1
45  unsigned full_pat_w_st1;
46  // width of zero padding for station copies
47  unsigned padding_w_st1;
48  unsigned padding_w_st3;
49  // full pattern widths (aka reduced pattern)
50  unsigned red_pat_w_st3;
51  unsigned red_pat_w_st1;
52  // number of folds for pattern detectors, do not set to 1
53  unsigned fold;
54  // number of th outputs for ME1/1
55  unsigned th_ch11;
56  unsigned bw_q;
57  unsigned bw_addr;
58  // strips per section, calculated so ph pattern would cover +/- 8 deg in st 1
59  unsigned ph_raw_w; // kludge to fix synth error, need to understand
60  unsigned th_raw_w;
61  // max possible drifttime
62  unsigned max_drift;
63  // bit widths of precise phi and eta outputs
64  unsigned bw_phi;
65  unsigned bw_eta;
66  // width of ph raw hits, max coverage +8 to cover possible chamber displacement
67  unsigned ph_hit_w; //80 + 8;
68  // for 20 deg chambers
69  unsigned ph_hit_w20;
70  // for 10 deg chambers
71  unsigned ph_hit_w10; //40 + 8;
72  // width of th raw hits, max coverage +8 to cover possible chamber displacement
73  unsigned th_hit_w;
74  unsigned endcap;
75  unsigned n_strips;
76  unsigned n_wg;
77  // theta range (take +1 because th_coverage contains max th value starting from 0)
78  unsigned th_coverage;
79  // phi range
80  unsigned ph_coverage; //80 : 40;
81  // number of th outputs takes ME1/1 th duplication into account
82  unsigned th_ch;
83  // is this chamber mounted in reverse direction?
84  unsigned ph_reverse;
85  unsigned th_mem_sz;
86  unsigned th_corr_mem_sz;
87  // multiplier bit width (phi + factor)
88  unsigned mult_bw;
89  // ph zone boundaries for chambers that cover more than one zone
90 // hardcoded boundaries must match boundaries in ph_th_match module
91  unsigned ph_zone_bnd1;
92  unsigned ph_zone_bnd2;
93  unsigned zone_overlap;
94  // sorter parameters
95  unsigned bwr; // rank width
96  unsigned bpow; // (1 << bpow) is count of input ranks
97  unsigned cnr; // internal rank count
98  unsigned cnrex; // actual input rank count, must be even
99 
100  signal_ rank_ex; // input ranks
101  signal_ clk_nx; // fast clock
102  signal_ winner; // winners
103  signal_ wini; // winner indexes one bit longer than in internal sorters
104  // delay lines for early winners
110 
111  signal_storage rankr__storage; signal_ rankr; // rank connections between stages
112 
113  unsigned j;
114  unsigned i;
115 
116  void init ();
117  void operator()
118  (
119  signal_& rank_ex__io,
120  signal_& winner__io,
121  signal_& wini__io,
122  signal_& clk_nx__io
123  );
124  class gb__class
125  {
126  public:
128  {
129  public:
131 
132  void init();
133  };
134  map <ull, zone_best_loop__class> zone_best_loop;
135 
136  void init();
137  };
139 };
140 #endif
signal_storage winnerd__storage
Definition: zone_best3.h:105
signal_storage winnerw__storage
Definition: zone_best3.h:107
unsigned full_pat_w_st3
Definition: zone_best3.h:43
unsigned i
Definition: zone_best3.h:114
unsigned th_corr_mem_sz
Definition: zone_best3.h:86
unsigned pat_w_st1
Definition: zone_best3.h:41
unsigned bw_ph
Definition: zone_best3.h:27
unsigned red_pat_w_st1
Definition: zone_best3.h:51
unsigned ph_hit_w10
Definition: zone_best3.h:71
signal_ rankr
Definition: zone_best3.h:111
unsigned n_strips
Definition: zone_best3.h:75
unsigned bw_eta
Definition: zone_best3.h:65
unsigned mult_bw
Definition: zone_best3.h:88
unsigned zone_overlap
Definition: zone_best3.h:93
unsigned padding_w_st1
Definition: zone_best3.h:47
unsigned bwr
Definition: zone_best3.h:95
signal_storage winid__storage
Definition: zone_best3.h:106
unsigned bpow
Definition: zone_best3.h:96
unsigned th_hit_w
Definition: zone_best3.h:73
bool built
Definition: zone_best3.h:19
unsigned bw_fph
Definition: zone_best3.h:30
signal_ wini
Definition: zone_best3.h:103
unsigned pat_w_st3
Definition: zone_best3.h:39
signal_storage winiw__storage
Definition: zone_best3.h:108
signal_ winiw
Definition: zone_best3.h:108
unsigned th_ch11
Definition: zone_best3.h:55
signal_ winnerw
Definition: zone_best3.h:107
unsigned red_pat_w_st3
Definition: zone_best3.h:50
unsigned ph_hit_w
Definition: zone_best3.h:67
unsigned max_drift
Definition: zone_best3.h:62
unsigned n_wg
Definition: zone_best3.h:76
unsigned padding_w_st3
Definition: zone_best3.h:48
unsigned th_mem_sz
Definition: zone_best3.h:85
unsigned j
Definition: zone_best3.h:113
unsigned station
Definition: zone_best3.h:21
unsigned ph_reverse
Definition: zone_best3.h:84
unsigned bw_q
Definition: zone_best3.h:56
signal_storage valid__storage
Definition: zone_best3.h:109
unsigned ph_zone_bnd2
Definition: zone_best3.h:92
unsigned cscid
Definition: zone_best3.h:22
unsigned cnr
Definition: zone_best3.h:97
void defparam()
void build()
unsigned th_ch
Definition: zone_best3.h:82
unsigned fold
Definition: zone_best3.h:53
bool glbl_gsr
Definition: zone_best3.h:20
signal_storage rankr__storage
Definition: zone_best3.h:111
unsigned ph_hit_w20
Definition: zone_best3.h:69
signal_ rank_ex
Definition: zone_best3.h:100
unsigned cnrex
Definition: zone_best3.h:98
unsigned th_coverage
Definition: zone_best3.h:78
signal_ clk_nx
Definition: zone_best3.h:101
signal_ winner
Definition: zone_best3.h:102
unsigned bw_phi
Definition: zone_best3.h:64
unsigned endcap
Definition: zone_best3.h:74
unsigned ph_raw_w
Definition: zone_best3.h:59
gb__class gb
Definition: zone_best3.h:138
signal_ winid
Definition: zone_best3.h:106
signal_ valid
Definition: zone_best3.h:109
unsigned bw_hs
Definition: zone_best3.h:37
map< unsigned int, zone_best_loop__class > zone_best_loop
Definition: zone_best3.h:134
signal_ winnerd
Definition: zone_best3.h:105
unsigned bw_ds
Definition: zone_best3.h:35
unsigned bw_fth
Definition: zone_best3.h:31
unsigned full_pat_w_st1
Definition: zone_best3.h:45
void init()
unsigned bw_wg
Definition: zone_best3.h:33
unsigned ph_coverage
Definition: zone_best3.h:80
unsigned seg_ch
Definition: zone_best3.h:24
unsigned bw_addr
Definition: zone_best3.h:57
unsigned ph_zone_bnd1
Definition: zone_best3.h:91
unsigned bw_th
Definition: zone_best3.h:28
unsigned th_raw_w
Definition: zone_best3.h:60