[信息与通信]EDA软件应用与开发

上传人:油条 文档编号:46131663 上传时间:2018-06-22 格式:PDF 页数:50 大小:436.84KB
返回 下载 相关 举报
[信息与通信]EDA软件应用与开发_第1页
第1页 / 共50页
[信息与通信]EDA软件应用与开发_第2页
第2页 / 共50页
[信息与通信]EDA软件应用与开发_第3页
第3页 / 共50页
[信息与通信]EDA软件应用与开发_第4页
第4页 / 共50页
[信息与通信]EDA软件应用与开发_第5页
第5页 / 共50页
点击查看更多>>
资源描述

《[信息与通信]EDA软件应用与开发》由会员分享,可在线阅读,更多相关《[信息与通信]EDA软件应用与开发(50页珍藏版)》请在金锄头文库上搜索。

1、韩曙韩曙hanshuhanshu mprcmprc. .pkupku. .eduedu. .cncnEDA软件应用与开发北京大学微处理器研究开发中心EDA软件应用与开发北京大学微处理器研究开发中心 Microprocessor Research and Development CenterE D A 软 件 应 用 与 开 发软 件 应 用 与 开 发2第三章第三章第三章第三章深入理解深入理解VHDLE D A 软 件 应 用 与 开 发软 件 应 用 与 开 发3内容提要:内容提要:3.1 深入理解行为级描述深入理解行为级描述3.2 深入理解结构级描述深入理解结构级描述3.3 VHDL的可综

2、合描述的可综合描述3.4 编码规范与设计重用编码规范与设计重用3.5 总结总结E D A 软 件 应 用 与 开 发软 件 应 用 与 开 发4参考资料:参考资料:?Michael Keating and Pierre Bricaud, Reuse Methodology Manual Reuse Methodology Manual For System-On-A-Chip Design ,For System-On-A-Chip Design , Kluwer Academic Publishers , 1998E D A 软 件 应 用 与 开 发软 件 应 用 与 开 发5Table

3、of ContentsE D A 软 件 应 用 与 开 发软 件 应 用 与 开 发63.4 编码规范与设计重用编码规范与设计重用3.4.1 基本原则 3.4.2 基本编码实践 3.4.3 可移植编码 3.4.4 时钟与复位信号 3.4.5 可综合编码 3.4.6 面向综合的系统划分 3.4.7 存储器设计E D A 软 件 应 用 与 开 发软 件 应 用 与 开 发73.4.1 基本原则基本原则-Simple and Regular?Use simple constructs, basic types (for VHDL), and simple clocking schemes ?Be

4、 consistent in coding style, naming, and style for processes and state machines ?Use a regular partitioning method with module outputs registered and modules of about the same size ?Use comments, meaningful names and constants and parameters instead of numbersE D A 软 件 应 用 与 开 发软 件 应 用 与 开 发83.4.2.1

5、 基本编码实践基本编码实践-命名规则命名规则?Rule - Develop a naming convention for the design?Use lowercase letters for signal names, variable names, and port names ?Use uppercase letters for constants and user-defined types ?In hierarchy design keep the top module or sub top modules entity name same as its file name. ?

6、Use meaningful names ?Keep parameter names short, but descriptiveE D A 软 件 应 用 与 开 发软 件 应 用 与 开 发93.4.2.1 基本编码实践基本编码实践-命名规则命名规则?Use clk for the clock signal. If multiple clocks, use clk as the prefix for all clock signals.?Use the same name for all clock signals driven by same source?For active low

7、signal, end with underscore _n for standardization?Use rst for reset signals - if active low, use rst_nE D A 软 件 应 用 与 开 发软 件 应 用 与 开 发103.4.2.1 基本编码实践基本编码实践-命名规则命名规则?For buses, use consistent bit ordering; recommend (y downto x) (VHDL) and (x:0) (Verilog) entity DW_addinc is generic (WIDTH : natura

8、l); port ( A,B : in std_logic_vector(WIDTH-1 downto 0); CI : in std_logic; SUM : out std_logic_vector(WIDTH-1 downto 0); CO : out std_logic ); end DW01_addinc; ?Use same name for connected ports and signals a= a ; a= a_int ?Naming convention for VITAL support is different from the normal convention.

9、 do not use underscore char(_) in the entity port declaration forthe top-level entity of a hard macro, etc.E D A 软 件 应 用 与 开 发软 件 应 用 与 开 发113.4.2.1 基本编码实践基本编码实践-信号命名信号命名命名方式说明举例命名方式说明举例*_routput for a register count_r*_aasynchronous signal addr_strob_a*_pnsignal used in the nth phase enable_p2*_nxt

10、data before being registered into a register with the same name ast_nxt*_ztristate internal signal sout_zE D A 软 件 应 用 与 开 发软 件 应 用 与 开 发123.4.2.2 基本编码实践基本编码实践-结构命名结构命名结构类型举例结构类型举例综合模型综合模型 ARCHITECTURE rtl OF my_syn_model ISORARCHITECTURE str OF my_syn_model IS模拟模型模拟模型 ARCHITECTURE sim OF my_syn_mod

11、el ISORARCHITECTURE tb OF my_syn_model ISE D A 软 件 应 用 与 开 发软 件 应 用 与 开 发133.4.2.3 基本编码实践基本编码实践-文件头文件头?Rule Include a Header at the top of every source file, including scripts which contain: ?COPYRIGHT ?Filename ?Author ?Description ?Date the file was created ?Modification HistoryE D A 软 件 应 用 与 开 发

12、软 件 应 用 与 开 发143.4.2.3 ExampleE D A 软 件 应 用 与 开 发软 件 应 用 与 开 发153.4.2.4 基本编码实践基本编码实践-注释注释?Use comment to all process, function and declarations of types and subtypes?Use comment to explain ports, signals, and variables, or groups of signals or variables?Use a separate line for each HDL statementE D

13、A 软 件 应 用 与 开 发软 件 应 用 与 开 发163.4.2.5 基本编码实践基本编码实践-行宽与缩进行宽与缩进? Keep the line length to 72 chars or less? Use Indentation to improve the readability?Use Indentation of 2 spaces?Avoid using TAB? Do not use VHDL or Verilog reserved words for names of any elements in your RTL source filesE D A 软 件 应 用 与

14、 开 发软 件 应 用 与 开 发173.4.2.6 基本编码实践基本编码实践-端口描述端口描述?Declare ports in a logical order ?Declare one port per line ?Declare the ports in the following order:?Input?Clocks?Resets?Enables?Other Control signals?Data and address lines?Input?Clocks?Resets?Enables?Other Control signals?Data and address lines?Ou

15、tput?Clocks?Resets?Enables?Other Control signals?Data?Output?Clocks?Resets?Enables?Other Control signals?DataE D A 软 件 应 用 与 开 发软 件 应 用 与 开 发183.4.2.6 基本编码实践基本编码实践-端口描述端口描述?Explicit mapping for ports and generics?Leave a blank line between the input and output Ports?Place entity, architecture, and c

16、onfiguration sections in the same fileE D A 软 件 应 用 与 开 发软 件 应 用 与 开 发193.4.2.7 基本编码实践基本编码实践 -函数函数/循环循环/数组数组?Use functions when possible, instead of repeating the same sections of code?Use loops and arrays for improved readability of the source code.?Arrays are significantly faster to simulate the for loopsE D A 软 件 应 用 与 开 发软 件 应 用 与 开 发203.4.2.7 Example of 2-D arrayE D A

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号