版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1RTL设计概述2 Tips Digital system Verilog basic structure Coding style3Digital systemRTL在整个数字系统设计中的地位无论是CPU还是声卡芯片还是基带芯片RTL设计是整个数字系统设计的根基4 ARM11 core structure5Hello worldC语言6Hello world汇编语言7Hello world机器码8zynq9功能要求功能要求行为设计(行为设计(RTL)Sing off是是行为仿真行为仿真综合、优化综合、优化网表网表时序仿真时序仿真布局布线布局布线版图版图后仿真后仿真否否是是否否否否是是IC d
2、esign flow:10Verilog basic structureKey words initial, always, assign, ifelse, case, whileloop 11RTL RTL or the Register Transfer Level is the most popular form of high level design specification. An RTL description of a design describes the design in terms of transformation and transfer of logic fr
3、om one register to another. Logic values are stored in registers where they are evaluated through some combinational logic, and then re-stored in the next register.12Basic Coding Practices General Naming Conventions :Use meaningful names for signals, ports, functions, and parameters. For example, do
4、 not use ra for a RAM address bus. Instead, use ram_addr.Use the name clk for the clock signal.For standardization, we recommend that you use _n to indicate an active low signalUse the name rst for reset signals. If the reset signal is active low, use rst_n 1314Headers in Source Files Author Descrip
5、tion of function and list of key features of the module Date the created Modification history including date, name of modifier, and description of the change1516Use Comments Use comments appropriately to explain all processes, functions Use comments to explain ports, signals, and variables, or group
6、s of signals or variables. Use comments to explain FSM17Indentation Use indentation of 2 spaces. Larger indentation (for example, 8 spaces) restricts line length when there are several levels of nesting. Avoid using tabs. Differences in editors and user setups make the positioning of tabs unpredicta
7、ble and can corrupt the intended indentation. 18Port Ordering Inputs: Clocks Resets Enables Other control signals Data and address lines Outputs: Clocks Resets Enables Other control signals Data19Port Maps Always use explicit mapping for ports and generics, using named association rather than positi
8、onal association. Leave a blank line between the input and output ports to improve readability.20Loops Use loops and arrays for improved readability of the source code. For example, describing a shift register, PN-sequence generator, or Johnson counter with a loop construct can greatly reduce the nu
9、mber of lines of source code while still retaining excellent readability21Hard-Coded Numeric Values Do Not Use Hard-Coded Numeric Values22Use Technology-Independent Libraries Avoid instantiating gates in the design. Gate-level designs are very hard to read, and thus difficult to maintain and reuse.
10、If technology-specific gates are used, then the design is not portable to other technologies. If you must use technology-specific gates, then isolate these gates in a separate module. This will make it easier to modify these gates as needed for different technologies.23Clocks and Resets RTL PATH24Av
11、oid Mixed Clock EdgesAvoid using both positive-edge and negative-edge triggered flip-flops in your designIf you must use both positive-edge and negative-edge triggered flip-flops in your design, 1) be sure to model the worst case duty cycle of the clock accurately in synthesisand timing analysis.2)b
12、e sure to document the assumed duty cycle in the user documentation. 3)it may be useful to separate them into different modules. This makes it easier to identify the negative-edge flops, and thus to put them in different scan chains.25Avoid Gated ClocksAvoid gated clocks in your design. Clock gating
13、 circuits tend to be technology specific and timing dependent. Improper timing of a gated clock can generate a false clock or glitch, causing a flip-flop to clock in the wrong data. Also, the skew of different local clocks can cause hold time violations.If you must use a gated clock, or an internall
14、y generated clock or reset, keep the clock and/or reset generation circuitry as a separate module“How To Successfully Use Gated Clocking in an ASIC Design”26Clk skew27Set-up time & Hold-time28Metastability29Avoid Internally Generated Clocks U2 cannot be clocked during scan-in, test, or scan-out, and
15、 cannot be made part of the scan chain because it is clocked by an internally generated clock30Clock Generation31Avoid Internally Generated Resets Avoid internally generated, conditional resets if possible. Generally, all the registers in the macro should be reset at the same time. This approach mak
16、es analysis and design much simpler and easier.32Infer registers with synchronous reset33Infer registers with asynchronous reset34Asynchronous reset35Asynchronous reset “Asynchronous & Synchronous Reset Design Techniques3637Avoid LatchesAvoid using any latches in your design.To check your design for
17、 latches, compile the design (with no constraints for a quick compile) and use the report_cells command to check for latches.38Avoid Latches Assign default values at the beginning Assign outputs for all input condition Use else for the final priority branch39Avoid Combinational Feedback Avoid combin
18、ational feedback; that is, the looping of combinational processes40Avoid Combinational Feedback41Tri-state Avoid Tri-state in block design 42Specify Complete Sensitivity Lists Include a complete sensitivity list in each of your process (VHDL) or always (Verilog) blocks. Mismatch of simulation and sy
19、nthesis result “RTL Coding Styles That Yield Simulation and Synthesis Mismatches” Sensitivity List and Simulation Performance Make sure your process sensitivity lists contain only necessary signals,as defined in the sections above. Adding unnecessary signals to the sensitivity list slows down simula
20、tion.43Blocking and Nonblocking AssignmentsWhen writing synthesizable code, always use nonblocking assignments in always (posedge clk) blocks. Otherwise, the simulation behavior of the RTL and gate-level designs may differ.“Nonblocking Assignments in Verilog Synthesis, Coding Styles “44Blocking and
21、Nonblocking Assignments4546Blocking and Nonblocking Assignments Assign = Always(posedge clk) = always * =47Case Statements versus if-then-else Statements48if-then-else Statements49Case Statements“full_case parallel_case the Evil Twins of Verilog Synthesis”50Case Statements versus if-then-else Statem
22、ents The multiplexer is a faster circuit. Therefore, if the priority-encoding structure is not required, we recommend using the case statement rather than an if-then-else statement. In a cycle-based simulator, the case statement also simulates faster than the if-then-else statement.51Coding State Ma
23、chines “State Machine Coding Styles for Synthesis”52Register All Outputs For each block of a hierarchical design, register all output signals from the block53Locate Related Combinational Logic in a Single Module Keep related combinational logic together in the same module.54Group combinational logic55Arithmetic Operators: Merging Resources56Eliminate Glue Logic at the Top Level57Asy
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 养老院老人康复训练指导制度
- 《服务成就价值》课件
- 技术合同范本
- 2024年塔吊司机安全操作培训与劳动权益保障协议3篇
- 6 《哈姆莱特(节选)》(学案)-教案课件-部编高中语文必修下册
- 2024年生日蛋糕定制与航空旅行礼品合作合同2篇
- 《脊柱区局部解剖学》课件
- 2025年湖北货运上岗证模拟考试题
- 2024年水路货物运输节能减排管理细则合同3篇
- 2025年太原货运从业资格考试模拟考试题目及答案
- 23J916-1:住宅排气道(一)
- 小学语文二年级上册第八单元说教材
- 教育学原理课后答案主编项贤明
- 幼儿园故事课件:《画龙点睛》
- 资产评估常用数据与参数手册
- 体育场馆租赁合同与体育场馆运营合作协议
- 正高级会计师答辩面试资料
- 脊柱四肢及肛门直肠检查
- 音乐与人生-西南交通大学中国大学mooc课后章节答案期末考试题库2023年
- 交通运输布局对区域发展的影响-扬州的兴衰高一地理人教版(2019)必修第二册
- 2023年高考全国新课标Ⅱ卷作文“安静一下不被打扰”导写及范文
评论
0/150
提交评论