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#ifndef IXQMGRAQMIF_P_H
65#define IXQMGRAQMIF_P_H
66
67#include "IxOsalTypes.h"
68
69
70
71
72
73#ifdef IX_OSAL_INLINE_ALL
74
75
76#define IX_QMGR_AQMIF_INLINE IX_OSAL_INLINE_EXTERN
77#else
78#ifdef IXQMGRAQMIF_C
79#ifndef IX_QMGR_AQMIF_INLINE
80#define IX_QMGR_AQMIF_INLINE
81#endif
82#else
83#ifndef IX_QMGR_AQMIF_INLINE
84#define IX_QMGR_AQMIF_INLINE IX_OSAL_INLINE_EXTERN
85#endif
86#endif
87#endif
88
89
90
91
92
93#include "IxQMgr.h"
94#include "IxQMgrLog_p.h"
95#include "IxQMgrQCfg_p.h"
96
97
98
99
100
101
102
103
104#define IX_QMGR_AQMIF_SAVED_COMPONENT_NAME IX_COMPONENT_NAME
105#undef IX_COMPONENT_NAME
106#define IX_COMPONENT_NAME ix_qmgr
107#include "IxOsal.h"
108
109
110
111
112
113
114#define IX_QMGR_NUM_BYTES_PER_WORD 4
115
116
117#define IX_QMGR_UNDERFLOW_BIT_OFFSET 0x0
118
119
120#define IX_QMGR_OVERFLOW_BIT_OFFSET 0x1
121
122
123#define IX_QMGR_QUEACC0_OFFSET 0x0000
124
125
126#define IX_QMGR_QUEACC_SIZE 0x4
127
128
129#define IX_QMGR_QUELOWSTAT0_OFFSET (IX_QMGR_QUEACC0_OFFSET +\
130(IX_QMGR_MAX_NUM_QUEUES * IX_QMGR_QUEACC_SIZE * IX_QMGR_NUM_BYTES_PER_WORD))
131
132
133#define IX_QMGR_QUELOWSTAT1_OFFSET (IX_QMGR_QUELOWSTAT0_OFFSET +\
134 IX_QMGR_NUM_BYTES_PER_WORD)
135
136
137#define IX_QMGR_QUELOWSTAT2_OFFSET (IX_QMGR_QUELOWSTAT1_OFFSET +\
138 IX_QMGR_NUM_BYTES_PER_WORD)
139
140
141#define IX_QMGR_QUELOWSTAT3_OFFSET (IX_QMGR_QUELOWSTAT2_OFFSET +\
142 IX_QMGR_NUM_BYTES_PER_WORD)
143
144
145#define IX_QMGR_QUELOWSTAT_QUE_STS_BITS_MASK 0xF
146
147
148#define IX_QMGR_QUELOWSTAT_SIZE 0x4
149
150
151#define IX_QMGR_QUELOWSTAT_NUM_QUE_PER_WORD 0x8
152
153
154#define IX_QMGR_QUEUOSTAT0_OFFSET (IX_QMGR_QUELOWSTAT3_OFFSET +\
155 IX_QMGR_NUM_BYTES_PER_WORD)
156
157#define IX_QMGR_QUEUOSTAT1_OFFSET (IX_QMGR_QUEUOSTAT0_OFFSET +\
158 IX_QMGR_NUM_BYTES_PER_WORD)
159
160
161#define IX_QMGR_QUEUOSTAT_NUM_QUE_PER_WORD 0x10
162
163
164#define IX_QMGR_QUEUPPSTAT0_OFFSET (IX_QMGR_QUEUOSTAT1_OFFSET +\
165 IX_QMGR_NUM_BYTES_PER_WORD)
166
167
168#define IX_QMGR_QUEUPPSTAT1_OFFSET (IX_QMGR_QUEUPPSTAT0_OFFSET +\
169 IX_QMGR_NUM_BYTES_PER_WORD)
170
171
172#define IX_QMGR_QUEUPPSTAT_SIZE 0x2
173
174
175#define IX_QMGR_QUEUPPSTAT_NUM_QUE_PER_WORD 0x20
176
177
178#define IX_QMGR_INT0SRCSELREG0_OFFSET (IX_QMGR_QUEUPPSTAT1_OFFSET +\
179 IX_QMGR_NUM_BYTES_PER_WORD)
180
181
182#define IX_QMGR_INT0SRCSELREG1_OFFSET (IX_QMGR_INT0SRCSELREG0_OFFSET+\
183 IX_QMGR_NUM_BYTES_PER_WORD)
184
185
186#define IX_QMGR_INT0SRCSELREG2_OFFSET (IX_QMGR_INT0SRCSELREG1_OFFSET+\
187 IX_QMGR_NUM_BYTES_PER_WORD)
188
189
190#define IX_QMGR_INT0SRCSELREG3_OFFSET (IX_QMGR_INT0SRCSELREG2_OFFSET+\
191 IX_QMGR_NUM_BYTES_PER_WORD)
192
193
194#define IX_QMGR_INT0SRCSELREG_SIZE 0x4
195
196
197#define IX_QMGR_INTSRC_NUM_QUE_PER_WORD 0x8
198
199
200#define IX_QMGR_QUEIEREG0_OFFSET (IX_QMGR_INT0SRCSELREG3_OFFSET +\
201 IX_QMGR_NUM_BYTES_PER_WORD)
202
203
204#define IX_QMGR_QUEIEREG1_OFFSET (IX_QMGR_QUEIEREG0_OFFSET +\
205 IX_QMGR_NUM_BYTES_PER_WORD)
206
207
208#define IX_QMGR_QINTREG0_OFFSET (IX_QMGR_QUEIEREG1_OFFSET +\
209 IX_QMGR_NUM_BYTES_PER_WORD)
210
211
212#define IX_QMGR_QINTREG1_OFFSET (IX_QMGR_QINTREG0_OFFSET +\
213 IX_QMGR_NUM_BYTES_PER_WORD)
214
215
216#define IX_QMGR_QINTREG_SIZE 0x2
217
218
219#define IX_QMGR_QINTREG_NUM_QUE_PER_WORD 0x20
220
221
222#define IX_QMGR_QINTREG_BITS_PER_QUEUE 0x1
223#define IX_QMGR_QINTREG_BIT_OFFSET 0x1
224
225
226#define IX_QMGR_AQM_UNUSED_ADDRESS_SPACE_SIZE_IN_BYTES 0x1bC0
227
228
229#define IX_QMGR_QUECONFIG_BASE_OFFSET (IX_QMGR_QINTREG1_OFFSET +\
230 IX_QMGR_NUM_BYTES_PER_WORD +\
231 IX_QMGR_AQM_UNUSED_ADDRESS_SPACE_SIZE_IN_BYTES)
232
233
234#define IX_QMGR_QUECONFIG_SIZE 0x100
235
236
237#define IX_QMGR_QUEBUFFER_SPACE_OFFSET (IX_QMGR_QUECONFIG_BASE_OFFSET +\
238 IX_QMGR_MAX_NUM_QUEUES * IX_QMGR_NUM_BYTES_PER_WORD)
239
240
241#define BITS_PER_WORD 32
242
243
244#define IX_QMGR_QUE_BUFFER_SPACE_SIZE 0x1F00
245
246
247
248
249
250#define IX_QMGR_Q_ACCESS_ADDR_GET(qId)\
251 (((qId) * (IX_QMGR_QUEACC_SIZE * IX_QMGR_NUM_BYTES_PER_WORD))\
252 + IX_QMGR_QUEACC0_OFFSET)
253
254
255
256
257
258#define IX_QMGR_INT0SRCSELREG0_BIT3 3
259
260
261
262
263
264extern UINT32 aqmBaseAddress;
265
266
267
268
269void
270ixQMgrAqmIfInit (void);
271
272void
273ixQMgrAqmIfUninit (void);
274
275unsigned
276ixQMgrAqmIfLog2 (unsigned number);
277
278void
279ixQMgrAqmIfQRegisterBitsWrite (IxQMgrQId qId,
280 UINT32 registerBaseAddrOffset,
281 unsigned queuesPerRegWord,
282 UINT32 value);
283
284void
285ixQMgrAqmIfQStatusCheckValsCalc (IxQMgrQId qId,
286 IxQMgrSourceId srcSel,
287 unsigned int *statusWordOffset,
288 UINT32 *checkValue,
289 UINT32 *mask);
290
291
292
293
294
295
296
297void
298ixQMgrAqmIfBaseAddressSet (UINT32 address);
299
300
301
302
303void
304ixQMgrAqmIfBaseAddressGet (UINT32 *address);
305
306
307
308
309void
310ixQMgrAqmIfSramBaseAddressGet (UINT32 *address);
311
312
313
314
315void
316ixQMgrAqmIfQueStatRead (IxQMgrQId qId,
317 IxQMgrQStatus* status);
318
319
320
321
322
323void ixQMgrAqmIfIntSrcSelReg0Bit3Set (void);
324
325
326
327
328
329void
330ixQMgrAqmIfIntSrcSelWrite (IxQMgrQId qId,
331 IxQMgrSourceId sourceId);
332
333
334
335
336void
337ixQMgrAqmIfQInterruptEnable (IxQMgrQId qId);
338
339
340
341
342void
343ixQMgrAqmIfQInterruptDisable (IxQMgrQId qId);
344
345
346
347
348void
349ixQMgrAqmIfQueCfgWrite (IxQMgrQId qId,
350 IxQMgrQSizeInWords qSizeInWords,
351 IxQMgrQEntrySizeInWords entrySizeInWords,
352 UINT32 freeSRAMAddress);
353
354
355
356
357void
358ixQMgrAqmIfQueCfgRead (IxQMgrQId qId,
359 unsigned int numEntries,
360 UINT32 *baseAddress,
361 unsigned int *ne,
362 unsigned int *nf,
363 UINT32 *readPtr,
364 UINT32 *writePtr);
365
366
367
368
369void
370ixQMgrAqmIfWatermarkSet (IxQMgrQId qId,
371 unsigned ne,
372 unsigned nf);
373
374
375IX_STATUS
376ixQMgrAqmIfQPeek (IxQMgrQId qId,
377 unsigned int entryIndex,
378 unsigned int *entry);
379
380
381IX_STATUS
382ixQMgrAqmIfQPoke (IxQMgrQId qId,
383 unsigned int entryIndex,
384 unsigned int *entry);
385
386
387
388
389
390IX_QMGR_AQMIF_INLINE void
391ixQMgrAqmIfWordWrite (VUINT32 *address,
392 UINT32 word);
393
394IX_QMGR_AQMIF_INLINE void
395ixQMgrAqmIfWordRead (VUINT32 *address,
396 UINT32 *word);
397
398IX_QMGR_AQMIF_INLINE void
399ixQMgrAqmIfQPop (IxQMgrQId qId,
400 IxQMgrQEntrySizeInWords numWords,
401 UINT32 *entry);
402
403IX_QMGR_AQMIF_INLINE void
404ixQMgrAqmIfQPush (IxQMgrQId qId,
405 IxQMgrQEntrySizeInWords numWords,
406 UINT32 *entry);
407
408IX_QMGR_AQMIF_INLINE void
409ixQMgrAqmIfQStatusRegsRead (IxQMgrDispatchGroup group,
410 UINT32 *qStatusWords);
411
412IX_QMGR_AQMIF_INLINE BOOL
413ixQMgrAqmIfQStatusCheck (UINT32 *oldQStatusWords,
414 UINT32 *newQStatusWords,
415 unsigned int statusWordOffset,
416 UINT32 checkValue,
417 UINT32 mask);
418
419IX_QMGR_AQMIF_INLINE BOOL
420ixQMgrAqmIfRegisterBitCheck (IxQMgrQId qId,
421 UINT32 registerBaseAddrOffset,
422 unsigned queuesPerRegWord,
423 unsigned relativeBitOffset,
424 BOOL reset);
425
426IX_QMGR_AQMIF_INLINE BOOL
427ixQMgrAqmIfUnderflowCheck (IxQMgrQId qId);
428
429IX_QMGR_AQMIF_INLINE BOOL
430ixQMgrAqmIfOverflowCheck (IxQMgrQId qId);
431
432IX_QMGR_AQMIF_INLINE UINT32
433ixQMgrAqmIfQRegisterBitsRead (IxQMgrQId qId,
434 UINT32 registerBaseAddrOffset,
435 unsigned queuesPerRegWord);
436IX_QMGR_AQMIF_INLINE void
437ixQMgrAqmIfQInterruptRegWrite (IxQMgrDispatchGroup group,
438 UINT32 reg);
439IX_QMGR_AQMIF_INLINE void
440ixQMgrAqmIfQInterruptRegRead (IxQMgrDispatchGroup group,
441 UINT32 *regVal);
442
443IX_QMGR_AQMIF_INLINE void
444ixQMgrAqmIfQueLowStatRead (IxQMgrQId qId,
445 IxQMgrQStatus *status);
446
447IX_QMGR_AQMIF_INLINE void
448ixQMgrAqmIfQueUppStatRead (IxQMgrQId qId,
449 IxQMgrQStatus *status);
450
451IX_QMGR_AQMIF_INLINE void
452ixQMgrAqmIfQueStatRead (IxQMgrQId qId,
453 IxQMgrQStatus *qStatus);
454
455IX_QMGR_AQMIF_INLINE unsigned
456ixQMgrAqmIfPow2NumDivide (unsigned numerator,
457 unsigned denominator);
458
459IX_QMGR_AQMIF_INLINE void
460ixQMgrAqmIfQInterruptEnableRegRead (IxQMgrDispatchGroup group,
461 UINT32 *regVal);
462
463
464
465
466
467
468
469
470IX_QMGR_AQMIF_INLINE void
471ixQMgrAqmIfWordWrite (VUINT32 *address,
472 UINT32 word)
473{
474 IX_OSAL_WRITE_LONG(address, word);
475}
476
477
478
479
480
481IX_QMGR_AQMIF_INLINE void
482ixQMgrAqmIfWordRead (VUINT32 *address,
483 UINT32 *word)
484{
485 *word = IX_OSAL_READ_LONG(address);
486}
487
488
489
490
491
492
493IX_QMGR_AQMIF_INLINE void
494ixQMgrAqmIfQPop (IxQMgrQId qId,
495 IxQMgrQEntrySizeInWords numWords,
496 UINT32 *entry)
497{
498 volatile UINT32 *accRegAddr;
499
500 accRegAddr = (UINT32*)(aqmBaseAddress +
501 IX_QMGR_Q_ACCESS_ADDR_GET(qId));
502
503 switch (numWords)
504 {
505 case IX_QMGR_Q_ENTRY_SIZE1:
506 ixQMgrAqmIfWordRead (accRegAddr, entry);
507 break;
508 case IX_QMGR_Q_ENTRY_SIZE2:
509 ixQMgrAqmIfWordRead (accRegAddr++, entry++);
510 ixQMgrAqmIfWordRead (accRegAddr, entry);
511 break;
512 case IX_QMGR_Q_ENTRY_SIZE4:
513 ixQMgrAqmIfWordRead (accRegAddr++, entry++);
514 ixQMgrAqmIfWordRead (accRegAddr++, entry++);
515 ixQMgrAqmIfWordRead (accRegAddr++, entry++);
516 ixQMgrAqmIfWordRead (accRegAddr, entry);
517 break;
518 default:
519 IX_QMGR_LOG_ERROR0("Invalid Q Entry size passed to ixQMgrAqmIfQPop");
520 break;
521 }
522}
523
524
525
526
527
528IX_QMGR_AQMIF_INLINE void
529ixQMgrAqmIfQPush (IxQMgrQId qId,
530 IxQMgrQEntrySizeInWords numWords,
531 UINT32 *entry)
532{
533 volatile UINT32 *accRegAddr;
534
535 accRegAddr = (UINT32*)(aqmBaseAddress +
536 IX_QMGR_Q_ACCESS_ADDR_GET(qId));
537
538 switch (numWords)
539 {
540 case IX_QMGR_Q_ENTRY_SIZE1:
541 ixQMgrAqmIfWordWrite (accRegAddr, *entry);
542 break;
543 case IX_QMGR_Q_ENTRY_SIZE2:
544 ixQMgrAqmIfWordWrite (accRegAddr++, *entry++);
545 ixQMgrAqmIfWordWrite (accRegAddr, *entry);
546 break;
547 case IX_QMGR_Q_ENTRY_SIZE4:
548 ixQMgrAqmIfWordWrite (accRegAddr++, *entry++);
549 ixQMgrAqmIfWordWrite (accRegAddr++, *entry++);
550 ixQMgrAqmIfWordWrite (accRegAddr++, *entry++);
551 ixQMgrAqmIfWordWrite (accRegAddr, *entry);
552 break;
553 default:
554 IX_QMGR_LOG_ERROR0("Invalid Q Entry size passed to ixQMgrAqmIfQPush");
555 break;
556 }
557}
558
559
560
561
562
563
564IX_QMGR_AQMIF_INLINE void
565ixQMgrAqmIfQStatusRegsRead (IxQMgrDispatchGroup group,
566 UINT32 *qStatusWords)
567{
568 volatile UINT32 *regAddress = NULL;
569
570 if (group == IX_QMGR_QUELOW_GROUP)
571 {
572 regAddress = (UINT32*)(aqmBaseAddress +
573 IX_QMGR_QUELOWSTAT0_OFFSET);
574
575 ixQMgrAqmIfWordRead (regAddress++, qStatusWords++);
576 ixQMgrAqmIfWordRead (regAddress++, qStatusWords++);
577 ixQMgrAqmIfWordRead (regAddress++, qStatusWords++);
578 ixQMgrAqmIfWordRead (regAddress, qStatusWords);
579 }
580 else
581 {
582
583
584
585
586 regAddress = (UINT32*)(aqmBaseAddress +
587 IX_QMGR_QUEUPPSTAT0_OFFSET);
588 ixQMgrAqmIfWordRead (regAddress, qStatusWords);
589 }
590}
591
592
593
594
595
596
597
598IX_QMGR_AQMIF_INLINE BOOL
599ixQMgrAqmIfQStatusCheck (UINT32 *oldQStatusWords,
600 UINT32 *newQStatusWords,
601 unsigned int statusWordOffset,
602 UINT32 checkValue,
603 UINT32 mask)
604{
605 if (((oldQStatusWords[statusWordOffset] & mask) !=
606 (newQStatusWords[statusWordOffset] & mask)) &&
607 ((newQStatusWords[statusWordOffset] & mask) == checkValue))
608 {
609 return TRUE;
610 }
611
612 return FALSE;
613}
614
615
616
617
618
619
620IX_QMGR_AQMIF_INLINE void
621ixQMgrAqmIfQInterruptRegRead (IxQMgrDispatchGroup group,
622 UINT32 *regVal)
623{
624 volatile UINT32 *regAddress;
625
626 if (group == IX_QMGR_QUELOW_GROUP)
627 {
628 regAddress = (UINT32*)(aqmBaseAddress +
629 IX_QMGR_QINTREG0_OFFSET);
630 }
631 else
632 {
633 regAddress = (UINT32*)(aqmBaseAddress +
634 IX_QMGR_QINTREG1_OFFSET);
635 }
636
637 ixQMgrAqmIfWordRead (regAddress, regVal);
638}
639
640
641
642
643
644
645IX_QMGR_AQMIF_INLINE void
646ixQMgrAqmIfQInterruptEnableRegRead (IxQMgrDispatchGroup group,
647 UINT32 *regVal)
648{
649 volatile UINT32 *regAddress;
650
651 if (group == IX_QMGR_QUELOW_GROUP)
652 {
653 regAddress = (UINT32*)(aqmBaseAddress +
654 IX_QMGR_QUEIEREG0_OFFSET);
655 }
656 else
657 {
658 regAddress = (UINT32*)(aqmBaseAddress +
659 IX_QMGR_QUEIEREG1_OFFSET);
660 }
661
662 ixQMgrAqmIfWordRead (regAddress, regVal);
663}
664
665
666
667
668
669
670IX_QMGR_AQMIF_INLINE BOOL
671ixQMgrAqmIfRegisterBitCheck (IxQMgrQId qId,
672 UINT32 registerBaseAddrOffset,
673 unsigned queuesPerRegWord,
674 unsigned relativeBitOffset,
675 BOOL reset)
676{
677 UINT32 actualBitOffset;
678 volatile UINT32 *registerAddress;
679 UINT32 registerWord;
680
681
682
683
684
685 registerAddress = (UINT32*)(aqmBaseAddress +
686 registerBaseAddrOffset +
687 ((qId / queuesPerRegWord) *
688 IX_QMGR_NUM_BYTES_PER_WORD));
689
690
691
692
693 ixQMgrAqmIfWordRead (registerAddress, ®isterWord);
694
695
696
697
698
699 actualBitOffset = (relativeBitOffset + 1) <<
700 ((qId & (queuesPerRegWord - 1)) * (BITS_PER_WORD / queuesPerRegWord));
701
702
703 if (registerWord & actualBitOffset)
704 {
705
706 if (reset)
707 {
708 ixQMgrAqmIfWordWrite (registerAddress, registerWord & (~actualBitOffset));
709 }
710 return TRUE;
711 }
712
713
714 return FALSE;
715}
716
717
718
719
720
721
722
723
724
725
726
727IX_QMGR_AQMIF_INLINE BOOL
728ixQMgrAqmIfUnderflowCheck (IxQMgrQId qId)
729{
730 if (qId < IX_QMGR_MIN_QUEUPP_QID)
731 {
732 return (ixQMgrAqmIfRegisterBitCheck (qId,
733 IX_QMGR_QUEUOSTAT0_OFFSET,
734 IX_QMGR_QUEUOSTAT_NUM_QUE_PER_WORD,
735 IX_QMGR_UNDERFLOW_BIT_OFFSET,
736 TRUE));
737 }
738 else
739 {
740
741 return FALSE;
742 }
743}
744
745
746
747
748
749IX_QMGR_AQMIF_INLINE BOOL
750ixQMgrAqmIfOverflowCheck (IxQMgrQId qId)
751{
752 if (qId < IX_QMGR_MIN_QUEUPP_QID)
753 {
754 return (ixQMgrAqmIfRegisterBitCheck (qId,
755 IX_QMGR_QUEUOSTAT0_OFFSET,
756 IX_QMGR_QUEUOSTAT_NUM_QUE_PER_WORD,
757 IX_QMGR_OVERFLOW_BIT_OFFSET,
758 TRUE));
759 }
760 else
761 {
762
763 return FALSE;
764 }
765}
766
767
768
769
770
771IX_QMGR_AQMIF_INLINE UINT32
772ixQMgrAqmIfQRegisterBitsRead (IxQMgrQId qId,
773 UINT32 registerBaseAddrOffset,
774 unsigned queuesPerRegWord)
775{
776 volatile UINT32 *registerAddress;
777 UINT32 registerWord;
778 UINT32 statusBitsMask;
779 UINT32 bitsPerQueue;
780
781 bitsPerQueue = BITS_PER_WORD / queuesPerRegWord;
782
783
784
785
786
787 registerAddress = (UINT32*)(aqmBaseAddress +
788 registerBaseAddrOffset +
789 ((qId / queuesPerRegWord) *
790 IX_QMGR_NUM_BYTES_PER_WORD));
791
792
793
794 ixQMgrAqmIfWordRead (registerAddress, ®isterWord);
795
796
797
798
799
800 statusBitsMask = ((1 << bitsPerQueue) - 1);
801
802
803
804
805 registerWord >>= ((qId & (queuesPerRegWord - 1)) * bitsPerQueue);
806
807
808
809
810 return (registerWord &= statusBitsMask);
811}
812
813
814
815
816
817IX_QMGR_AQMIF_INLINE void
818ixQMgrAqmIfQInterruptRegWrite (IxQMgrDispatchGroup group,
819 UINT32 reg)
820{
821 volatile UINT32 *address;
822
823 if (group == IX_QMGR_QUELOW_GROUP)
824 {
825 address = (UINT32*)(aqmBaseAddress +
826 IX_QMGR_QINTREG0_OFFSET);
827 }
828 else
829 {
830 address = (UINT32*)(aqmBaseAddress +
831 IX_QMGR_QINTREG1_OFFSET);
832 }
833
834 ixQMgrAqmIfWordWrite (address, reg);
835}
836
837
838
839
840
841
842
843IX_QMGR_AQMIF_INLINE void
844ixQMgrAqmIfQueLowStatRead (IxQMgrQId qId,
845 IxQMgrQStatus *status)
846{
847
848 *status = ixQMgrAqmIfQRegisterBitsRead (qId,
849 IX_QMGR_QUELOWSTAT0_OFFSET,
850 IX_QMGR_QUELOWSTAT_NUM_QUE_PER_WORD);
851}
852
853
854
855
856
857IX_QMGR_AQMIF_INLINE void
858ixQMgrAqmIfQueUppStatRead (IxQMgrQId qId,
859 IxQMgrQStatus *status)
860{
861
862 *status = 0;
863
864
865
866
867
868
869 if (ixQMgrAqmIfRegisterBitCheck ((qId - IX_QMGR_MIN_QUEUPP_QID),
870 IX_QMGR_QUEUPPSTAT0_OFFSET,
871 IX_QMGR_QUEUPPSTAT_NUM_QUE_PER_WORD,
872 0,
873 FALSE))
874 {
875 *status |= IX_QMGR_Q_STATUS_NE_BIT_MASK;
876 }
877
878
879
880
881
882
883 if (ixQMgrAqmIfRegisterBitCheck ((qId - IX_QMGR_MIN_QUEUPP_QID),
884 IX_QMGR_QUEUPPSTAT1_OFFSET,
885 IX_QMGR_QUEUPPSTAT_NUM_QUE_PER_WORD,
886 0,
887 FALSE))
888 {
889 *status |= IX_QMGR_Q_STATUS_F_BIT_MASK;
890 }
891}
892
893
894
895
896
897IX_QMGR_AQMIF_INLINE void
898ixQMgrAqmIfQueStatRead (IxQMgrQId qId,
899 IxQMgrQStatus *qStatus)
900{
901 if (qId < IX_QMGR_MIN_QUEUPP_QID)
902 {
903 ixQMgrAqmIfQueLowStatRead (qId, qStatus);
904 }
905 else
906 {
907 ixQMgrAqmIfQueUppStatRead (qId, qStatus);
908 }
909}
910
911
912
913
914
915IX_QMGR_AQMIF_INLINE unsigned
916ixQMgrAqmIfPow2NumDivide (unsigned numerator,
917 unsigned denominator)
918{
919
920 return (numerator >> ixQMgrAqmIfLog2 (denominator));
921}
922
923
924#undef IX_COMPONENT_NAME
925#define IX_COMPONENT_NAME IX_QMGR_AQMIF_SAVED_COMPONENT_NAME
926
927#endif
928