CMS 3D CMS Logo

coord_delay.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 __coord_delay_h_file__
9 #define __coord_delay_h_file__
10 #include "vppc_sim_lib.h"
11 
13 {
14  public:
15  coord_delay(){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  // pulse length
23  unsigned pulse_l;
24  unsigned latency;
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  // width of combined memory data
102  unsigned mem_ph_bw;
103  unsigned mem_th_bw;
104  unsigned mem_th11_bw;
105  unsigned mem_vl_bw;
106  unsigned mem_me11a_bw;
107  unsigned mem_cpat_bw;
108 
122  // combined signals with all values merged
135  // BRAM
142  // read address
144  // write address
146 
147 
148  // merge inputs
149  unsigned i;
150  unsigned j;
151  unsigned k;
152  unsigned d;
153 
154  void init ();
155  void operator()
156  (
157  signal_& phi__io,
158  signal_& th11i__io,
159  signal_& thi__io,
160  signal_& vli__io,
161  signal_& me11ai__io,
162  signal_& cpati__io,
163  signal_& pho__io,
164  signal_& th11o__io,
165  signal_& tho__io,
166  signal_& vlo__io,
167  signal_& me11ao__io,
168  signal_& cpato__io,
169  signal_& clk__io
170  );
171 };
172 #endif
unsigned ph_zone_bnd2
Definition: coord_delay.h:94
unsigned ph_reverse
Definition: coord_delay.h:86
unsigned cnr
Definition: coord_delay.h:99
unsigned pat_w_st3
Definition: coord_delay.h:41
unsigned padding_w_st3
Definition: coord_delay.h:50
unsigned endcap
Definition: coord_delay.h:76
signal_ mem_ph_in
Definition: coord_delay.h:123
signal_ cpato
Definition: coord_delay.h:121
signal_ ra
Definition: coord_delay.h:143
unsigned mem_me11a_bw
Definition: coord_delay.h:106
signal_ th11o
Definition: coord_delay.h:117
signal_ mem_vl_out
Definition: coord_delay.h:130
unsigned bpow
Definition: coord_delay.h:98
unsigned bw_ph
Definition: coord_delay.h:29
unsigned pulse_l
Definition: coord_delay.h:23
signal_storage mem_cpat_in__storage
Definition: coord_delay.h:133
unsigned bwr
Definition: coord_delay.h:97
signal_ th11i
Definition: coord_delay.h:110
signal_ mem_th11_out
Definition: coord_delay.h:128
bool glbl_gsr
Definition: coord_delay.h:19
unsigned bw_hs
Definition: coord_delay.h:39
signal_ mem_th_out
Definition: coord_delay.h:126
void defparam()
signal_ wa
Definition: coord_delay.h:145
signal_storage mem_cpat_out__storage
Definition: coord_delay.h:134
signal_storage mem_th_out__storage
Definition: coord_delay.h:126
signal_storage mem_me11a__storage
Definition: coord_delay.h:140
unsigned th_corr_mem_sz
Definition: coord_delay.h:88
unsigned ph_zone_bnd1
Definition: coord_delay.h:93
signal_ vli
Definition: coord_delay.h:112
unsigned ph_hit_w20
Definition: coord_delay.h:71
unsigned ph_hit_w
Definition: coord_delay.h:69
signal_storage mem_vl_in__storage
Definition: coord_delay.h:129
unsigned th_hit_w
Definition: coord_delay.h:75
unsigned th_mem_sz
Definition: coord_delay.h:87
signal_storage mem_cpat__storage
Definition: coord_delay.h:141
unsigned seg_ch
Definition: coord_delay.h:26
unsigned padding_w_st1
Definition: coord_delay.h:49
unsigned bw_phi
Definition: coord_delay.h:66
signal_ mem_vl
Definition: coord_delay.h:139
signal_ mem_vl_in
Definition: coord_delay.h:129
unsigned max_drift
Definition: coord_delay.h:64
unsigned k
Definition: coord_delay.h:151
void build()
signal_ mem_me11a_in
Definition: coord_delay.h:131
unsigned pat_w_st1
Definition: coord_delay.h:43
unsigned bw_th
Definition: coord_delay.h:30
signal_ vlo
Definition: coord_delay.h:119
unsigned d
Definition: coord_delay.h:152
unsigned ph_coverage
Definition: coord_delay.h:82
unsigned bw_wg
Definition: coord_delay.h:35
unsigned j
Definition: coord_delay.h:150
unsigned i
Definition: coord_delay.h:149
unsigned mult_bw
Definition: coord_delay.h:90
signal_ mem_cpat_in
Definition: coord_delay.h:133
unsigned n_wg
Definition: coord_delay.h:78
signal_storage mem_vl_out__storage
Definition: coord_delay.h:130
signal_ me11ai
Definition: coord_delay.h:113
unsigned bw_fth
Definition: coord_delay.h:33
unsigned cscid
Definition: coord_delay.h:21
unsigned th_coverage
Definition: coord_delay.h:80
signal_storage mem_vl__storage
Definition: coord_delay.h:139
signal_ pho
Definition: coord_delay.h:116
signal_storage mem_th__storage
Definition: coord_delay.h:137
unsigned station
Definition: coord_delay.h:20
unsigned mem_ph_bw
Definition: coord_delay.h:102
signal_ mem_th
Definition: coord_delay.h:137
signal_storage ra__storage
Definition: coord_delay.h:143
signal_storage mem_ph__storage
Definition: coord_delay.h:136
signal_storage mem_th11__storage
Definition: coord_delay.h:138
unsigned mem_th11_bw
Definition: coord_delay.h:104
unsigned zone_overlap
Definition: coord_delay.h:95
signal_ mem_th11
Definition: coord_delay.h:138
unsigned bw_fph
Definition: coord_delay.h:32
unsigned full_pat_w_st1
Definition: coord_delay.h:47
signal_ mem_cpat_out
Definition: coord_delay.h:134
unsigned n_strips
Definition: coord_delay.h:77
signal_storage wa__storage
Definition: coord_delay.h:145
signal_ mem_th11_in
Definition: coord_delay.h:127
unsigned th_ch11
Definition: coord_delay.h:57
signal_storage mem_ph_in__storage
Definition: coord_delay.h:123
unsigned mem_th_bw
Definition: coord_delay.h:103
signal_ cpati
Definition: coord_delay.h:114
signal_ mem_ph
Definition: coord_delay.h:136
signal_storage mem_th_in__storage
Definition: coord_delay.h:125
signal_ me11ao
Definition: coord_delay.h:120
unsigned mem_vl_bw
Definition: coord_delay.h:105
signal_ clk
Definition: coord_delay.h:115
signal_ tho
Definition: coord_delay.h:118
signal_ phi
Definition: coord_delay.h:109
unsigned bw_eta
Definition: coord_delay.h:67
signal_ mem_me11a_out
Definition: coord_delay.h:132
signal_ mem_me11a
Definition: coord_delay.h:140
signal_storage mem_th11_out__storage
Definition: coord_delay.h:128
unsigned red_pat_w_st1
Definition: coord_delay.h:53
unsigned red_pat_w_st3
Definition: coord_delay.h:52
unsigned bw_ds
Definition: coord_delay.h:37
unsigned th_raw_w
Definition: coord_delay.h:62
unsigned ph_hit_w10
Definition: coord_delay.h:73
signal_ mem_th_in
Definition: coord_delay.h:125
signal_storage mem_th11_in__storage
Definition: coord_delay.h:127
signal_ thi
Definition: coord_delay.h:111
unsigned mem_cpat_bw
Definition: coord_delay.h:107
unsigned full_pat_w_st3
Definition: coord_delay.h:45
unsigned bw_addr
Definition: coord_delay.h:59
unsigned fold
Definition: coord_delay.h:55
signal_ mem_cpat
Definition: coord_delay.h:141
unsigned latency
Definition: coord_delay.h:24
unsigned th_ch
Definition: coord_delay.h:84
signal_storage mem_me11a_out__storage
Definition: coord_delay.h:132
signal_ mem_ph_out
Definition: coord_delay.h:124
unsigned bw_q
Definition: coord_delay.h:58
signal_storage mem_ph_out__storage
Definition: coord_delay.h:124
unsigned cnrex
Definition: coord_delay.h:100
unsigned ph_raw_w
Definition: coord_delay.h:61
signal_storage mem_me11a_in__storage
Definition: coord_delay.h:131