你好 问一下 有个问题没明白STK_C6657包 KeyStone_SRIO_Init_drv.c文件里 如下 程序执行完后Port(0)的Ingress Watermarks 0 1 2 3 Register都赋值了按我的理解 Port(0)只有一个 为啥要给四个寄存器赋值?而不是赋一次?
谢了!
for(i=0;i<SRIO_MAX_PORT_NUM;i++)
{
if(FALSE == srio_cfg->blockEn.bBLK5_8_Port_Datapath_EN[i])
continue;
/*maximum data nodes and tags are 72 (0x48).
Each data node stores 32 bytes of data*/
gpSRIO_regs->RIO_PBM[i].RIO_PBM_SP_IG_WATERMARK0 = (36<<CSL_SRIO_RIO_PBM_SP_IG_WATERMARK0_PRIO0_WM_SHIFT)
|(32<<CSL_SRIO_RIO_PBM_SP_IG_WATERMARK0_PRIO0CRF_WM_SHIFT);
gpSRIO_regs->RIO_PBM[i].RIO_PBM_SP_IG_WATERMARK1 = (28<<CSL_SRIO_RIO_PBM_SP_IG_WATERMARK1_PRIO1_WM_SHIFT)
|(24<<CSL_SRIO_RIO_PBM_SP_IG_WATERMARK1_PRIO1CRF_WM_SHIFT);
gpSRIO_regs->RIO_PBM[i].RIO_PBM_SP_IG_WATERMARK2 = (20<<CSL_SRIO_RIO_PBM_SP_IG_WATERMARK2_PRIO2_WM_SHIFT)
|(16<<CSL_SRIO_RIO_PBM_SP_IG_WATERMARK2_PRIO2CRF_WM_SHIFT);
gpSRIO_regs->RIO_PBM[i].RIO_PBM_SP_IG_WATERMARK3 = (12<<CSL_SRIO_RIO_PBM_SP_IG_WATERMARK3_PRIO3_WM_SHIFT)
|(8<<CSL_SRIO_RIO_PBM_SP_IG_WATERMARK3_PRIO3CRF_WM_SHIFT);
}
//PBM Port(n) Ingress Watermarks 0 Register (Address offset 0x1B6B0, 0x1B730,0x1B7B0, 0x1B830)
//PBM Port(n) Ingress Watermarks 1 Register (Address offset 0x1B6B4, 0x1B734,0x1B7B4, 0x1B834)
//PBM Port(n) Ingress Watermarks 2 Register (Address offset 0x1B6B8, 0x1B738,0x1B7B8, 0x1B838)
//PBM Port(n) Ingress Watermarks 3 Register (Address offset 0x1B6BC, 0x1B73C,0x1B7BC, 0x1B83C)
skysteed:
哦 看了 代表不同的优先级!
Shine:
回复 skysteed:
可以结合下面这篇文档看SRIO代码。0820.SRIO_Programming_Performance.pdf