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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
|
/******************************************************************************
**
** \file gh_debug_idsp.c
**
** \brief IDSP Debug Registers.
**
** Copyright: 2012 - 2016 (C) GoKe Microelectronics
**
** \attention THIS SAMPLE CODE IS PROVIDED AS IS. GOKE MICROELECTRONICS
** ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR
** OMMISSIONS.
**
** \note Do not modify this file as it is generated automatically.
**
******************************************************************************/
#ifndef SRC_INLINE
#include "gh_debug_idsp.h"
#endif
/*----------------------------------------------------------------------------*/
/* registers */
/*----------------------------------------------------------------------------*/
#define REG_DEBUG_IDSP_ADDRESS_REAL FIO_ADDRESS(DEBUG_IDSP,0x70118000) /* read/write */
#define REG_DEBUG_IDSP_CONFIG_REAL FIO_ADDRESS(DEBUG_IDSP,0x70118004) /* read */
#define REG_DEBUG_IDSP_SECTION_RESET_REAL FIO_ADDRESS(DEBUG_IDSP,0x7011801C) /* write */
#define REG_DEBUG_IDSP_ERROR_REAL FIO_ADDRESS(DEBUG_IDSP,0x70118020) /* read/write */
#define REG_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL FIO_ADDRESS(DEBUG_IDSP,0x70118024) /* read/write */
#define REG_DEBUG_IDSP_SECTION_COMMAND_START_REAL FIO_ADDRESS(DEBUG_IDSP,0x70118040) /* read */
#define REG_DEBUG_IDSP_SECTION_DEBUG1_REAL FIO_ADDRESS(DEBUG_IDSP,0x70118078) /* read */
#define REG_DEBUG_IDSP_SECTION_DEBUG2_REAL FIO_ADDRESS(DEBUG_IDSP,0x7011807C) /* read */
#define REG_DEBUG_IDSP_FILTER_REAL FIO_ADDRESS(DEBUG_IDSP,0x70110000) /* read/write */
#define REG_DEBUG_IDSP_SUSPEND_REG1_REAL FIO_ADDRESS(DEBUG_IDSP,0x70101c00) /* read/write */
#define REG_DEBUG_IDSP_SUSPEND_REG2_REAL FIO_ADDRESS(DEBUG_IDSP,0x70101c40) /* read/write */
/*----------------------------------------------------------------------------*/
/* bit group structures */
/*----------------------------------------------------------------------------*/
typedef union { /* DEBUG_IDSP_Address */
U32 all;
struct {
U32 filter_address_msb : 3;
U32 : 1;
U32 filter_number : 4;
U32 section_number : 3;
U32 : 21;
} bitc;
} GH_DEBUG_IDSP_ADDRESS_REAL_S;
typedef union { /* DEBUG_IDSP_Config */
U32 all;
struct {
U32 write_data : 1;
U32 second_half : 1;
U32 data : 6;
U32 section_id : 3;
U32 : 21;
} bitc;
} GH_DEBUG_IDSP_CONFIG_REAL_S;
typedef union { /* DEBUG_IDSP_Section_reset */
U32 all;
struct {
U32 reset : 7;
U32 : 25;
} bitc;
} GH_DEBUG_IDSP_SECTION_RESET_REAL_S;
typedef union { /* DEBUG_IDSP_error */
U32 all;
struct {
U32 : 1;
U32 reset : 7;
U32 : 24;
} bitc;
} GH_DEBUG_IDSP_ERROR_REAL_S;
typedef union { /* DEBUG_IDSP_clock_gating_disable */
U32 all;
struct {
U32 smem : 1;
U32 section : 7;
U32 smem_tile : 1;
U32 : 23;
} bitc;
} GH_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL_S;
typedef union { /* DEBUG_IDSP_Section_debug1 */
U32 all;
struct {
U32 config_fsm_state : 4;
U32 config_fsm_done : 1;
U32 pending_secondary_stores : 3;
U32 pending_primary_stores : 3;
U32 line_sync_needed : 1;
U32 line_sync_pending : 1;
U32 store_fsm_state : 3;
U32 store_fsm_top_state : 3;
U32 pending_loads : 2;
U32 load_fsm_state : 4;
U32 load_fsm_top_state : 3;
U32 main_fsm_state : 4;
} bitc;
} GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S;
typedef union { /* DEBUG_IDSP_Section_debug2 */
U32 all;
struct {
U32 store_count0 : 8;
U32 store_count1 : 8;
U32 store_count2 : 8;
U32 last_half : 1;
U32 last_word : 1;
U32 more : 1;
U32 filter : 4;
U32 section : 1;
} bitc;
} GH_DEBUG_IDSP_SECTION_DEBUG2_REAL_S;
/*----------------------------------------------------------------------------*/
/* mirror variables */
/*----------------------------------------------------------------------------*/
GH_DEBUG_IDSP_SECTION_RESET_S m_debug_idsp_section_reset;
/*----------------------------------------------------------------------------*/
/* register DEBUG_IDSP_Address (read/write) */
/*----------------------------------------------------------------------------*/
GH_INLINE void GH_DEBUG_IDSP_set_Address(U32 data)
{
GH_DEBUG_IDSP_ADDRESS_REAL_S real;
GH_DEBUG_IDSP_ADDRESS_S dummy;
dummy.all = data ;
real.bitc.filter_address_msb = dummy.bitc.filter_address_msb;
real.bitc.filter_number = dummy.bitc.filter_number;
real.bitc.section_number = dummy.bitc.section_number;
*(volatile U32 *)REG_DEBUG_IDSP_ADDRESS_REAL = real.all;
}
GH_INLINE U32 GH_DEBUG_IDSP_get_Address(void)
{
GH_DEBUG_IDSP_ADDRESS_REAL_S real;
GH_DEBUG_IDSP_ADDRESS_S dummy;
dummy.all = 0;
real.all = (*(volatile U32 *)REG_DEBUG_IDSP_ADDRESS_REAL);
dummy.bitc.filter_address_msb = real.bitc.filter_address_msb;
dummy.bitc.filter_number = real.bitc.filter_number;
dummy.bitc.section_number = real.bitc.section_number;
return dummy.all;
}
GH_INLINE void GH_DEBUG_IDSP_set_Address_filter_address_MSB(U8 data)
{
GH_DEBUG_IDSP_ADDRESS_REAL_S d;
d.all = *(volatile U32 *)REG_DEBUG_IDSP_ADDRESS_REAL;
d.bitc.filter_address_msb = data;
*(volatile U32 *)REG_DEBUG_IDSP_ADDRESS_REAL = d.all;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Address_filter_address_MSB(void)
{
GH_DEBUG_IDSP_ADDRESS_REAL_S tmp_value;
U32 value = (*(volatile U32 *)REG_DEBUG_IDSP_ADDRESS_REAL);
tmp_value.all = value;
return tmp_value.bitc.filter_address_msb;
}
GH_INLINE void GH_DEBUG_IDSP_set_Address_filter_number(U8 data)
{
GH_DEBUG_IDSP_ADDRESS_REAL_S d;
d.all = *(volatile U32 *)REG_DEBUG_IDSP_ADDRESS_REAL;
d.bitc.filter_number = data;
*(volatile U32 *)REG_DEBUG_IDSP_ADDRESS_REAL = d.all;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Address_filter_number(void)
{
GH_DEBUG_IDSP_ADDRESS_REAL_S tmp_value;
U32 value = (*(volatile U32 *)REG_DEBUG_IDSP_ADDRESS_REAL);
tmp_value.all = value;
return tmp_value.bitc.filter_number;
}
GH_INLINE void GH_DEBUG_IDSP_set_Address_section_number(U8 data)
{
GH_DEBUG_IDSP_ADDRESS_REAL_S d;
d.all = *(volatile U32 *)REG_DEBUG_IDSP_ADDRESS_REAL;
d.bitc.section_number = data;
*(volatile U32 *)REG_DEBUG_IDSP_ADDRESS_REAL = d.all;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Address_section_number(void)
{
GH_DEBUG_IDSP_ADDRESS_REAL_S tmp_value;
U32 value = (*(volatile U32 *)REG_DEBUG_IDSP_ADDRESS_REAL);
tmp_value.all = value;
return tmp_value.bitc.section_number;
}
/*----------------------------------------------------------------------------*/
/* register DEBUG_IDSP_Config (read) */
/*----------------------------------------------------------------------------*/
GH_INLINE U32 GH_DEBUG_IDSP_get_Config(void)
{
GH_DEBUG_IDSP_CONFIG_REAL_S real;
GH_DEBUG_IDSP_CONFIG_S dummy;
dummy.all = 0;
real.all = (*(volatile U32 *)REG_DEBUG_IDSP_CONFIG_REAL);
dummy.bitc.write_data = real.bitc.write_data;
dummy.bitc.second_half = real.bitc.second_half;
dummy.bitc.data = real.bitc.data;
dummy.bitc.section_id = real.bitc.section_id;
return dummy.all;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Config_write_data(void)
{
GH_DEBUG_IDSP_CONFIG_REAL_S tmp_value;
U32 value = (*(volatile U32 *)REG_DEBUG_IDSP_CONFIG_REAL);
tmp_value.all = value;
return tmp_value.bitc.write_data;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Config_second_half(void)
{
GH_DEBUG_IDSP_CONFIG_REAL_S tmp_value;
U32 value = (*(volatile U32 *)REG_DEBUG_IDSP_CONFIG_REAL);
tmp_value.all = value;
return tmp_value.bitc.second_half;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Config_data(void)
{
GH_DEBUG_IDSP_CONFIG_REAL_S tmp_value;
U32 value = (*(volatile U32 *)REG_DEBUG_IDSP_CONFIG_REAL);
tmp_value.all = value;
return tmp_value.bitc.data;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Config_section_ID(void)
{
GH_DEBUG_IDSP_CONFIG_REAL_S tmp_value;
U32 value = (*(volatile U32 *)REG_DEBUG_IDSP_CONFIG_REAL);
tmp_value.all = value;
return tmp_value.bitc.section_id;
}
/*----------------------------------------------------------------------------*/
/* register DEBUG_IDSP_Section_reset (write) */
/*----------------------------------------------------------------------------*/
GH_INLINE void GH_DEBUG_IDSP_set_Section_reset(U32 data)
{
m_debug_idsp_section_reset.all = data;
GH_DEBUG_IDSP_SECTION_RESET_REAL_S real;
GH_DEBUG_IDSP_SECTION_RESET_S dummy;
dummy.all = data ;
real.bitc.reset = dummy.bitc.reset;
*(volatile U32 *)REG_DEBUG_IDSP_SECTION_RESET_REAL = real.all;
}
GH_INLINE U32 GH_DEBUG_IDSP_getm_Section_reset(void)
{
#if GH_DEBUG_IDSP_ENABLE_DEBUG_PRINT
GH_DEBUG_IDSP_DEBUG_PRINT_FUNCTION( "[GH_DEBUG_IDSP_getm_Section_reset] --> 0x%08x\n",
m_debug_idsp_section_reset.all);
#endif
return m_debug_idsp_section_reset.all;
}
GH_INLINE void GH_DEBUG_IDSP_set_Section_reset_reset(U8 data)
{
m_debug_idsp_section_reset.bitc.reset = data;
GH_DEBUG_IDSP_SECTION_RESET_REAL_S real;
real.bitc.reset = m_debug_idsp_section_reset.bitc.reset;
*(volatile U32 *)REG_DEBUG_IDSP_SECTION_RESET_REAL = real.all;
}
GH_INLINE U8 GH_DEBUG_IDSP_getm_Section_reset_reset(void)
{
#if GH_DEBUG_IDSP_ENABLE_DEBUG_PRINT
GH_DEBUG_IDSP_DEBUG_PRINT_FUNCTION( "[GH_DEBUG_IDSP_getm_Section_reset_reset] --> 0x%08x\n",
m_debug_idsp_section_reset.bitc.reset);
#endif
return m_debug_idsp_section_reset.bitc.reset;
}
/*----------------------------------------------------------------------------*/
/* register DEBUG_IDSP_error (read/write) */
/*----------------------------------------------------------------------------*/
GH_INLINE void GH_DEBUG_IDSP_set_error(U32 data)
{
GH_DEBUG_IDSP_ERROR_REAL_S real;
GH_DEBUG_IDSP_ERROR_S dummy;
dummy.all = data ;
real.bitc.reset = dummy.bitc.reset;
*(volatile U32 *)REG_DEBUG_IDSP_ERROR_REAL = real.all;
}
GH_INLINE U32 GH_DEBUG_IDSP_get_error(void)
{
GH_DEBUG_IDSP_ERROR_REAL_S real;
GH_DEBUG_IDSP_ERROR_S dummy;
dummy.all = 0;
real.all = (*(volatile U32 *)REG_DEBUG_IDSP_ERROR_REAL);
dummy.bitc.reset = real.bitc.reset;
return dummy.all;
}
GH_INLINE void GH_DEBUG_IDSP_set_error_reset(U8 data)
{
GH_DEBUG_IDSP_ERROR_REAL_S d;
d.all = *(volatile U32 *)REG_DEBUG_IDSP_ERROR_REAL;
d.bitc.reset = data;
*(volatile U32 *)REG_DEBUG_IDSP_ERROR_REAL = d.all;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_error_reset(void)
{
GH_DEBUG_IDSP_ERROR_REAL_S tmp_value;
U32 value = (*(volatile U32 *)REG_DEBUG_IDSP_ERROR_REAL);
tmp_value.all = value;
return tmp_value.bitc.reset;
}
/*----------------------------------------------------------------------------*/
/* register DEBUG_IDSP_clock_gating_disable (read/write) */
/*----------------------------------------------------------------------------*/
GH_INLINE void GH_DEBUG_IDSP_set_clock_gating_disable(U32 data)
{
GH_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL_S real;
GH_DEBUG_IDSP_CLOCK_GATING_DISABLE_S dummy;
dummy.all = data ;
real.bitc.smem = dummy.bitc.smem;
real.bitc.section = dummy.bitc.section;
real.bitc.smem_tile = dummy.bitc.smem_tile;
*(volatile U32 *)REG_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL = real.all;
}
GH_INLINE U32 GH_DEBUG_IDSP_get_clock_gating_disable(void)
{
GH_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL_S real;
GH_DEBUG_IDSP_CLOCK_GATING_DISABLE_S dummy;
dummy.all = 0;
real.all = (*(volatile U32 *)REG_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL);
dummy.bitc.smem = real.bitc.smem;
dummy.bitc.section = real.bitc.section;
dummy.bitc.smem_tile = real.bitc.smem_tile;
return dummy.all;
}
GH_INLINE void GH_DEBUG_IDSP_set_clock_gating_disable_smem(U8 data)
{
GH_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL_S d;
d.all = *(volatile U32 *)REG_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL;
d.bitc.smem = data;
*(volatile U32 *)REG_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL = d.all;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_clock_gating_disable_smem(void)
{
GH_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL_S tmp_value;
U32 value = (*(volatile U32 *)REG_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL);
tmp_value.all = value;
return tmp_value.bitc.smem;
}
GH_INLINE void GH_DEBUG_IDSP_set_clock_gating_disable_section(U8 data)
{
GH_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL_S d;
d.all = *(volatile U32 *)REG_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL;
d.bitc.section = data;
*(volatile U32 *)REG_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL = d.all;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_clock_gating_disable_section(void)
{
GH_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL_S tmp_value;
U32 value = (*(volatile U32 *)REG_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL);
tmp_value.all = value;
return tmp_value.bitc.section;
}
GH_INLINE void GH_DEBUG_IDSP_set_clock_gating_disable_smem_tile(U8 data)
{
GH_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL_S d;
d.all = *(volatile U32 *)REG_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL;
d.bitc.smem_tile = data;
*(volatile U32 *)REG_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL = d.all;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_clock_gating_disable_smem_tile(void)
{
GH_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL_S tmp_value;
U32 value = (*(volatile U32 *)REG_DEBUG_IDSP_CLOCK_GATING_DISABLE_REAL);
tmp_value.all = value;
return tmp_value.bitc.smem_tile;
}
/*----------------------------------------------------------------------------*/
/* register DEBUG_IDSP_Section_command_start (read) */
/*----------------------------------------------------------------------------*/
GH_INLINE U32 GH_DEBUG_IDSP_get_Section_command_start(U8 index)
{
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_COMMAND_START_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
return value;
}
/*----------------------------------------------------------------------------*/
/* register DEBUG_IDSP_Section_debug1 (read) */
/*----------------------------------------------------------------------------*/
GH_INLINE U32 GH_DEBUG_IDSP_get_Section_debug1(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S real;
GH_DEBUG_IDSP_SECTION_DEBUG1_S dummy;
dummy.all = 0;
real.all = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
dummy.bitc.config_fsm_state = real.bitc.config_fsm_state;
dummy.bitc.config_fsm_done = real.bitc.config_fsm_done;
dummy.bitc.pending_secondary_stores = real.bitc.pending_secondary_stores;
dummy.bitc.pending_primary_stores = real.bitc.pending_primary_stores;
dummy.bitc.line_sync_needed = real.bitc.line_sync_needed;
dummy.bitc.line_sync_pending = real.bitc.line_sync_pending;
dummy.bitc.store_fsm_state = real.bitc.store_fsm_state;
dummy.bitc.store_fsm_top_state = real.bitc.store_fsm_top_state;
dummy.bitc.pending_loads = real.bitc.pending_loads;
dummy.bitc.load_fsm_state = real.bitc.load_fsm_state;
dummy.bitc.load_fsm_top_state = real.bitc.load_fsm_top_state;
dummy.bitc.main_fsm_state = real.bitc.main_fsm_state;
return dummy.all;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug1_config_FSM_state(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.config_fsm_state;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug1_config_FSM_done(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.config_fsm_done;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug1_pending_secondary_stores(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.pending_secondary_stores;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug1_pending_primary_stores(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.pending_primary_stores;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug1_line_sync_needed(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.line_sync_needed;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug1_line_sync_pending(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.line_sync_pending;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug1_store_FSM_state(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.store_fsm_state;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug1_store_FSM_top_state(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.store_fsm_top_state;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug1_pending_loads(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.pending_loads;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug1_load_FSM_state(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.load_fsm_state;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug1_load_FSM_top_state(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.load_fsm_top_state;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug1_main_FSM_state(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG1_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.main_fsm_state;
}
/*----------------------------------------------------------------------------*/
/* register DEBUG_IDSP_Section_debug2 (read) */
/*----------------------------------------------------------------------------*/
GH_INLINE U32 GH_DEBUG_IDSP_get_Section_debug2(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG2_REAL_S real;
GH_DEBUG_IDSP_SECTION_DEBUG2_S dummy;
dummy.all = 0;
real.all = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG2_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
dummy.bitc.store_count0 = real.bitc.store_count0;
dummy.bitc.store_count1 = real.bitc.store_count1;
dummy.bitc.store_count2 = real.bitc.store_count2;
dummy.bitc.last_half = real.bitc.last_half;
dummy.bitc.last_word = real.bitc.last_word;
dummy.bitc.more = real.bitc.more;
dummy.bitc.filter = real.bitc.filter;
dummy.bitc.section = real.bitc.section;
return dummy.all;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug2_store_count0(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG2_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG2_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.store_count0;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug2_store_count1(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG2_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG2_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.store_count1;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug2_store_count2(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG2_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG2_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.store_count2;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug2_last_half(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG2_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG2_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.last_half;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug2_last_word(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG2_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG2_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.last_word;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug2_more(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG2_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG2_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.more;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug2_filter(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG2_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG2_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.filter;
}
GH_INLINE U8 GH_DEBUG_IDSP_get_Section_debug2_section(U8 index)
{
GH_DEBUG_IDSP_SECTION_DEBUG2_REAL_S tmp_value;
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SECTION_DEBUG2_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000040)));
tmp_value.all = value;
return tmp_value.bitc.section;
}
/*----------------------------------------------------------------------------*/
/* register DEBUG_IDSP_Filter (read/write) */
/*----------------------------------------------------------------------------*/
GH_INLINE void GH_DEBUG_IDSP_set_Filter(U32 data)
{
*(volatile U32 *)REG_DEBUG_IDSP_FILTER_REAL = data;
}
GH_INLINE U32 GH_DEBUG_IDSP_get_Filter(void)
{
U32 value = (*(volatile U32 *)REG_DEBUG_IDSP_FILTER_REAL);
return value;
}
/*----------------------------------------------------------------------------*/
/* register DEBUG_IDSP_Suspend_reg1 (read/write) */
/*----------------------------------------------------------------------------*/
GH_INLINE void GH_DEBUG_IDSP_set_Suspend_reg1(U8 index, U32 data)
{
*(volatile U32 *)(REG_DEBUG_IDSP_SUSPEND_REG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000004)) = data;
}
GH_INLINE U32 GH_DEBUG_IDSP_get_Suspend_reg1(U8 index)
{
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SUSPEND_REG1_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000004)));
return value;
}
/*----------------------------------------------------------------------------*/
/* register DEBUG_IDSP_Suspend_reg2 (read/write) */
/*----------------------------------------------------------------------------*/
GH_INLINE void GH_DEBUG_IDSP_set_Suspend_reg2(U8 index, U32 data)
{
*(volatile U32 *)(REG_DEBUG_IDSP_SUSPEND_REG2_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000004)) = data;
}
GH_INLINE U32 GH_DEBUG_IDSP_get_Suspend_reg2(U8 index)
{
U32 value = (*(volatile U32 *)(REG_DEBUG_IDSP_SUSPEND_REG2_REAL + index * FIO_MOFFSET(DEBUG_IDSP,0x00000004)));
return value;
}
/*----------------------------------------------------------------------------*/
/* init function */
/*----------------------------------------------------------------------------*/
GH_INLINE void GH_DEBUG_IDSP_init(void)
{
int i;
GH_DEBUG_IDSP_set_Address((U32)0x00000000);
GH_DEBUG_IDSP_set_Section_reset((U32)0x00000000);
GH_DEBUG_IDSP_set_error((U32)0x00000000);
GH_DEBUG_IDSP_set_clock_gating_disable((U32)0x00000000);
GH_DEBUG_IDSP_set_Filter((U32)0x00000000);
for (i=0; i<16; i++)
{
GH_DEBUG_IDSP_set_Suspend_reg1(i, (U32)0x00000000);
}
for (i=0; i<16; i++)
{
GH_DEBUG_IDSP_set_Suspend_reg2(i, (U32)0x00000000);
}
/* read read-clear registers in order to set mirror variables */
}
/*----------------------------------------------------------------------------*/
/* end of file */
/*----------------------------------------------------------------------------*/
|