顯示具有 SV 標籤的文章。 顯示所有文章
顯示具有 SV 標籤的文章。 顯示所有文章

2017年12月13日 星期三

【SV 學習筆記】multi-dimension associative array

DDR4 有不同的bank group, bank address, Model 以SV之associative array實作


parameter BG=4, BA=4;
logic [15:0] memory[BG][BA][int]; // BG, BA size const

foreach(memory[g, a]) // check array size
  $display(g,"  ", a, memory[g][a].size);