RTL設(shè)計概述ppt課件_第1頁
RTL設(shè)計概述ppt課件_第2頁
RTL設(shè)計概述ppt課件_第3頁
RTL設(shè)計概述ppt課件_第4頁
RTL設(shè)計概述ppt課件_第5頁
已閱讀5頁,還剩61頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、1RTL設(shè)計概述2 Tips Digital system Verilog basic structure Coding style3Digital systemRTL在整個數(shù)字系統(tǒng)設(shè)計中的地位無論是CPU還是聲卡芯片還是基帶芯片RTL設(shè)計是整個數(shù)字系統(tǒng)設(shè)計的根基4 ARM11 core structure5Hello worldC語言6Hello world匯編語言7Hello world機器碼8zynq9功能要求功能要求行為設(shè)計(行為設(shè)計(RTL)Sing off是是行為仿真行為仿真綜合、優(yōu)化綜合、優(yōu)化網(wǎng)表網(wǎng)表時序仿真時序仿真布局布線布局布線版圖版圖后仿真后仿真否否是是否否否否是是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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論