File: indent_unique_case-1.v

package info (click to toggle)
verilog-mode 20161124.fd230e6-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 3,764 kB
  • ctags: 5,143
  • sloc: lisp: 12,430; perl: 293; makefile: 146; sh: 35; fortran: 2
file content (366 lines) | stat: -rw-r--r-- 8,092 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
module  xxx_xxxxxx  (input wire clk, input wire reset);
   
   typedef enum reg [4:0] {IDLE, IIII, HHHHH,
			   AA_OP, AA_CMRD, AA_CMRD_WAIT, AA_RMW, AA_RMW_WAIT, AA_CMLLL, AA_CMLLL_WAIT, AA_NEXT,
			   BB_OP, BB_CMLLL, BB_CMLLL_WAIT, BB_NEXT,
			   CC_OP, CC_NEXT_OOOO,
			   DD_OP, DD_CMRD, DD_CMRD_WAIT, DD_ACCUM, DD_CMLLL, DD_CMLLL_WAIT,
			   EE_OP, EE_NEXT_OOOO,
			   FF_OP,
			   zxcvzxcv, cvbncvbn} xxxxxx_state_e;
   
   xxxxxx_state_e current_state;

   always_ff @ (posedge clk) begin
      if (reset) begin
	 current_state <=  IDLE;
      end
      else begin
	 unique case (current_state)
	   
	   IDLE : begin
              qwerty <=  '0;
	      
              if (~qqq_empty)
		current_state <=  HHHHH;
	   end
	 AA_CMLLL : begin
	    lll_start <=  1'b1;
	    
	    if (jjjj_left < 4)
	      lll_wcnt <=  jjjj_left[2:0];
	    else
	      lll_wcnt <=  FOUR[2:0];
	    
	    current_state <=  AA_CMLLL_WAIT;
	 end
	 
	 HHHHH : begin
            qqq_opiuy <=  1'b1;
	    
            if (qqq_opiuy) begin
	       qqq_opiuy <=  '0;
	       current_state <=  IIII;
	       
            end
	 end
	 
	 AA_OP : begin
            if (aa_pgm_err) begin
	       current_state <=  zxcvzxcv;
            end
            else begin
	       jjjj_left <=  tgbyhn;
	       
	       current_state <=  AA_CMRD;
            end
	 end
	 
	 AA_CMRD : begin
	    uuuuu <=  1'b1;
	    current_state <=  AA_CMRD_WAIT;
	 end
	 IIII : begin
            qqq_opiuy <=  '0;
            if (err_iiii) begin
	       current_state <=  zxcvzxcv;
            end
            else begin
	       unique0 case (opm_cur)
		 
		 `XXXCP : current_state <=  AA_OP;
		 `XXXZR : current_state <=  BB_OP;
		 
		 default : current_state <=  zxcvzxcv;
	       endcase // unique0 case
	       
            end // else: !if(err_iiii)
	 end // case: IIII
	 
	 AA_CMRD_WAIT : begin
	    uuuuu <=  '0;
	    if (kjkjkjkjk) begin
	       if (err_cmrd_par) begin
		  current_state <=  zxcvzxcv;
	       end
	       else begin
		  if (err_cmrd_csel) begin
		     current_state <=  zxcvzxcv;
		  end
		  else begin : assign_writecvbn
		    lllcvbn <=  asdf ? ghjk : rdcvbn;
		     lll_par <=  asdf ? cvbn : rd_par;
		     
		     current_state <=  AA_CMLLL;
		  end
	       end // else: !if(err_cmrd_par)
	    end // if (kjkjkjkjk)
	 end // case: AA_CMRD_WAIT
	 
	 AA_CMLLL_WAIT : begin
	    lll_start <=  '0;
	    
	    if (lll_done) begin
	       if (alalala) begin
		  current_state <=  zxcvzxcv;
	       end
	       else begin
		  current_state <=  AA_NEXT;
	       end
	    end
	 end // case: AA_CMLLL_WAIT
	 
	 
	 
	 AA_NEXT : begin
	    
            if (qwerty) begin
               qwerty <=  '0;
	       
               
               unique case (opm_cur)
		 
		 `XXXCP : current_state <=  cvbncvbn;
		 `XXXSG : current_state <=  CC_NEXT_OOOO;
		 default : current_state <=  zxcvzxcv;
               endcase // unique  case
               
            end // if (qwerty)
            else begin
               jjjj_left <=  jjjj_left - 4;
	       
               current_state <=  AA_CMRD;
            end // else: !if(qwerty)
         end // case: AA_NEXT
	 
         BB_OP : begin
            if (bb_pgm_err) begin
               current_state <=  zxcvzxcv;
            end
            else begin
               lllcvbn <=  '0;
               lll_par <=  '0;
               jjjj_left <=  tgbyhn;
               
               current_state <=  BB_CMLLL;
            end
         end // case: BB_OP
         
         
	 
         BB_CMLLL : begin
            lll_start <=  1'b1;
	    
            if (jjjj_left <= 4) begin
               lll_wcnt <=  jjjj_left[2:0];
               qwerty <=  1'b1;
            end
            else begin
               lll_wcnt <=  FOUR[2:0];
            end
            
            current_state <=  BB_CMLLL_WAIT;
         end // case: BB_CMLLL
	 
         
         
         BB_CMLLL_WAIT : begin
            lll_start <=  '0;
            
            if (lll_done) begin
               if (alalala) begin
                  current_state <=  zxcvzxcv;
               end
               else begin
                  current_state <=  BB_NEXT;
               end
            end
         end // case: BB_CMLLL_WAIT
         
         
	 
         
         BB_NEXT : begin
            if (qwerty) begin
               qwerty <=  '0;
               current_state <=  cvbncvbn;
            end
            else begin
               jjjj_left <=  jjjj_left - 4;
               current_state <=  BB_CMLLL;
            end
         end
	 
	 
	 
	 
         
         
         CC_OP : begin
            jjjj_left_oooo <=  tgbyhn;
            
            if (tgbyhn <= oooo_cur) begin
               last_oooo <=  1'b1;
               jjjj_left <=  tgbyhn;
            end
            else begin
               jjjj_left <=  oooo_cur;
            end
	    
            current_state <=  AA_CMRD;
            
         end // case: CC_OP
         
         
	 
         
         CC_NEXT_OOOO : begin
            if (last_oooo) begin
               current_state <=  cvbncvbn;
            end
            else begin
	       
               rd_rrrr <=  rd_rrrr + ttttt_cur;
               lll_rrrr <=  lll_rrrr + oooo_cur;

               
               if (jjjj_left_oooo <= oooo_cur) begin
                  last_oooo <=  1'b1;
                  jjjj_left <=  jjjj_left_oooo;
               end
               else begin
                  jjjj_left <=  oooo_cur;
               end

               current_state <=  AA_CMRD;
            end // else: !if(last_oooo)
            
         end // case: CC_NEXT_OOOO


         
         
         
         DD_OP : begin
            accumulate_sum <=  '0;
            jjjj_left <=  tgbyhn;

            current_state <=  DD_CMRD;
         end
         
         
         DD_CMRD : begin
            uuuuu <=  1'b1;

            if (jjjj_left <= 4) begin
               qwerty <=  1'b1;
            end

            current_state <=  DD_CMRD_WAIT;
         end


         
         DD_CMRD_WAIT : begin
            uuuuu <=  '0;

            if (kjkjkjkjk) begin
               if (zazaz) begin
                  current_state <=  zxcvzxcv;
               end
               else begin

                  current_state <=  DD_ACCUM;
               end
            end
         end // case: DD_CMRD_WAIT
         
         
         DD_ACCUM : begin
            if (qwerty) begin
               current_state <=  DD_CMLLL;
            end
            else begin
               current_state <=  DD_CMRD;
            end
         end
         

         
         DD_CMLLL : begin
            lll_start <=  1'b1;
            
            current_state <=  DD_CMLLL_WAIT;
         end

         
         
         DD_CMLLL_WAIT : begin
            lll_start <=  '0;
            
         end
         

         
         
         EE_OP : begin
            jjjj_left_oooo <=  tgbyhn;
            
            current_state <=  AA_CMRD;
         end


         
         
         EE_NEXT_OOOO : begin
            if (last_oooo) begin
               current_state <=  cvbncvbn;
            end
            else begin

            end
         end

         
         
         FF_OP : begin
            asdf <=  1'b1;

            current_state <=  CC_OP;
         end
         
         zxcvzxcv : begin
            current_state <=  cvbncvbn;
         end
         
         cvbncvbn : begin
            if (dci_cur) begin
               current_state <=  IDLE;
               cmd_proc_done <=  1'b1;
            end
            else if (crq_ready) begin
               crq_start <=  1'b1;
               crqcvbn <=  complcvbn;
               crq_proc_id <=  proc_id_cur;
	       
               current_state <=  IDLE;
               cmd_proc_done <=  1'b1;
            end
         end // case: cvbncvbn
         
         default : begin
            current_state <=  IDLE;
            cmd_proc_done <=  1'b1;
         end
      endcase // unique  case
      end // else: !if(reset)
   end // always _ff



endmodule // xxx_xxxxxx