2013-06-25 16:40:45
下面是xilinx官網上的問答貼:
http://china.xilinx.com/support/answers/41500.htm#solution
The difference between RTL and technology schematic
Description
After XST synthesis is completed, I am able to view both RTL and technology schematic.I frequently observe discrepancies between these two schematics.
What is the difference between them?
Solution
RTL View
Viewing an RTL schematic opens an NGR file that can be viewed as a gate-level schematic.
This schematic is generated after the HDL synthesis phase of the synthesis process. It shows a representation of the pre-optimized design in terms of generic symbols, such as adders, multipliers, counters, AND gates, and OR gates, that are independent of the targeted Xilinx device.
查看RTL schematic,將會打開NGR文件,該文件被看做門級的schematic。RTL schematic在synthesis過程的HDL synthesis phase之后產生,他是用通用的symbol表征的優化前的設計,比如 adders, multipliers, counters, AND gates, and OR gates,與目標器件是獨立的。
Technology View
Viewing a Technology schematic opens an NGC file that can be viewed as an architecture-specific schematic.
This schematic is generated after the optimization and technology targeting phase of the synthesis process. It shows a representation of the design in terms of logic elements optimized to the target Xilinx device or "technology"; for example, in terms of of LUTs, carry logic, I/O buffers, and other technology-specific components. Viewing this schematic allows you to see a technology-level representation of your HDL optimized for a specific Xilinx architecture, which might help you discover design issues early in the design process.
You should always refer to technology schematic for synthesized result.
To disable RTL schematic generation to speed up synthesis, you can set XST property Generate RTL Schematic (-rtlview) to "No".
查看RTL schematic,將會打開NGC文件,該文件被看做基於結構的schematic。
該schematic在synthesis過程的optimization and technology targeting phase之后產生,該schematic示的是根據 Xilinx的device or "technology優化之后,用logic elements組成的schematic。例如,用 LUTs, carry logic, I/O buffers, and other technology-specific components。查看該schematic,可以看到杜宇一個特定的xilinx器件結構優化之后的technology-level的表示,這將幫助你在設計過程中盡早發現設計問題。
下面是網上找的一些看法:
rtl視圖,其實就是寄存器級傳輸圖,它在綜合及布局布線前就生成了,並非設計的最終電路結構,是設計輸入的最忠實的體現,它的主要作用是幫助設計者檢查設計輸入中的問題。就像是用XST綜合的時候,有一個view rtl schematic和一個view technology schematic,區別是前者僅僅是語法分析得到的結構,是你的設計單純的綜合效果,可以幫助你理解你的算法;而后者才是放在FPGA中綜合的效果,是用chipscope可以看到的,反映了實際的電路和資源使用情況。
RTL類似於你用原理圖設計的形式,而后者就是后續要實現需要的ngc,fpga內部的一些基本單元組成的。
RTL Schematic僅僅是語法分析得的結果,Technology Schematic才是實際的結果,后者中能看到的就是你能在CHIPSCOPE里抓得到的。
rtl視圖就是你的設計單純的綜合效果;技術視圖是你的設計放在fpga中的綜合效果!!!
RTL Viewer可以幫助你理解你設計的算法,Technology Viewer查看LUT的工作方式。
我的理解:
RTL Schematic
- 是gate-level的;
- 是用通用的symbol表征的優化前的設計,比如 adders, multipliers, counters, AND gates, and OR gates;
- 與目標器件是獨立的;
- 在ISE中對應RTL Viewer的文件輸入格式為NGR,也就是RTL Viewer通過NGR文件打開RTL Schematic。
Technology Schematic
- 是architecture-specific 的;
- 是根據 Xilinx的device or "technology優化之后,是綜合后的,根據目標器件的結構優化后的,用logic elements組成的schematic。例如,用 LUTs, carry logic, I/O buffers, and other technology-specific components;
- 是基於所使用器件的結構的;
- 在ISE中對應RTL Viewer的文件輸入格式為NGC,也就是RTL Viewer通過NGC文件打開TechnologySchematic。
另外,對於planahead,有:
- 在planahead中,沒有 RTL Schematic 與Technology Schematic的概念,而是在不同的設計步驟有不同的schematic;
- 在RTL Design后,看到的schematic對應ISE中的RTL Schematic,RTL Design是綜合之前的步驟;
- 在Netlist Design后,看到的schematic對應ISE中的Technology Schematic,Netlist Design是綜合之后的步驟。
注:
- RTL Viewer是通過打開NGR或NGR文件來查看RTL Schematic 與Technology Schematic的,看到的Schematic不能保存,也沒有對應的文件,如下面ISE help中對RTL Viewer的描述,是不產生輸出文件的;
- 通過planahead可以將Schematic保存為pdf文件,具體方法見:http://www.cnblogs.com/youngforever/p/3151559.html
RTL Viewer Files
RTL Viewer works with the following files.
Input Files
NGR files are read as input. Xilinx® Synthesis Technology (XST) generates the NGR file from the register transfer level (RTL) netlist. RTL Viewer opens the NGR file, and you can select a block to view as a schematic.
Output Files
The RTL Viewer does not generate output files. It only allows you to view, not save, NGR files.
下面通過一個簡單的例子對比RTL Schematic 與Technology Schematic。
代碼:
寫一個兩級寄存器的例子,代碼如下:
module block_nonblock( clk, a, b, c ); input clk; input a; output b; output c; reg b; reg c; always@(posedge clk) begin b <= a; c <= b; end endmodule
綜合之后,RTL Schematic為:
Technology Schematic為:
可以看到,RTL Schematic只是用兩個D觸發器表示設計,是用通用的符號表征的電路,在實際的FPGA電路中,僅有觸發器肯定是不行的;而Technology Schematic則包含了輸入緩沖ibuf、輸出緩沖obuf等元件,是FPGA實際工作對應的的電路。
當然,上面這個例子很簡單,但已經可以看出兩者的區別了,對於復雜的設計這個區別應該更明顯,此處不再贅述。