CMS 3D CMS Logo

zone_best.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_best_h_file__
9 #define __zone_best_h_file__
10 #include "vppc_sim_lib.h"
11 
12 class zone_best
13 {
14  public:
15  zone_best(){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 
99  signal_ rank; // input ranks
100  signal_ clk_nx; // fast clock
101  signal_ winner; // winner
102  signal_ wini; // winner index
103  signal_ rankr; // output ranks, with winner removed
106 
107 
108  unsigned i;
109  unsigned j;
110  unsigned ncomp;
111 
112  void init ();
113  void operator()
114  (
115  signal_& rank__io,
116  signal_& winner__io,
117  signal_& wini__io,
118  signal_& rankr__io,
119  signal_& clk_nx__io
120  );
121 };
122 #endif
void init()
signal_ winner
Definition: zone_best.h:101
unsigned ph_hit_w
Definition: zone_best.h:66
unsigned padding_w_st3
Definition: zone_best.h:47
unsigned n_strips
Definition: zone_best.h:74
void build()
signal_storage ranki__storage
Definition: zone_best.h:105
unsigned j
Definition: zone_best.h:109
signal_ clk_nx
Definition: zone_best.h:100
unsigned th_corr_mem_sz
Definition: zone_best.h:85
zone_best()
Definition: zone_best.h:15
unsigned bw_addr
Definition: zone_best.h:56
unsigned bw_q
Definition: zone_best.h:55
unsigned n_wg
Definition: zone_best.h:75
unsigned bwr
Definition: zone_best.h:94
unsigned ncomp
Definition: zone_best.h:110
unsigned ph_raw_w
Definition: zone_best.h:58
unsigned station
Definition: zone_best.h:20
unsigned endcap
Definition: zone_best.h:73
unsigned th_mem_sz
Definition: zone_best.h:84
unsigned ph_reverse
Definition: zone_best.h:83
unsigned bpow
Definition: zone_best.h:95
unsigned ph_hit_w10
Definition: zone_best.h:70
signal_ ranki
Definition: zone_best.h:105
unsigned cscid
Definition: zone_best.h:21
unsigned bw_eta
Definition: zone_best.h:64
unsigned th_ch
Definition: zone_best.h:81
unsigned pat_w_st3
Definition: zone_best.h:38
unsigned bw_fph
Definition: zone_best.h:29
unsigned bw_hs
Definition: zone_best.h:36
unsigned seg_ch
Definition: zone_best.h:23
unsigned th_coverage
Definition: zone_best.h:77
unsigned cnr
Definition: zone_best.h:96
unsigned th_ch11
Definition: zone_best.h:54
unsigned bw_wg
Definition: zone_best.h:32
unsigned full_pat_w_st1
Definition: zone_best.h:44
signal_ rank
Definition: zone_best.h:99
unsigned ph_zone_bnd1
Definition: zone_best.h:90
unsigned bw_ds
Definition: zone_best.h:34
unsigned max_drift
Definition: zone_best.h:61
unsigned i
Definition: zone_best.h:108
unsigned ph_hit_w20
Definition: zone_best.h:68
unsigned red_pat_w_st3
Definition: zone_best.h:49
signal_ cmp
Definition: zone_best.h:104
unsigned bw_th
Definition: zone_best.h:27
bool built
Definition: zone_best.h:18
unsigned bw_phi
Definition: zone_best.h:63
unsigned full_pat_w_st3
Definition: zone_best.h:42
unsigned zone_overlap
Definition: zone_best.h:92
bool glbl_gsr
Definition: zone_best.h:19
unsigned th_hit_w
Definition: zone_best.h:72
unsigned cnrex
Definition: zone_best.h:97
signal_storage cmp__storage
Definition: zone_best.h:104
signal_ wini
Definition: zone_best.h:102
unsigned red_pat_w_st1
Definition: zone_best.h:50
unsigned bw_ph
Definition: zone_best.h:26
unsigned fold
Definition: zone_best.h:52
unsigned mult_bw
Definition: zone_best.h:87
unsigned bw_fth
Definition: zone_best.h:30
unsigned ph_zone_bnd2
Definition: zone_best.h:91
unsigned th_raw_w
Definition: zone_best.h:59
void defparam()
unsigned padding_w_st1
Definition: zone_best.h:46
signal_ rankr
Definition: zone_best.h:103
unsigned pat_w_st1
Definition: zone_best.h:40
unsigned ph_coverage
Definition: zone_best.h:79