1. 程式人生 > >【轉載】RTL 與 technology schematic的區別,包含概念與例項

【轉載】RTL 與 technology schematic的區別,包含概念與例項

下面是xilinx官網上的問答貼:

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

  1. gate-level的;
  2. 是用通用的symbol表徵的優化前的設計,比如 adders, multipliers, counters, AND gates, and OR gates;
  3. 與目標器件是獨立的;
  4. 在ISE中對應RTL Viewer的檔案輸入格式為NGR,也就是RTL Viewer通過NGR檔案開啟RTL Schematic。

Technology Schematic

  1. architecture-specific 的;
  2. 是根據 Xilinx的device or "technology優化之後,是綜合後的,根據目標器件的結構優化後的,用logic elements組成的schematic。例如,用 LUTs, carry logic, I/O buffers, and other technology-specific components;
  3. 是基於所使用器件的結構的;
  4. 在ISE中對應RTL Viewer的檔案輸入格式為NGC,也就是RTL Viewer通過NGC檔案開啟TechnologySchematic。

另外,對於planahead,有:

  1. 在planahead中,沒有 RTL Schematic 與Technology Schematic的概念,而是在不同的設計步驟有不同的schematic;
  2. 在RTL Design後,看到的schematic對應ISE中的RTL Schematic,RTL Design是綜合之前的步驟;
  3. 在Netlist Design後,看到的schematic對應ISE中的Technology Schematic,Netlist Design是綜合之後的步驟。

注:

  1. RTL Viewer是通過開啟NGR或NGR檔案來檢視RTL Schematic 與Technology Schematic的,看到的Schematic不能儲存,也沒有對應的檔案,如下面ISE help中對RTL Viewer的描述,是不產生輸出檔案的;

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;                                 
 
[email protected](posedge clk)     
    begin
        b <= a;
        c <= b;
    end
 
endmodule

綜合之後,RTL Schematic為:

Technology Schematic為:

可以看到,RTL Schematic只是用兩個D觸發器表示設計,是用通用的符號表徵的電路,在實際的FPGA電路中,僅有觸發器肯定是不行的;而Technology Schematic則包含了輸入緩衝ibuf、輸出緩衝obuf等元件,是FPGA實際工作對應的的電路。

當然,上面這個例子很簡單,但已經可以看出兩者的區別了,對於複雜的設計這個區別應該更明顯,此處不再贅述。