test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
best_delta.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 __best_delta_h_file__
9 #define __best_delta_h_file__
10 #include "vppc_sim_lib.h"
11 
13 {
14  public:
15  best_delta(){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  unsigned nseg; // number of input deltas, could be 4 or 8
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  unsigned bw_num;
100  unsigned nodiff;
101 
105  signal_ bth; // smallest delta
106  signal_ bsg; // sign of bth
107  signal_ bvl; // valid flag
108  signal_ bnm; // winner number
116 
117 
118  unsigned i;
119 
120  void init ();
121  void operator()
122  (
123  signal_& dth__io,
124  signal_& sth__io,
125  signal_& dvl__io,
126  signal_& bth__io,
127  signal_& bsg__io,
128  signal_& bvl__io,
129  signal_& bnm__io
130  );
131 };
132 #endif
unsigned red_pat_w_st3
Definition: best_delta.h:50
unsigned bw_ds
Definition: best_delta.h:35
unsigned cnrex
Definition: best_delta.h:98
unsigned nodiff
Definition: best_delta.h:100
unsigned ph_hit_w
Definition: best_delta.h:67
unsigned fold
Definition: best_delta.h:53
signal_storage num1__storage
Definition: best_delta.h:114
unsigned th_ch
Definition: best_delta.h:82
void init()
signal_ one_val
Definition: best_delta.h:109
signal_ bvl
Definition: best_delta.h:107
unsigned full_pat_w_st1
Definition: best_delta.h:45
unsigned cnr
Definition: best_delta.h:97
unsigned padding_w_st3
Definition: best_delta.h:48
unsigned bw_th
Definition: best_delta.h:28
unsigned mult_bw
Definition: best_delta.h:88
signal_storage num2__storage
Definition: best_delta.h:115
unsigned ph_reverse
Definition: best_delta.h:84
signal_ cmp2
Definition: best_delta.h:111
unsigned pat_w_st1
Definition: best_delta.h:41
unsigned th_corr_mem_sz
Definition: best_delta.h:86
signal_ sig1
Definition: best_delta.h:112
bool glbl_gsr
Definition: best_delta.h:19
signal_ bth
Definition: best_delta.h:105
unsigned station
Definition: best_delta.h:20
void defparam()
signal_ num2
Definition: best_delta.h:115
unsigned n_strips
Definition: best_delta.h:75
unsigned nseg
Definition: best_delta.h:22
unsigned th_coverage
Definition: best_delta.h:78
unsigned bw_fph
Definition: best_delta.h:30
signal_ sth
Definition: best_delta.h:103
signal_storage sig2__storage
Definition: best_delta.h:113
unsigned endcap
Definition: best_delta.h:74
unsigned n_wg
Definition: best_delta.h:76
unsigned th_mem_sz
Definition: best_delta.h:85
unsigned th_hit_w
Definition: best_delta.h:73
unsigned bw_wg
Definition: best_delta.h:33
unsigned max_drift
Definition: best_delta.h:62
unsigned i
Definition: best_delta.h:118
unsigned pat_w_st3
Definition: best_delta.h:39
unsigned bw_num
Definition: best_delta.h:99
unsigned padding_w_st1
Definition: best_delta.h:47
signal_storage cmp2__storage
Definition: best_delta.h:111
unsigned bw_eta
Definition: best_delta.h:65
unsigned ph_hit_w10
Definition: best_delta.h:71
signal_ bsg
Definition: best_delta.h:106
unsigned bpow
Definition: best_delta.h:96
unsigned ph_hit_w20
Definition: best_delta.h:69
signal_ dth
Definition: best_delta.h:102
void build()
unsigned bw_fth
Definition: best_delta.h:31
unsigned bwr
Definition: best_delta.h:95
unsigned th_raw_w
Definition: best_delta.h:60
unsigned bw_addr
Definition: best_delta.h:57
unsigned ph_coverage
Definition: best_delta.h:80
unsigned bw_phi
Definition: best_delta.h:64
unsigned full_pat_w_st3
Definition: best_delta.h:43
unsigned ph_zone_bnd1
Definition: best_delta.h:91
unsigned cscid
Definition: best_delta.h:21
unsigned bw_hs
Definition: best_delta.h:37
unsigned bw_q
Definition: best_delta.h:56
unsigned ph_zone_bnd2
Definition: best_delta.h:92
signal_ dvl
Definition: best_delta.h:104
unsigned bw_ph
Definition: best_delta.h:27
signal_ cmp1
Definition: best_delta.h:110
bool built
Definition: best_delta.h:18
signal_ sig2
Definition: best_delta.h:113
unsigned seg_ch
Definition: best_delta.h:24
unsigned th_ch11
Definition: best_delta.h:55
unsigned red_pat_w_st1
Definition: best_delta.h:51
signal_storage one_val__storage
Definition: best_delta.h:109
unsigned ph_raw_w
Definition: best_delta.h:59
signal_storage cmp1__storage
Definition: best_delta.h:110
signal_ bnm
Definition: best_delta.h:108
signal_ num1
Definition: best_delta.h:114
signal_storage sig1__storage
Definition: best_delta.h:112
unsigned zone_overlap
Definition: best_delta.h:93