参考资料:xilinx AXI4 Stream Peripherals 源码

//************************************************************************

Verilog中函数使用方法这里不再赘述,只给出函数原型及其调用方式。

//************************************************************************

//function called clogb2 that returns an integer which has the
//value of the ceiling of the log base 2.
function integer clogb2 (input integer bit_depth);
begin
for(clogb2=0; bit_depth>0; clogb2=clogb2+1)
bit_depth = bit_depth>>1;
end
endfunction
//************************************************************************
 
localparam WIDTH_SRL = 32; 
localparam WIDTH_CNT = clogb2(WIDTH_SRL/8-1);
 
转载:http://www.eefocus.com/mastershifu2015/blog/16-08/389919_64de0.html

最新文章

  1. I18n问题 国际化
  2. ORA-12638:身份证明检索失败
  3. mysql修改数据库编码(数据库字符集)和表的字符编码的方法
  4. POJ3928Ping pong[树状数组 仿逆序对]
  5. 「转」xtrabackup新版详细说明
  6. Linux 修改IP地址
  7. Travis-CI与Latex构建开源中文PDF
  8. Node_JS
  9. 怒刷DP之 HDU 1176
  10. LINUX 运维命令
  11. Centos6.4 mysql安装与配置
  12. OpenStack Summit Paris 会议纪要 - 11-04-2014
  13. Spring 入门 AOP
  14. 引入工程报包导入异常:import javax.servlet.annotation.WebFilter;
  15. Python中的str与unicode处理方法
  16. [ExtJS5学习笔记]第三十四节 sencha extjs 5 grid表格之java后台导出excel
  17. 瞧一瞧!这儿实现了MongoDB的增量备份与还原(含部署代码)
  18. nvm use 指定版本后无效 win7
  19. Flask第三篇——安装Flask
  20. Apache OFBiz 添加样式

热门文章

  1. HDOJ 4903 The only survival
  2. 【二分答案】【Heap-Dijkstra】bzoj2709 [Violet 1]迷宫花园
  3. 【kruscal】【最小生成树】【并查集扩展】bzoj3714 [PA2014]Kuglarz
  4. scope的范围
  5. python之装饰器、生成器、内置函数、JSON
  6. maven-pom-properties
  7. Android之Activity 生命周期
  8. 学习Microsoft SQL Server 2008技术内幕:T-SQL语法基础--第4章
  9. SQL SERVER 常用命令
  10. 《你不知道的 CSS》之等比例缩放的盒子