hello:
the guider says:
The Queue N Register D is written to add a packet to the queue and read
to pop a packet off a queue.
if I want to push a descriptor to a queue, what shoul Ido?
I find the function define:
void push_queue(Uint16 qn, Uint8 mode, Uint32 c_val, Uint32 d_val)
{
#ifdef USE_VBUSM
if (mode == 2)
{
uint64_t *reg;
reg = (uint64_t *)(QM_QMAN_VBUSM_REGION + QM_REG_QUE_REG_C + (qn * 16));
#ifdef _BIG_ENDIAN
*reg = ((uint64_t)c_val << 32) | d_val;
#else
*reg = ((uint64_t)d_val << 32) | c_val;
#endif
}
else
{
Uint32 *reg;
reg = (Uint32 *)(QM_QMAN_VBUSM_REGION + QM_REG_QUE_REG_D + (qn * 16));
*reg = d_val;
}
#else
Uint32 *reg;
if (mode == 2)
{
reg = (Uint32 *)(QM_QMAN_REGION + QM_REG_QUE_REG_C + (qn * 16));
*reg = c_val;
}
reg = (Uint32 *)(QM_QMAN_REGION + QM_REG_QUE_REG_D + (qn * 16));
*reg = d_val;
#endif
}
It means that what I need to do is just give the address of descriptor to the Queue N Register D, is it right ?
But Queue N Register D bit 0-3 and bit 4-31 represent different meaning, if I give the address of descriptor to the Queue N Register D, the value of this register will be modified, so I am confused by this! Can anyone help me ?
Thanks!