JP2009169694A - High-level synthesis method, high-level synthesis device, and program - Google Patents

High-level synthesis method, high-level synthesis device, and program Download PDF

Info

Publication number
JP2009169694A
JP2009169694A JP2008007298A JP2008007298A JP2009169694A JP 2009169694 A JP2009169694 A JP 2009169694A JP 2008007298 A JP2008007298 A JP 2008007298A JP 2008007298 A JP2008007298 A JP 2008007298A JP 2009169694 A JP2009169694 A JP 2009169694A
Authority
JP
Japan
Prior art keywords
graph
deformation
cluster
description
data flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008007298A
Other languages
Japanese (ja)
Inventor
Akihiko Higuchi
昭彦 樋口
Keiichi Kurokawa
圭一 黒川
Masaru Hattori
大 服部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Original Assignee
Panasonic Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp filed Critical Panasonic Corp
Priority to JP2008007298A priority Critical patent/JP2009169694A/en
Publication of JP2009169694A publication Critical patent/JP2009169694A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a high-level synthesis method for generating high performance RTL description when there is successive processes in a DFG configured of an operation node which does not satisfy a coupling rule or distribution rule of two inputs. <P>SOLUTION: Intermediate data including a data flow graph in which an operation is shown with nodes, and the flow of data is shown with edges are generated from operation description described in programming language, and a partial graph matched with a preliminarily defined reference graph is detected from among partial graphs configuring the data flow graph, and a cluster representing the partial graph as nodes is generated for each of the partial graphs (S51), and the cluster graph in which the clusters are continuously connected is extracted, and the cluster graph is deformed so that the graph height of the cluster graph can be made small, and the deformation is reflected on the data flow graph (S11, S12, S13), and the circuit description of a register transfer level is generated from the intermediate data including the deformed data flow graph (S55). <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、C言語等のプログラミング言語による動作記述からレジスタ転送レベルの回路記述を自動生成する高位合成技術に関する。   The present invention relates to a high-level synthesis technique for automatically generating a register transfer level circuit description from an operation description in a programming language such as C language.

近年、LSI(Large Scale Integration)等の論理回路は、高機能化による大規模化の進展に加え、回路を搭載する製品サイクルが短くなったことで、短期間での設計が必要となっている。短期間で大規模な回路を設計するためには、設計生産性の向上が重要であり、従来から、様々設計手法が提案されている。動作記述からレジスタ転送レベル(以下「RTL」という。)の回路記述を自動合成する高位合成技術(例えば、非特許文献1参照。)もその一つである。   In recent years, logic circuits such as LSI (Large Scale Integration) have become necessary to be designed in a short period of time due to the shortening of the product cycle in which the circuits are mounted, in addition to the progress of larger scales due to higher functionality. . In order to design a large-scale circuit in a short period of time, it is important to improve design productivity, and various design methods have been proposed. One example is a high-level synthesis technique (for example, see Non-Patent Document 1) that automatically synthesizes a circuit description of a register transfer level (hereinafter referred to as “RTL”) from an operation description.

図21は、従来の高位合成方法の一般的なフローチャートである。図21の高位合成方法は、CDFG生成ステップS51と、CDFG変形ステップS52と、スケジューリングステップS53と、バインディングステップS54と、RTL回路生成ステップS55とを含む。   FIG. 21 is a general flowchart of a conventional high-level synthesis method. The high level synthesis method of FIG. 21 includes a CDFG generation step S51, a CDFG modification step S52, a scheduling step S53, a binding step S54, and an RTL circuit generation step S55.

まず、CDFG生成ステップS51で、動作記述から、制御機構とデータ依存を解析して、コントロールデータフローグラフ(CDFG)を生成する。CDFGは、制御フローを表現したコントロールグラフ(CFG)と、データフローを表現したデータフローグラフ(DFG)の2種類のグラフから構成されている。DFGは、演算を示すノード(演算ノード)と変数ノード(定数を含む)を含むDFGノードと、ノード間を接続するエッジとで構成されている。   First, in a CDFG generation step S51, a control data flow graph (CDFG) is generated by analyzing a control mechanism and data dependence from a behavioral description. The CDFG is composed of two types of graphs: a control graph (CFG) representing a control flow and a data flow graph (DFG) representing a data flow. The DFG is composed of a DFG node including a node indicating an operation (operation node) and a variable node (including a constant), and an edge connecting the nodes.

次に、CDFG変形ステップS52で、冗長な演算ノードの削除や、高性能又は小面積なRTL記述(RTLの回路記述)を生成するために、CDFGを変形する。変形としては、不要処理の削除、共通部分処理の削除、定数の伝播/畳み込み等の処理、及び並列度向上を目的としたループ処理の展開(ループアンローリング)などがある。   Next, in the CDFG transformation step S52, the CDFG is transformed in order to delete redundant operation nodes and generate a high-performance or small-area RTL description (RTL circuit description). Modifications include unnecessary processing deletion, common partial processing deletion, constant propagation / convolution processing, and loop processing expansion (loop unrolling) for the purpose of improving parallelism.

次に、スケジューリングステップS53で、CDFG内の各処理ノードで示される処理を実行するのに必要な制御サイクルを決定する。スケジューリングステップS53では、クロック周期(動作周期)又はクロック周波数(動作周波数)に基づいて、制御サイクルを決定する。   Next, in the scheduling step S53, a control cycle necessary for executing the process indicated by each processing node in the CDFG is determined. In the scheduling step S53, the control cycle is determined based on the clock cycle (operation cycle) or the clock frequency (operation frequency).

次に、バインディングステップS54で、スケジューリング結果に基づいて、ハードウェア記憶リソースやハードウェア演算リソースを回路に割り付ける(以下、「ハードウェア記憶リソース」と「ハードウェア演算リソース」をあわせて「ハードウェアリソース」という。)。スケジューリング結果から、ハードウェアリソースのライフタイムを解析し、同一処理が可能なハードウェアリソースのうち、ライフタイムがオーバーラップしていないハードウェアリソースには同一のハードウェアリソースを割り当てることができる。これを「ハードウェアリソースの共有化」と呼ぶ。   Next, in the binding step S54, hardware storage resources and hardware computation resources are allocated to the circuit based on the scheduling result (hereinafter referred to as “hardware resources” together with “hardware storage resources” and “hardware computation resources”. "). From the scheduling result, it is possible to analyze the lifetime of the hardware resource and assign the same hardware resource to the hardware resources whose lifetimes do not overlap among the hardware resources that can be processed in the same manner. This is called “hardware resource sharing”.

最後に、RTL回路生成ステップS55で、スケジューリング結果及びバインディング結果を実現するために必要となる制御回路を生成し、バインディングステップS54で得られたハードウェアリソースを接続したデータパスとあわせて、レジスタ転送レベル記述を出力する。   Finally, in the RTL circuit generation step S55, a control circuit necessary for realizing the scheduling result and the binding result is generated, and the register transfer is performed together with the data path to which the hardware resource obtained in the binding step S54 is connected. Output level description.

次に、複数の値から最大値又は最小値を取得する動作を含んだ動作記述を例にして、RTL記述を生成することを考える。図22は、最大値を求める動作をC言語のプログラムで表した動作記述111の一例であり、この動作記述111は、予め、配列aに格納されたN個(Nは、任意の正の整数)の値の最小値をmvに格納する動作を示している。   Next, let us consider generating an RTL description by taking an example of an operation description including an operation for obtaining a maximum value or a minimum value from a plurality of values. FIG. 22 shows an example of an operation description 111 in which the operation for obtaining the maximum value is expressed by a C language program. The operation description 111 is stored in advance in the array a (N is an arbitrary positive integer). The operation of storing the minimum value of) in mv is shown.

図22に示すような繰返し処理がある動作記述111から、処理性能(処理レイテンシとクロック周期の積)が高いRTL記述を生成するためには、多くの処理を1制御サイクルで処理させることを狙って、繰返し処理を展開してDFGを大きくする方法(例えば、非特許文献1参照。)や、繰返し処理をパイプライン処理させるスケジューリングを行い、繰返し処理のスループット性能を高める方法(例えば、非特許文献2参照。)や、それら2つを組み合わせた方法などが存在する。   In order to generate an RTL description with high processing performance (product of processing latency and clock cycle) from an operation description 111 with repetitive processing as shown in FIG. 22, the aim is to process many processes in one control cycle. Thus, iterative processing is expanded to increase the DFG (for example, see Non-Patent Document 1), or scheduling is performed for pipeline processing of the iterative processing to improve the throughput performance of the iterative processing (for example, Non-Patent Document 1). 2) and a method of combining the two.

図22の動作記述111の場合は、繰返し処理間にデータ依存があるために、繰り返し処理をパイプライン処理化することができない。そのため、繰返し処理を展開する方法で高性能化を図ることになる。しかし、繰返し処理がなくなっても、データ依存に起因して、逐次的な処理が必要なDFGとなり、選択元の値の数(図22のN)によっては、高性能化が困難になる。   In the case of the behavior description 111 shown in FIG. 22, since there is data dependence between the repeated processes, the repeated processes cannot be pipelined. Therefore, high performance is achieved by a method of developing repeated processing. However, even if iterative processing is eliminated, due to data dependence, DFG requires sequential processing, and depending on the number of selection source values (N in FIG. 22), it is difficult to improve performance.

このような逐次的な処理となるDFGのグラフ高さを削減し、高性能なRTL記述を生成する方法は、非特許文献3などで提案されている。
Daniel D.Gajsk,“High−Level Synthesis:Introduction to Chip and System Design,”Kluwer Academic Pub(1992/04) L.Chao,A.LaPaugh,E.Hsign−Mean Sha,“Rotation Scheduling:A Loop Pipelining Algorithm,”Proceddings of Design Automation Conference,1993 A.Nicolau,R.Potasman,“Incremental Tree Height Reduction For High Level Synthesis,”Proceddings of Design Automation Conference,1991
A method for reducing the graph height of the DFG, which is such sequential processing, and generating a high-performance RTL description has been proposed in Non-Patent Document 3 and the like.
Daniel D. Gajsk, “High-Level Synthesis: Introduction to Chip and System Design,” Kluwer Academic Pub (1992/04). L. Chao, A .; LaPaugh, E .; Hsign-Mean Sha, “Rotation Scheduling: A Loop Pipelining Algorithm,” Procedings of Design Automation Conference, 1993 A. Nicolau, R.A. Potasman, “Incremental Tree Height Reduction For High Level Synthesis,” Procedings of Design Automation Conference, 1991.

しかしながら、従来のグラフ高さ削減方法では、DFG内の逐次処理が、2入力の結合則又は分配則を満たす演算ノードで構成される場合のみ、グラフ高さ削減が適用可能である。このため、上述したような複数の値から最大値又は最小値を取得する動作を含んだ動作記述の処理に対しては、高性能なRTL記述を生成することができない。   However, in the conventional graph height reduction method, the graph height reduction can be applied only when the sequential processing in the DFG is composed of operation nodes satisfying the two-input combination rule or distribution rule. For this reason, it is not possible to generate a high-performance RTL description for the behavior description processing including the operation for obtaining the maximum value or the minimum value from a plurality of values as described above.

本発明では、2入力の結合則又は分配則を満たさない演算ノードからなる、DFG内の逐次処理がある場合に、高性能なRTL記述を生成する高位合成方法を提供することを目的とする。   An object of the present invention is to provide a high-level synthesis method for generating a high-performance RTL description when there is a sequential process in the DFG, which is composed of operation nodes that do not satisfy a two-input combination rule or distribution rule.

本発明のある局面に係る高位合成方法は、プログラミング言語で記述された動作記述からレジスタ転送レベルの回路記述を生成する高位合成方法であって、前記動作記述から、演算をノードで示し、かつデータの流れをエッジで示すデータフローグラフを含む中間データを生成するステップと、生成された前記中間データに含まれる前記データフローグラフを構成する部分グラフの中から、予め定義された参照グラフに一致する部分グラフを検出するグラフ検出ステップと、検出された前記部分グラフの各々について、当該部分グラフをノードとして代表するクラスタを生成するクラスタ生成ステップと、生成された前記クラスタが連続して接続されているクラスタグラフを抽出するステップと、抽出された前記クラスタグラフのグラフ高さが小さくなるように前記クラスタグラフを変形し、当該変形を前記データフローグラフに反映させるデータフローグラフ高さ削減ステップと、グラフ高さが削減された前記データフローグラフを含む前記中間データからレジスタ転送レベルの回路記述を生成するステップとを含むことを特徴とする。   A high-level synthesis method according to an aspect of the present invention is a high-level synthesis method for generating a register transfer level circuit description from an operation description described in a programming language, wherein an operation is indicated by a node from the operation description and data Generating intermediate data including a data flow graph indicating the flow of data as an edge, and a pre-defined reference graph from among the partial graphs constituting the data flow graph included in the generated intermediate data A graph detection step for detecting a subgraph, a cluster generation step for generating a cluster that represents the subgraph as a node for each of the detected subgraphs, and the generated clusters are continuously connected. A step of extracting a cluster graph, and a graph height of the extracted cluster graph; A data flow graph height reduction step for deforming the cluster graph so as to be reduced and reflecting the deformation in the data flow graph, and a register transfer level from the intermediate data including the data flow graph with the graph height reduced Generating a circuit description.

これによると、データフローグラフ(DFG)中にグラフ高さ削減が適用不可能な演算ノードが含まれる場合であっても、参照グラフに一致する部分グラフをノードであるクラスタとして代表させ、クラスタが連続して接続されているクラスタグラフを抽出している。このため、クラスタグラフに対してグラフ高さ削減を行なうことにより、2入力の結合則又は分配則を満たさない演算ノードをDFG中に含む場合であっても、DFG内の逐次処理のグラフ高さを削減し、高性能なRTL記述を生成できる。   According to this, even if the data flow graph (DFG) includes an operation node to which graph height reduction is not applicable, a subgraph that matches the reference graph is represented as a cluster that is a node, and the cluster The cluster graph connected continuously is extracted. Therefore, by reducing the graph height for the cluster graph, the graph height of the sequential processing in the DFG is included even if the DFG includes an operation node that does not satisfy the two-input combination rule or distribution rule. And a high-performance RTL description can be generated.

好ましくは、前記参照グラフは、2入力1出力のグラフであり、かつ、当該参照グラフを1つのノードとみなした場合に、当該ノードが示す演算は、結合則又は分配則を満たすことを特徴とする。   Preferably, the reference graph is a graph of two inputs and one output, and when the reference graph is regarded as one node, an operation indicated by the node satisfies a combination rule or a distribution rule. To do.

又は、前記参照グラフは、2n入力n出力(nは自然数)のグラフであり、前記参照グラフの入力及び出力をそれぞれn個ずつグループ化して、2入力1出力のグラフとし、各前記2入力1出力のグラフを1つのノードとみなした場合に、当該ノードが示す演算は、結合則又は分配則を満たすことを特徴とする。   Alternatively, the reference graph is a graph of 2n inputs and n outputs (n is a natural number), and each of the inputs and outputs of the reference graph is grouped into n to form a graph of two inputs and one output, and each of the two inputs 1 When the output graph is regarded as one node, the operation indicated by the node satisfies the combination rule or the distribution rule.

これによって、クラスタを結合則又は分配則を満たす演算ノードと見なすことができ、従来のグラフ高さ削減方法への適用が容易に行なえる。   As a result, the cluster can be regarded as an operation node satisfying the coupling rule or the distribution rule, and can be easily applied to the conventional graph height reduction method.

さらに好ましくは、前記データフローグラフ高さ削減ステップは、前記クラスタグラフの変形後の構造を示す変形構造を、遅延値及び面積の少なくとも1つの変形制約に基づいて決定する変形構造決定ステップと、決定された変形構造に従って、前記クラスタグラフを変形し、当該変形を前記データフローグラフに反映させる変形ステップとを含むことを特徴とする。   More preferably, the data flow graph height reduction step includes a deformed structure determining step for determining a deformed structure indicating a deformed structure of the cluster graph based on at least one deformation constraint of a delay value and an area; A deformation step of deforming the cluster graph according to the deformed structure and reflecting the deformation in the data flow graph.

また、前記グラフ検出ステップでは、生成された前記中間データに含まれる前記データフローグラフを構成する部分グラフの中から、2つの入力のうち大きい値又は小さい値を出力する処理を示す参照グラフに一致する部分グラフを検出し、前記変形ステップでは、2つ以上の入力から任意の2入力を総当りで比較して、前記2つ以上の入力の最大値又は最小値を選択する処理を示すグラフである総当り比較選択グラフを1つ以上含む構造に前記クラスタグラフを変形し、前記変形構造を表す情報は、各総当り比較選択グラフの入力数と、総当り比較選択グラフ間の接続関係とを含むことを特徴とする。   Further, in the graph detection step, it matches a reference graph indicating a process of outputting a large value or a small value of two inputs from the partial graphs constituting the data flow graph included in the generated intermediate data. In the modification step, a graph showing a process of selecting a maximum value or a minimum value of the two or more inputs by comparing any two inputs from two or more inputs in a round robin manner in the modification step. The cluster graph is transformed into a structure including one or more brute force comparison selection graphs, and the information representing the modified structure includes the number of inputs of each brute force comparison selection graph and the connection relationship between the brute force comparison selection graphs. It is characterized by including.

これによって、複数の値から最大値又は最小値を求める逐次処理の動作記述から、回路面積と演算処理能力のトレードオフを考慮したレジスタ転送レベル(RTL)の回路記述を生成することができる。   As a result, a register transfer level (RTL) circuit description that takes into account the trade-off between circuit area and arithmetic processing capability can be generated from the operation description of sequential processing for obtaining the maximum value or the minimum value from a plurality of values.

さらに好ましくは、前記変形制約は、設定ファイルによる指定、前記動作記述に含まれるプラグマによる指定及びGUI(Graphical User Interface)による指定の少なくとも1つ以上の方法によって予め定義されていることを特徴とする。   More preferably, the deformation constraint is defined in advance by at least one method of designation by a setting file, designation by a pragma included in the behavioral description, and designation by a GUI (Graphical User Interface). .

これによって、ユーザが意図した変形制約の指定を行なうことができる。
さらに好ましくは、前記変形構造決定ステップでは、予め定義された動作周期又は動作周波数に基づいてスケジューリングを行い、スケジューリング結果から前記変形制約を求めることを特徴とする。
As a result, the user can specify the deformation constraint intended by the user.
More preferably, in the deformation structure determination step, scheduling is performed based on a predefined operation cycle or operation frequency, and the deformation constraint is obtained from a scheduling result.

また、前記変形構造決定ステップでは、前記スケジューリング結果から前記クラスタグラフがクリティカルパス上にあるか否かを判別し、前記クリティカルパス上にある場合には、変形構造が決定可能な最小遅延値を前記変形制約に設定し、前記クリティカルパス上にない場合は、変形構造が決定可能な最小面積を前記変形制約に設定することを特徴とする。   Further, in the deformed structure determining step, it is determined whether the cluster graph is on a critical path from the scheduling result. If the cluster graph is on the critical path, a minimum delay value that can determine a deformed structure is set as the minimum delay value. When a deformation constraint is set and the deformation path is not on the critical path, a minimum area where a deformation structure can be determined is set as the deformation constraint.

これによって、クリティカルパス上のクラスタグラフのみを変形することが可能なので、性能重視下においても不要な面積増加を防ぐことができる。   As a result, only the cluster graph on the critical path can be deformed, so that an unnecessary area increase can be prevented even when performance is important.

さらに好ましくは、前記データフローグラフ高さ削減ステップでは、前記変形構造決定ステップと、前記変形ステップとを、前記変形ステップにおける前記クラスタグラフの変形がなくなるまで繰返すことを特徴とする。   More preferably, in the data flow graph height reduction step, the deformation structure determination step and the deformation step are repeated until there is no deformation of the cluster graph in the deformation step.

これによって、要求性能を満たす範囲で最小面積を実現するRTL記述を生成することができる。   As a result, it is possible to generate an RTL description that realizes the minimum area within a range that satisfies the required performance.

本発明の他の局面に係る高位合成装置は、プログラミング言語で記述された動作記述からレジスタ転送レベルの回路記述を生成する高位合成装置であって、複数の値から最大値又は最小値を選択する機能を含む動作記述の入力を受け付ける動作記述入力手段と、前記動作記述で示される選択順序とは異なる順序で値を選択することにより前記複数の値から最大値又は最小値を選択する回路を含むレジスタ転送レベルの回路記述を出力するRTL記述出力手段とを備えることを特徴とする。   A high-level synthesis apparatus according to another aspect of the present invention is a high-level synthesis apparatus that generates a circuit description at a register transfer level from an operation description described in a programming language, and selects a maximum value or a minimum value from a plurality of values. A behavior description input means for receiving an operation description including a function; and a circuit for selecting a maximum value or a minimum value from the plurality of values by selecting values in an order different from the selection order indicated by the behavior description. RTL description output means for outputting a circuit description of a register transfer level.

これによって、複数の値から最大値又は最小値を選択する機能を含んだ動作記述から、動作記述における選択順序とは異なる順序でデータを選択することにより、クリティカルパスにおける値の選択回数を減らした、高性能なRTL記述を生成することができる。   This reduces the number of times the value is selected in the critical path by selecting data from an action description including a function for selecting the maximum value or the minimum value from a plurality of values in an order different from the selection order in the action description. A high-performance RTL description can be generated.

好ましくは、前記動作記述入力手段は、さらに、前記動作記述から、演算をノードで示しかつデータの流れをエッジで示すデータフローグラフを含む中間データを生成し、前記高位合成装置は、さらに、前記複数の値から最大値又は最小値を選択する機能を含む動作記述に対する変形制約を設定する制約設定手段と、前記制約設定手段において設定された前記変形制約を満たすようにデータフローグラフを変形する中間データ変形手段とを備え、前記RTL記述出力手段は、変形後の前記データフローグラフより、前記動作記述で示される選択順序とは異なる順序で値を選択することにより前記複数の値から最大値又は最小値を選択する回路を含むレジスタ転送レベルの回路記述を生成し、出力することを特徴とする。   Preferably, the behavior description input means further generates, from the behavior description, intermediate data including a data flow graph indicating operations by nodes and data flows by edges, and the high-level synthesis apparatus further includes Constraint setting means for setting a deformation constraint for a behavioral description including a function for selecting a maximum value or a minimum value from a plurality of values, and an intermediate for deforming the data flow graph so as to satisfy the deformation constraint set in the constraint setting means Data transformation means, wherein the RTL description output means selects a value from the plurality of values by selecting a value from the transformed data flow graph in an order different from the selection order indicated by the behavioral description. A circuit description of a register transfer level including a circuit for selecting a minimum value is generated and output.

これによって、複数の値から最大値又は最小値を選択する機能を含んだ動作記述から、制約設定手段で設定された変形制約を満たす、動作記述における選択順序とは異なる順序でデータを選択することにより、クリティカルパスにおける値の選択回数を減らした、高性能なRTL記述を生成することができる。   As a result, data is selected from an action description including a function for selecting a maximum value or a minimum value from a plurality of values in an order different from the selection order in the action description that satisfies the deformation constraints set by the constraint setting means. Thus, it is possible to generate a high-performance RTL description in which the number of selections of values in the critical path is reduced.

なお、本発明は、このような特徴的なステップを含む高位合成方法又は特徴的な手段を含む高位合成装置として実現することができるだけでなく、高位合成方法に含まれる特徴的なステップをコンピュータに実行させるプログラムとして実現したりすることもできる。そして、そのようなプログラムは、CD−ROM(Compact Disc-Read Only Memory)等の記録媒体やインターネット等の通信ネットワークを介して流通させることができるのは言うまでもない。   The present invention can be realized not only as a high-level synthesis method including such characteristic steps or as a high-level synthesis apparatus including characteristic means, but also in the computer with the characteristic steps included in the high-level synthesis method. It can also be realized as a program to be executed. Needless to say, such a program can be distributed via a recording medium such as a CD-ROM (Compact Disc-Read Only Memory) or a communication network such as the Internet.

本発明の高位合成方法では、2入力の結合則又は分配則を満たさない演算ノードからなる、DFG内の逐次処理の動作記述から、高性能なRTL記述を生成することができる。   In the high-level synthesis method of the present invention, a high-performance RTL description can be generated from a behavioral description of sequential processing in the DFG, which is composed of operation nodes that do not satisfy a two-input combination rule or distribution rule.

また、複数の値から最大値又は最小値を求める逐次処理の動作記述がある場合には、回路面積と演算処理能力のトレードオフを図ることで、要求性能を満たす範囲で最小の面積を実現するRTL記述を生成することができる。   In addition, when there is an operation description of sequential processing for obtaining the maximum value or the minimum value from multiple values, the minimum area is achieved within the range that satisfies the required performance by making a trade-off between the circuit area and the processing capacity. An RTL description can be generated.

(実施の形態1)
図1は、本発明の実施の形態1における高位合成装置の外観図である。高位合成装置は、パーソナルコンピュータやEWS(Engineering Workstation)などのコンピュータにより構成される。
(Embodiment 1)
FIG. 1 is an external view of a high-level synthesis apparatus according to Embodiment 1 of the present invention. The high-level synthesis apparatus is configured by a computer such as a personal computer or an engineering workstation (EWS).

図2は、本発明の実施の形態1における高位合成装置の構成を示す機能ブロック図である。   FIG. 2 is a functional block diagram showing the configuration of the high-level synthesis apparatus according to Embodiment 1 of the present invention.

高位合成装置100は、動作記述111を入力して、RTL記述112を出力する装置であり、動作記述入力部121と、中間データ変形部122と、RTL記述出力部123とを備えている。   The high-level synthesis apparatus 100 is an apparatus that inputs an operation description 111 and outputs an RTL description 112, and includes an operation description input unit 121, an intermediate data transformation unit 122, and an RTL description output unit 123.

動作記述111は、C言語等のプログラミング言語で動作が記述されたものである。
RTL記述112は、Verilog等のハードウェア記述言語又はC言語等のプログラミング言語で、レジスタとレジスタ間の組合せ回路が記述されたものである。
The operation description 111 is an operation described in a programming language such as C language.
The RTL description 112 is a hardware description language such as Verilog or a programming language such as C language in which a combination circuit between registers is described.

中間データ113は、CDFG等の既存の表現形式で、プログラムが表現されたものである。   The intermediate data 113 is a program expressed in an existing expression format such as CDFG.

動作記述入力部121は、動作記述111を、中間データ113に変換する処理部である。   The behavior description input unit 121 is a processing unit that converts the behavior description 111 into intermediate data 113.

中間データ変形部122は、高性能又は小面積のRTL記述を得るために、中間データの変形を行なう処理部である。変形としては、例えば背景技術で説明した不要処理の削除等がある。   The intermediate data transformation unit 122 is a processing unit that transforms intermediate data in order to obtain a high-performance or small-area RTL description. Examples of the modification include deletion of unnecessary processing described in the background art.

RTL記述出力部123は、中間データ113を、RTL記述112に変換する処理部である。   The RTL description output unit 123 is a processing unit that converts the intermediate data 113 into the RTL description 112.

図3は、本発明の実施の形態1における高位合成方法を示すフローチャートである。高位合成方法は、図21を用いて説明した従来と同様のステップS51〜S55と、予め定義された結合則又は分配則を満たす参照グラフにマッチするグラフをDFGから検出し、該グラフに対応するクラスタを生成するクラスタ生成ステップS11と、生成されたクラスタが連続に接続しているクラスタグラフを抽出するクラスタグラフ抽出ステップS12と、抽出されたクラスタグラフをグラフ高さが小さくなるように変形し、DFGにその変形を反映させるデータフローグラフ高さ削減ステップS13とを含む。なお、参照グラフが結合則又は分配則を満たすとは、参照グラフ全体を2入力の演算ノードと見なした時に結合則又は分配則を満たすことを言う。   FIG. 3 is a flowchart showing the high-level synthesis method according to Embodiment 1 of the present invention. In the high-level synthesis method, steps S51 to S55 similar to those in the prior art described with reference to FIG. 21 and a graph that matches a reference graph satisfying a predefined combination rule or distribution rule are detected from the DFG, and the graph corresponds to the graph. A cluster generation step S11 for generating a cluster, a cluster graph extraction step S12 for extracting a cluster graph in which the generated clusters are continuously connected, and the extracted cluster graph is modified so that the graph height is reduced, And a data flow graph height reduction step S13 for reflecting the deformation in the DFG. The reference graph satisfying the combination rule or distribution rule means that the reference graph satisfies the combination rule or distribution rule when the entire reference graph is regarded as a two-input operation node.

次に、高位合成装置100において、図22(図中のNは4とする)に示した動作記述111を入力とした場合の処理の例を用いて、図3のフローチャートに即して、本発明の実施の形態1を説明する。   Next, in the high-level synthesis apparatus 100, using the example of processing when the behavioral description 111 shown in FIG. 22 (N in the figure is 4) is input, this processing is performed according to the flowchart of FIG. Embodiment 1 of the invention will be described.

まず、動作記述入力部121が、動作記述111から図4に示すCDFGで表現された中間データ113を生成する(ステップS51)。   First, the behavior description input unit 121 generates intermediate data 113 expressed in the CDFG shown in FIG. 4 from the behavior description 111 (step S51).

次に、中間データ変形部122が、高性能なRTL記述を生成することが指定されたとして、ループ処理を展開し、図5に示すCDFGに変形する(ステップS52)。   Next, assuming that generation of a high-performance RTL description is specified, the intermediate data transformation unit 122 expands the loop processing and transforms it into the CDFG shown in FIG. 5 (step S52).

次に、中間データ変形部122が、図6に示す、予め定義された参照グラフをDFGから検出し、図7に示すクラスタを含むグラフを生成する(ステップS11)。クラスタは、検出された参照グラフを代表するノードのことである。参照グラフの検出は、例えば文献「M.Corazao,M.Khalaf,L.Guerra,M.Potkonjak,and J.Rabaey,“Perfomance Optimization Using Template Mapping for Datapath−Intensive High−Level Synthesis”,Proceedings of IEEE Transactions on Computer−Aided Design of Integrated Curcuits and Systems,vol.15, No.8, 1996」で公開されているテンプレートマッチング等を使用することで容易に実現することができる。   Next, the intermediate data transformation unit 122 detects a predefined reference graph shown in FIG. 6 from the DFG, and generates a graph including the cluster shown in FIG. 7 (step S11). A cluster is a node that represents a detected reference graph. The detection of the reference graph is performed by, for example, documents “M. Corazoo, M. Khalaf, L. Guerra, M. Potkonjak, and J. Rabaey,“ Performance Optimized Usage Template-Hyperthes-Let's ”. On-Computer-Aided Design of Integrated Circuits and Systems, vol.15, No.8, 1996 ", etc., can be easily used.

次に、中間データ変形部122が、図8に示すように同一の参照グラフにマッチングされたクラスタが連続に接続されたクラスタグラフを抽出する(ステップS12)。   Next, as shown in FIG. 8, the intermediate data transformation unit 122 extracts a cluster graph in which clusters matched with the same reference graph are continuously connected (step S12).

次に、中間データ変形部122が、非特許文献2に示された方法を用いて、クラスタグラフを図9に示すように変形し、DFGにその変形を反映させる(ステップS13)。   Next, the intermediate data deformation unit 122 deforms the cluster graph as shown in FIG. 9 using the method shown in Non-Patent Document 2, and reflects the deformation in the DFG (step S13).

次に、中間データ変形部122が、CDFG内の各処理ノードに対応する処理が実行するのに必要な制御サイクルを決定する(ステップS53)。ステップS53では、クロック周期(動作周期)又はクロック周波数(動作周波数)に基づいて、制御サイクルを決定する。   Next, the intermediate data transformation unit 122 determines a control cycle necessary for the processing corresponding to each processing node in the CDFG to be executed (step S53). In step S53, the control cycle is determined based on the clock cycle (operation cycle) or the clock frequency (operation frequency).

次に、RTL記述出力部123が、スケジューリング結果に基づいて、ハードウェアリソースを回路に割り付け、必要に応じて、ハードウェアリソースの共有化を行う(ステップS54)。   Next, the RTL description output unit 123 allocates hardware resources to the circuit based on the scheduling result, and shares the hardware resources as necessary (step S54).

最後に、RTL記述出力部123が、必要となる制御回路を生成し、データパスとあわせて、RTL記述を生成する(ステップS55)。   Finally, the RTL description output unit 123 generates a necessary control circuit and generates an RTL description together with the data path (step S55).

以上説明したように、本発明の実施の形態1によると、DFGの演算ノード単体ではグラフ高さの削減ができない場合においても、結合則又は分配則を満たす参照グラフにマッチするグラフをDFGから検出し、当該グラフに対応するクラスタが連続に接続しているクラスタグラフを抽出している。また、クラスタグラフをグラフ高さが小さくなるように変形し、DFGに変形を反映させている。よって、グラフ高さを削減することができるため、より高性能なRTL記述を生成することができる。   As described above, according to the first embodiment of the present invention, even when the graph height cannot be reduced by a single DFG operation node, a graph that matches the reference graph satisfying the combination rule or the distribution rule is detected from the DFG. Then, a cluster graph in which clusters corresponding to the graph are continuously connected is extracted. Further, the cluster graph is deformed so that the graph height becomes small, and the deformation is reflected in the DFG. Therefore, since the graph height can be reduced, a higher-performance RTL description can be generated.

なお、ここでは、予め定義された参照グラフが、2入力1出力の場合で説明したが、2n入力n出力(nは1以上の自然数)の参照グラフの場合においても、入出力をn個ずつグループ化することで、結合則又は分配則を満たす2入力1出力と見なせる場合は、同様の効果が得られる。   Here, the case where the predefined reference graph has two inputs and one output has been described. However, even in the case of a reference graph with 2n inputs and n outputs (n is a natural number of 1 or more), n inputs and outputs are provided. The same effect can be obtained when grouping can be regarded as two inputs and one output satisfying the coupling rule or the distribution rule.

たとえば、図10(a)に示した、N個の要素から最大値mvを求めるのに加えて、最大値が格納されていた配列のインデックス値mlも求める動作記述の場合は、図10(b)に示したように、4入力2出力の参照グラフを定義することでクラスタグラフを生成できる。図10(b)では同じ選択条件で選択される入力である{i0、j0}、{i1、j1}をそれぞれグループ化し、出力{o0、o1}をグループ化すればよい。   For example, in the case of the operation description for obtaining the index value ml of the array in which the maximum value is stored in addition to obtaining the maximum value mv from the N elements shown in FIG. As shown in (4), a cluster graph can be generated by defining a reference graph with 4 inputs and 2 outputs. In FIG. 10 (b), {i0, j0} and {i1, j1}, which are inputs selected under the same selection conditions, may be grouped, and the output {o0, o1} may be grouped.

さらに、予め定義されている参照グラフは、入力する動作記述にあわせて、定義し直してもよいことは言うまでもない。   Furthermore, it goes without saying that the predefined reference graph may be redefined in accordance with the operation description to be input.

(実施の形態2)
図11は本発明の実施の形態2における高位合成装置である。
(Embodiment 2)
FIG. 11 shows a high-level synthesis apparatus according to Embodiment 2 of the present invention.

高位合成装置200は、実施の形態1と同様に、動作記述111を入力し、RTL記述112を出力する装置であり、実施の形態1と同様の処理部121〜123に加えて、制約設定部201を備えている。   As in the first embodiment, the high-level synthesis apparatus 200 is an apparatus that inputs the behavior description 111 and outputs the RTL description 112. In addition to the processing units 121 to 123 similar to those in the first embodiment, the high-level synthesis apparatus 200 201.

制約設定部201は、予め定義された遅延値、面積、遅延値と面積両方のいずれかの変形制約を、中間データ113に設定する処理部である。   The constraint setting unit 201 is a processing unit that sets, in the intermediate data 113, a predefined delay value, area, or any deformation constraint of both delay value and area.

図12は、本発明の実施の形態2における高位合成方法を示すフローチャートである。高位合成方法は、図21を用いて説明した従来と同様のステップS51〜S55と、実施の形態1と同様のステップS11〜S12と、クラスタグラフの変形構造を、遅延値、面積、遅延値と面積両方のいずれかの変形制約に基づいて決定する、変形構造決定ステップS21と、決定された変形構造に従って、クラスタグラフを変形し、DFGにその変形を反映させる、変形ステップS22とを備えている。   FIG. 12 is a flowchart showing a high-level synthesis method according to Embodiment 2 of the present invention. The high-level synthesis method includes steps S51 to S55 that are the same as the conventional method described with reference to FIG. 21, steps S11 to S12 that are the same as those in the first embodiment, and a modified structure of the cluster graph that includes a delay value, an area, and a delay value. A deformation structure determination step S21 that is determined based on any deformation constraint of both areas, and a deformation step S22 that deforms the cluster graph according to the determined deformation structure and reflects the deformation in the DFG. .

次に、高位合成装置200において、図22に示した動作記述を入力とした場合の処理の例を用いて、図12のフローチャートに即して、本発明の実施の形態2を説明する。   Next, in the high-level synthesis apparatus 200, Embodiment 2 of the present invention will be described with reference to the flowchart of FIG. 12, using an example of processing when the behavioral description shown in FIG. 22 is input.

まず、実施の形態1と同様に、ステップS51とステップS52を実行し、図5に示したCDFGを生成する。   First, similarly to the first embodiment, steps S51 and S52 are executed to generate the CDFG shown in FIG.

次に、ステップS11とステップS12を実行し、クラスタグラフを抽出する。ただし、ステップS11において、2つの入力のうち大きい値又は小さい値を出力するグラフを参照グラフとしてDFGから検出する。この時、ステップS12で抽出されたクラスタグラフは、N個の要素から最大値又は最小値を求める処理を表している。   Next, Step S11 and Step S12 are executed to extract a cluster graph. However, in step S11, a graph that outputs a large value or a small value of the two inputs is detected from the DFG as a reference graph. At this time, the cluster graph extracted in step S12 represents processing for obtaining the maximum value or the minimum value from the N elements.

次に、制約設定部201が、予め定義された変形制約を中間データ113に設定した後に、中間データ変形部122が、制約設定部201が設定した変形制約に基づいて、最大値(又は最小値)を求める場合に必要となる要素同士の比較演算に着目した変形構造を決定する(ステップS21)。   Next, after the constraint setting unit 201 sets a predefined deformation constraint in the intermediate data 113, the intermediate data deformation unit 122 determines the maximum value (or the minimum value) based on the deformation constraint set by the constraint setting unit 201. ) Is determined in consideration of a comparison operation between elements required for obtaining () (step S21).

図22の動作記述では、比較演算がN個存在し、DFG内ではN個の比較演算ノードが存在することになる。最低N個の比較演算があれば、最大値又は最小値を求めることできるが、比較演算数をNより増加させることで、よりグラフ高さの小さいDFGを生成することが可能である。グラフ高さが最小になるのは、任意のN+1(初期値自体が加わるために、Nに1が足される)個の要素を総当りで比較して、その比較結果を用いて、最大値又は最小値を求めるように変形する場合である。図22の動作では、繰返し処理1回目の条件判定は、常に成り立つために、ステップS52の最適化処理で削除されると、比較要素はN、比較演算数はN−1となる。しかし、ここでの説明は、最適化処理で削除されないで、元の比較演算数があるものとして説明を統一する。   In the behavioral description of FIG. 22, there are N comparison operations, and there are N comparison operation nodes in the DFG. If there are at least N comparison operations, the maximum value or the minimum value can be obtained. However, by increasing the number of comparison operations from N, it is possible to generate a DFG with a smaller graph height. The graph height is minimized by comparing arbitrary N + 1 elements (adding 1 to N because the initial value itself is added) in a brute force, and using the comparison result, the maximum value Or it is a case where it changes so that the minimum value may be calculated | required. In the operation of FIG. 22, the condition determination for the first iteration is always satisfied. Therefore, when the optimization process in step S52 is deleted, the comparison element is N and the number of comparison operations is N-1. However, the description here is not deleted in the optimization process, and the description is unified assuming that there is the original number of comparison operations.

図13は、Nを8とした場合の最大値を求めるDFGであり、図13(a)は、実施の形態1でグラフ高さ最小の場合を示し、図13(b)は、実施の形態2でグラフ高さ最小の場合を示している。   FIG. 13 is a DFG for obtaining the maximum value when N is 8, FIG. 13A shows the case where the graph height is minimum in the first embodiment, and FIG. 13B shows the embodiment. 2 shows the case of the minimum graph height.

図13(b)において、総当り比較選択グラフ1301は、2つ以上の入力から任意の2入力を総当りで比較して、最大値又は最小値を選択するグラフである。総当り比較選択グラフにおいて、MISelはN+1個の入力から1つを選択する多入力選択部であり、CondGenはN+1個の要素を総当りで比較した結果を用いて、MISelへの選択条件を生成する選択条件生成部である。図14は、Nを3とした時の総当り比較選択グラフの例である。この例では多入力選択部MISelは3つの2入力セレクタノードMUXで構成されており、選択条件生成部CondGenは4個の要素を総当りで比較するのに必要な、42=6個の比較演算ノードgtの結果を用いて選択条件を生成し、多入力選択部MISelに入力している。一般に、N+1入力の選択条件生成部はN+12個の比較演算ノードgtを含み、図13(b)では92=36個の比較演算ノードgtを含む。ここで、選択条件生成部CondGenで論理積(&&)や論理和(||)等の論理演算ノードを用いているが、これらは1ビットの演算であり、比較演算ノードgtの遅延値に比べれば小さい。 In FIG. 13B, a brute force comparison selection graph 1301 is a graph for selecting a maximum value or a minimum value by comparing any two inputs with brute force from two or more inputs. In the brute force comparison selection graph, MISel is a multi-input selection unit that selects one from N + 1 inputs, and CondGen generates a selection condition for MISel using the result of comparing N + 1 elements with brute force. This is a selection condition generation unit. FIG. 14 is an example of a brute force comparison selection graph when N is 3. In this example, the multi-input selection unit MISel is composed of three 2-input selector nodes MUX, and the selection condition generation unit CondGen requires 4 C 2 = 6 pieces to compare four elements in a brute force manner. A selection condition is generated using the result of the comparison operation node gt and input to the multi-input selection unit MISel. In general, an N + 1 input selection condition generation unit includes N + 1 C 2 comparison operation nodes gt, and FIG. 13B includes 9 C 2 = 36 comparison operation nodes gt. Here, logical operation nodes such as logical product (&&) and logical sum (||) are used in the selection condition generation unit CondGen. These are 1-bit operations, which are compared with the delay value of the comparison operation node gt. Small.

図13(a)ではクリティカルパスが2入力セレクタノードMUXと比較演算ノードgtをそれぞれ4個通るのに対し、図13(b)ではクリティカルパスが選択条件生成部CondGen(比較演算ノードgt1個といくつかの論理演算ノード)と、多入力選択部MISel(2入力セレクタノードMUXで構成する例の場合、最大4個の2入力セレクタノードMUX)を通るので、図13(b)のDFGから生成されるRTL記述の方が高性能である。   In FIG. 13A, the critical path passes through each of the two-input selector node MUX and the comparison operation node gt, whereas in FIG. 13B, the critical path includes the selection condition generation unit CondGen (one comparison operation node gt and the number of comparison paths). And a multi-input selection unit MISel (in the case of an example constituted by a two-input selector node MUX, a maximum of four two-input selector nodes MUX) are generated from the DFG of FIG. 13B. The RTL description is higher performance.

この変形方法では、実施の形態1による方法よりもグラフ高さが削減され、高性能なRTL記述を生成することが可能となるが、実施の形態1による方法よりもグラフ高さを削減した場合は、最終的に生成されるRTL記述内の比較演算が多くなるため、面積が増加する。即ち、性能と面積のトレードオフ関係が発生する。例えば、図15のように、図13(a)よりグラフ高さは低い範囲で、図13(b)よりグラフ高さが高くなるようにクラスタグラフを変形すると、比較演算数は図13(a)より多く、図13(b)より少なくなる。この時、ステップS22で変形されたクラスタグラフは総当り比較選択グラフをクラスタとし、それを2つ以上(図15では総当り比較選択グラフ(クラスタ)G0、G1、G2、G3、G4)含む構造となる。   In this modification method, the graph height is reduced as compared with the method according to the first embodiment, and a high-performance RTL description can be generated. However, when the graph height is reduced as compared with the method according to the first embodiment. Since the number of comparison operations in the finally generated RTL description increases, the area increases. That is, a trade-off relationship between performance and area occurs. For example, as shown in FIG. 15, when the cluster graph is transformed so that the graph height is lower than that in FIG. 13A and higher than that in FIG. 13B, the number of comparison operations is as shown in FIG. ) More and less than FIG. 13 (b). At this time, the cluster graph deformed in step S22 has a brute force comparison selection graph as a cluster, and includes two or more (in FIG. 15, brute force comparison selection graph (cluster) G0, G1, G2, G3, G4). It becomes.

したがって、ステップS21では、予め設定された変形制約から、クラスタグラフの変形構造を決定する。変形制約としては、最大値(又は最小値)計算の遅延値、又は、最大値(又は最小値)計算に必要な面積で定義される。   Therefore, in step S21, the deformation structure of the cluster graph is determined from the deformation constraints set in advance. The deformation constraint is defined by a delay value of the maximum value (or minimum value) calculation or an area necessary for the maximum value (or minimum value) calculation.

変形構造を表す情報は、各総当り比較選択グラフ1301の入力数と、総当り比較選択グラフ間の接続関係を含む。図16は、クラスタグラフが図15の場合における、変形構造を表す情報の例である。出力と入力集合は、DFGノード又は各総当り比較選択グラフを要素とする。総当り比較選択グラフG0の出力には変数ノードmvが接続されており、入力には総当り比較選択グラフG1、G2、G3、G4が接続されている。総当り比較選択グラフG1の出力には総当り比較選択グラフG0が接続されており、入力には変数ノードa[8]、a[7]が接続されている。以下、総当り比較選択グラフG2、G3、G4についても同様に入力数と接続関係が分かる。この情報によれば、1つ以上の総当り比較選択グラフを含む任意のクラスタグラフを表現可能であることは容易に分かる。   The information indicating the deformation structure includes the number of inputs of each brute force comparison selection graph 1301 and the connection relationship between the brute force comparison selection graphs. FIG. 16 is an example of information representing a deformed structure when the cluster graph is FIG. The output and input set have DFG nodes or brute force comparison selection graphs as elements. A variable node mv is connected to the output of the brute force comparison selection graph G0, and brute force comparison selection graphs G1, G2, G3, G4 are connected to the input. A brute force comparison selection graph G0 is connected to the output of the brute force comparison selection graph G1, and variable nodes a [8] and a [7] are connected to inputs. Hereinafter, the number of inputs and the connection relationship can be similarly understood for the round robin comparison selection graphs G2, G3, and G4. According to this information, it can be easily understood that an arbitrary cluster graph including one or more round-robin comparison selection graphs can be expressed.

ステップS21では、中間データ変形部122が、遅延値や面積等の変形制約と各種演算ノードの遅延値と面積等を含むライブラリ情報から、比較演算段数制約や比較演算数制約を求め、これらを用いて変形構造を決定する。   In step S21, the intermediate data transformation unit 122 obtains the comparison operation stage number constraint and the comparison operation number constraint from the library information including the deformation constraint such as the delay value and the area and the delay value and the area of the various operation nodes, and uses these. To determine the deformation structure.

変形制約が遅延値の場合は、ステップS21では遅延値から求めた比較演算段数制約の下で、比較演算数が最小となる構造を変形構造として決定する。比較演算段数制約の下で、比較演算数が最小となる構造を求めるには、全総当り比較選択グラフの入力数をパラメータとした、クラスタグラフの総比較演算数を評価関数として最小化する最適化問題を解けばよい。遅延値から求めた比較演算段数制約が1の例では、ステップS21では図13(b)を変形構造として決定する。   If the deformation constraint is a delay value, in step S21, a structure that minimizes the number of comparison operations is determined as a deformation structure under the comparison operation stage number constraint obtained from the delay value. In order to obtain the structure that minimizes the number of comparison operations under the constraint of the number of comparison operations, it is optimal to minimize the total number of comparison operations of the cluster graph as an evaluation function using the number of inputs of the all-round comparison selection graph as a parameter. Solving the problem. In an example in which the comparison operation stage number constraint obtained from the delay value is 1, in FIG. 13B, FIG. 13B is determined as a modified structure.

また、変形制約が面積の場合は、ステップS21では面積から求めた比較演算数制約の下で、例えば図17のフローチャートによって、変形構造を決定する。図17のフローチャートでは比較演算段数Sを1から増やしていって(ステップS171、S175)、比較演算段数制約Sにおける比較演算数の最小値min(S)が比較演算数制約max_C以下になれば(ステップS173でYes)、比較演算数がmin(S)となる構造を変形構造として決定する(ステップS174)。クラスタグラフの全ての総当り比較選択グラフの入力数が2となる場合に、比較演算段数Sは段数として取り得る最大のceil(log2(N+1))となり(ただしceil(A)はA以上の最小の整数)、比較演算段数Sがこの値より大きくなる(ステップS172でNo)と、変形制約を満たす構造は存在しなくなるので、エラーとする(ステップS176)。面積から求めた比較演算数制約が16の例では、min(1)=36となる図13(b)の構造では比較演算数制約を満たさず、次にmin(2)=4232+3×22=12となる図15の構造が比較演算数制約を満たし、変形構造として決定する。 If the deformation constraint is an area, in step S21, the deformation structure is determined under the comparison operation number constraint obtained from the area, for example, according to the flowchart of FIG. In the flowchart of FIG. 17, if the comparison operation stage number S is increased from 1 (steps S171 and S175), and the minimum value min (S) of the comparison operation number in the comparison operation stage number constraint S is less than or equal to the comparison operation number constraint max_C ( In step S173, the structure in which the number of comparison operations is min (S) is determined as a deformed structure (step S174). When the number of inputs of all round-robin comparison selection graphs in the cluster graph is 2, the comparison operation stage number S is the maximum ceil (log 2 (N + 1)) that can be taken as the stage number (where ceil (A) is greater than or equal to A) If the comparison operation stage number S is larger than this value (No in step S172), there is no structure satisfying the deformation constraint, and an error is assumed (step S176). In the example of comparison operand constraints determined from area 16, min (1) = in the structure of 36 and consisting FIG 13 (b) is not satisfied a comparison operation Constraint, then min (2) = 4 C 2 + 3 The structure of FIG. 15 in which C 2 + 3 × 2 C 2 = 12 satisfies the comparison operation number constraint and is determined as a deformed structure.

また、変形制約が遅延値と面積の両方の場合は、ステップS21では遅延値、面積から求めた比較演算段数制約、比較演算数制約の下で、例えば図17においてステップS172の条件式の右辺を、ceil(log2(N+1))から比較演算段数制約に置換えたフローチャートによって、変形構造を決定する。求められた比較演算段数が2、比較演算数が10の例では、min(1)=36となる図13(b)の構造では比較演算数制約を満たさず、次にmin(2)=12となる図15の構造が比較演算数制約を満たさず、次にステップS172において比較演算段数Sが比較演算段数制約より大きくなるので、エラー終了する。 Further, when the deformation constraint is both the delay value and the area, for example, the right side of the conditional expression in step S172 in FIG. 17 is obtained under the comparison operation stage number constraint and the comparison operation number constraint obtained from the delay value and area in step S21. , Ceil (log 2 (N + 1)) is replaced with the comparison operation stage number constraint, and the deformation structure is determined. In the example in which the number of comparison operation stages obtained is 2 and the number of comparison operations is 10, the structure of FIG. 13B where min (1) = 36 does not satisfy the comparison operation number constraint, and then min (2) = 12. Since the structure of FIG. 15 does not satisfy the comparison operation number constraint and the comparison operation step number S becomes larger than the comparison operation step number constraint in step S172, the process ends in error.

変形制約の定義方法としては、設定ファイルによる指定、動作記述中のプラグマによる指定、GUI(Graphical User Interface)による指定がある。   As a method for defining a deformation constraint, there are designation by a setting file, designation by a pragma in an operation description, and designation by a GUI (Graphical User Interface).

設定ファイルによる指定の場合、例えば、関数名と変形制約のペアを指定することで、指定された関数内の全クラスタグラフに変形制約を指定してもよい。   In the case of specification by a setting file, for example, a deformation constraint may be specified for all cluster graphs in a specified function by specifying a function name and a deformation constraint pair.

動作記述中のプラグマによる指定の場合、例えば、関数宣言の直前に変形制約を指定する旨のプラグマを記述することで、指定された関数内の全クラスタグラフに変形制約を指定してもよい。   In the case of specification by a pragma in the behavioral description, for example, a deformation constraint may be specified for all cluster graphs in the specified function by describing a pragma for specifying the deformation constraint immediately before the function declaration.

GUIによる指定の場合、例えば、GUI上のクラスタグラフを選択した状態で変形制約を指定するダイアログを開いて、変形制約を指定してもよい。   In the case of designation by GUI, for example, a dialog for designating deformation constraints may be opened with a cluster graph on the GUI selected, and the deformation constraints may be designated.

次に、中間データ変形部122が、ステップS21が決定した変形構造に従って、クラスタグラフを変形し、その変形をDFGに反映させる(ステップS22)。   Next, the intermediate data deformation unit 122 deforms the cluster graph according to the deformation structure determined in step S21, and reflects the deformation in the DFG (step S22).

以降、実施の形態1と同様に、ステップS53〜S55まで実行し、RTL記述を生成する。   Thereafter, as in the first embodiment, steps S53 to S55 are executed to generate an RTL description.

なお、ここでは、予め定義された参照グラフが、2つの入力のうち大きい値、又は、小さい値を出力するグラフの場合で説明したが、2つの入力のうち大きい値、又は、小さい値を出力し、2つの入力に対応するインデックス値から、大きい値、又は、小さい値に対応するインデックス値を出力する図10(b)のようなグラフについても、入出力と対応するインデックス値をグループ化することで、同様の効果が得られる。このとき、要素数N=3とした場合の総当り比較選択グラフ1301は図18のようになり、同じ選択条件で選択される入力{v0,w0}、{v1,w1}、{v2,w2}、{v3,w3}をそれぞれグループ化し、出力{o0,o1}をグループ化すると、図14と同様の扱いができる。   In addition, although the case where the predefined reference graph is a graph that outputs a large value or a small value of two inputs has been described here, a large value or a small value of two inputs is output. Also, in the graph as shown in FIG. 10B that outputs an index value corresponding to a large value or a small value from index values corresponding to two inputs, the index values corresponding to input / output are grouped. Thus, the same effect can be obtained. At this time, the round-robin comparison selection graph 1301 when the number of elements N = 3 is as shown in FIG. 18, and inputs {v0, w0}, {v1, w1}, {v2, w2 selected under the same selection conditions. }, {V3, w3} are grouped and the output {o0, o1} is grouped, the same treatment as in FIG. 14 can be performed.

以上説明したように、本発明の実施の形態2によると、任意のN個の要素から最大値(又は最小値)を求める場合において、比較演算の個数を考慮しながら、実施の形態1より高性能なRTL記述を生成することが可能である。   As described above, according to the second embodiment of the present invention, when the maximum value (or minimum value) is obtained from any N elements, the number of comparison operations is considered and higher than in the first embodiment. It is possible to generate a high performance RTL description.

さらに、定義された制約に基づいて、性能と面積とのトレードオフを取ることで、面積重視や性能重視など目的に合わせたRTL記述を生成することが可能である。   Furthermore, by taking a trade-off between performance and area based on the defined constraints, it is possible to generate an RTL description tailored to the purpose such as emphasis on area or emphasis on performance.

(実施の形態3)
実施の形態3における高位合成装置は実施の形態1における高位合成装置100と同様である。
(Embodiment 3)
The high level synthesis apparatus in the third embodiment is the same as the high level synthesis apparatus 100 in the first embodiment.

図19は、本発明の実施の形態3における高位合成方法を示すフローチャートである。高位合成方法は、図21を用いて説明した従来と同様のステップS51〜S55と、実施の形態1と同様のステップS11〜S12と、スケジューリング結果から変形構造を決定する自動変形構造決定ステップS31と、実施の形態2と同様のステップS22とを含む。   FIG. 19 is a flowchart showing a high-level synthesis method according to Embodiment 3 of the present invention. The high-level synthesis method includes steps S51 to S55 similar to those in the prior art described with reference to FIG. 21, steps S11 to S12 similar to those in the first embodiment, and an automatic deformation structure determination step S31 that determines a deformation structure from the scheduling result. Step S22 similar to that of the second embodiment is included.

次に、高位合成装置100において、図22に示した動作記述を入力とした場合の処理の例を用いて、図19のフローチャートに即して、本発明の実施の形態3を説明する。   Next, Embodiment 3 of the present invention will be described with reference to the flowchart of FIG. 19, using an example of processing when the behavioral description shown in FIG.

まず、実施の形態2と同様に、ステップS51、ステップS52、ステップS11とステップS12を実行し、N個の要素から最大値又は最小値を求める処理行なうクラスタグラフを抽出する。   First, as in the second embodiment, step S51, step S52, step S11, and step S12 are executed to extract a cluster graph to be processed for obtaining a maximum value or a minimum value from N elements.

次に、ステップS53を実行し、中間データ変形部122が、CDFG内の各処理ノードに対応する処理が実行するのに必要な制御サイクルを決定する。   Next, step S53 is executed, and the intermediate data transformation unit 122 determines a control cycle necessary for the processing corresponding to each processing node in the CDFG to be executed.

次に、ステップS31を実行する。ステップS31は、変形制約が、制約設定部201で設定されたものでは無く、スケジューリング結果からを求められたものである点を除いては、実施の形態2のステップS21と同様である。   Next, step S31 is executed. Step S31 is the same as step S21 in the second embodiment except that the deformation constraint is not set by the constraint setting unit 201 but is obtained from the scheduling result.

スケジューリング結果から変形制約を求める例として、クリティカルパスの情報を用いることができる。この時、例えば、クリティカルパス上にクラスタグラフがある場合は比較演算段数制約が1段になるよう変形制約を設定し、それ以外は比較演算段数制約がceil(log2(N+1))段になるよう変形制約を設定する。 As an example of obtaining a deformation constraint from a scheduling result, critical path information can be used. At this time, for example, when there is a cluster graph on the critical path, a deformation constraint is set so that the comparison operation stage number constraint is 1 stage, and otherwise, the comparison operation stage number constraint is ceil (log 2 (N + 1)) stage. The deformation constraint is set as follows.

次に、中間データ変形部122が、ステップS31が決定した変形構造に従って、クラスタグラフを変形し、その変形をDFGに反映させる(ステップS22)。   Next, the intermediate data deformation unit 122 deforms the cluster graph in accordance with the deformation structure determined in step S31, and reflects the deformation in the DFG (step S22).

以降、実施の形態1と同様に、ステップS53〜S55まで実行し、RTL記述を生成する。   Thereafter, as in the first embodiment, steps S53 to S55 are executed to generate an RTL description.

以上説明したように、本発明の実施の形態3によると、RTL回路の性能を劣化する原因となっている、クリティカルパス上のクラスタグラフのみ変形することが可能であるので、性能重視下においても、不要な面積増加が防止される。   As described above, according to the third embodiment of the present invention, only the cluster graph on the critical path that causes the degradation of the performance of the RTL circuit can be transformed. Unnecessary area increase is prevented.

(実施の形態4)
実施の形態4における高位合成装置は実施の形態1における高位合成装置100と同様である。
(Embodiment 4)
The high level synthesis apparatus in the fourth embodiment is the same as the high level synthesis apparatus 100 in the first embodiment.

図20は、本発明の実施の形態4における高位合成方法を示すフローチャートである。高位合成方法は、図21を用いて説明した従来と同様のステップS51〜S55と、実施の形態1と同様のステップS11〜S12と、実施の形態3と同様のステップS31と、実施の形態2と同様のステップS22と、変形されたクラスタグラフが存在するかを判定し、存在する場合はステップS53へ戻らせ、存在しない場合はステップS54へ進ませる制御を行なうステップS41とを含む。   FIG. 20 is a flowchart showing a high-level synthesis method according to Embodiment 4 of the present invention. The high-level synthesis method includes steps S51 to S55 that are the same as the conventional method described with reference to FIG. 21, steps S11 to S12 that are the same as those in the first embodiment, steps S31 that are the same as the third embodiment, and the second embodiment. Step S22 similar to step S22, and step S41 for determining whether or not there is a modified cluster graph, and for returning to step S53 if it exists, and for proceeding to step S54 if it does not exist.

次に、高位合成装置100において、図22に示した動作記述を入力とした場合の処理の例を用いて、図20のフローチャートに即して、本発明の実施の形態4を説明する。   Next, Embodiment 4 of the present invention will be described with reference to the flowchart of FIG. 20, using an example of processing when the behavioral description shown in FIG. 22 is input in high-level synthesis apparatus 100.

まず、実施の形態3と同様に、ステップS51、ステップS52、ステップS11、ステップS12を実行し、N個の要素から最大値又は最小値を求める処理行なうクラスタグラフを抽出する。   First, as in the third embodiment, step S51, step S52, step S11, and step S12 are executed to extract a cluster graph for performing processing for obtaining a maximum value or a minimum value from N elements.

次に、ステップS53を実行し、中間データ変形部122が、CDFG内の各処理ノードに対応する処理が実行するのに必要な制御サイクルを決定する。   Next, step S53 is executed, and the intermediate data transformation unit 122 determines a control cycle necessary for the processing corresponding to each processing node in the CDFG to be executed.

次に、実施の形態3と同様にステップS31を実行し、中間データ変形部122が、スケジューリング結果から求めた変形制約を下に、クラスタグラフの変形構造を決定する。   Next, step S31 is executed as in the third embodiment, and the intermediate data deformation unit 122 determines the deformation structure of the cluster graph under the deformation constraint obtained from the scheduling result.

次に、ステップS22で、中間データ変形部122が、ステップS31で決定された変形構造に従って、クラスタグラフを変形し、その変形をDFGに反映させる。   Next, in step S22, the intermediate data deformation unit 122 deforms the cluster graph according to the deformation structure determined in step S31, and reflects the deformation in the DFG.

次に、ステップS41で、ステップS22で変形されたクラスタグラフが存在すれば、ステップS53へ戻り、存在しなければステップS54へ進む。   Next, in step S41, if the cluster graph transformed in step S22 exists, the process returns to step S53, and if not, the process proceeds to step S54.

以降、実施の形態1と同様に、ステップS54、S55を実行し、RTL記述を生成する。   Thereafter, as in the first embodiment, steps S54 and S55 are executed to generate an RTL description.

以上説明したように、本発明の実施の形態4によると、ステップS31とステップS22を変更するクラスタグラフがなくなるまで繰り返すので、要求性能を満たす範囲で最小面積を実現するRTL記述を生成することができる。   As described above, according to the fourth embodiment of the present invention, steps S31 and S22 are repeated until there is no cluster graph to be changed, so that it is possible to generate an RTL description that realizes the minimum area within the range satisfying the required performance. it can.

今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。   The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

本発明の高位合成方法は、2入力の結合則又は分配則を満たさない演算ノードからなる、DFG内の逐次処理の動作記述から、高性能なRTL記述を生成することができる特徴を有しており、大規模集積回路の設計に広く利用することができる。   The high-level synthesis method of the present invention has a feature that a high-performance RTL description can be generated from a behavioral description of sequential processing in DFG, which is composed of operation nodes that do not satisfy a two-input combination rule or distribution rule. Therefore, it can be widely used for designing large-scale integrated circuits.

本発明の実施の形態1〜4における高位合成装置の外観図である。It is an external view of the high level synthesis apparatus in the first to fourth embodiments of the present invention. 本発明の実施の形態1、3及び4における高位合成装置の構成を示した機能ブロック図である。It is a functional block diagram which showed the structure of the high level synthesis apparatus in Embodiment 1, 3 and 4 of this invention. 本発明の実施の形態1における高位合成方法のフローチャートである。It is a flowchart of the high level synthesis | combining method in Embodiment 1 of this invention. 動作記述から生成されたCDFGの一例を示す図である。It is a figure which shows an example of CDFG produced | generated from the behavioral description. 図4のCDFGから変形されたCDFGの一例を示す図である。It is a figure which shows an example of CDFG deform | transformed from CDFG of FIG. 本発明の実施の形態1における高位合成方法のクラスタ生成ステップでDFGから検出する参照グラフの一例を示す図である。It is a figure which shows an example of the reference graph detected from DFG in the cluster production | generation step of the high level synthesis method in Embodiment 1 of this invention. 本発明の実施の形態1における高位合成方法のクラスタ生成ステップで生成されたクラスタを含むグラフの一例を示す図である。It is a figure which shows an example of the graph containing the cluster produced | generated by the cluster production | generation step of the high level synthesis method in Embodiment 1 of this invention. 本発明の実施の形態1における高位合成方法のクラスタグラフ抽出ステップで抽出されたクラスタグラフの一例を示す図である。It is a figure which shows an example of the cluster graph extracted by the cluster graph extraction step of the high level synthesis method in Embodiment 1 of this invention. 本発明の実施の形態1における高位合成方法のデータフロー高さ削減ステップでグラフ高さを削減されたクラスタグラフの一例を示す図である。It is a figure which shows an example of the cluster graph by which the graph height was reduced by the data flow height reduction step of the high level synthesis method in Embodiment 1 of the present invention. 配列値から最大値と最大値に対応するインデックス値を求める動作記述と、参照グラフの入力及び出力のグループ化の一例を示す図である。It is a figure which shows an example of the operation description which calculates | requires the index value corresponding to the maximum value and the maximum value from an array value, and the grouping of the input and output of a reference graph. 本発明の実施の形態2における高位合成装置の構成を示した機能ブロック図である。It is the functional block diagram which showed the structure of the high level synthesis apparatus in Embodiment 2 of this invention. 本発明の実施の形態2における高位合成方法のフローチャートである。It is a flowchart of the high level synthetic | combination method in Embodiment 2 of this invention. 本発明の実施の形態1における高位合成方法と実施の形態2における高位合成方法によるグラフ高さ最小のDFGの一例を示す図である。It is a figure which shows an example of DFG with the minimum graph height by the high level synthetic | combination method in Embodiment 1 of this invention, and the high level synthetic | combination method in Embodiment 2. FIG. 本発明の実施の形態2における入力数4の総当り比較選択グラフの一例を示す図である。It is a figure which shows an example of the brute force comparison selection graph of the input number 4 in Embodiment 2 of this invention. 本発明の実施の形態2における高位合成方法のデータフロー高さ削減ステップでグラフ高さを削減されたDFGの一例を示す図である。It is a figure which shows an example of DFG by which the graph height was reduced by the data flow height reduction step of the high level synthesis method in Embodiment 2 of the present invention. 本発明の実施の形態2における変形構造を表す情報の一例を示す図である。It is a figure which shows an example of the information showing the deformation | transformation structure in Embodiment 2 of this invention. 本発明の実施の形態2における高位合成方法の変形構造決定ステップで変形制約が面積である場合のフローチャートの一例を示す図である。It is a figure which shows an example of the flowchart in case a deformation | transformation restriction | limiting is an area in the deformation | transformation structure determination step of the high level synthetic | combination method in Embodiment 2 of this invention. 本発明の実施の形態2における値の入力数4、入力に対応するインデックス値の入力数4の総当り比較選択グラフの一例を示す図である。It is a figure which shows an example of the brute force comparison selection graph of the input number 4 of the value in Embodiment 2 of this invention, and the input number 4 of the index value corresponding to an input. 本発明の実施の形態3における高位合成方法のフローチャートである。It is a flowchart of the high level synthetic | combination method in Embodiment 3 of this invention. 本発明の実施の形態4における高位合成方法のフローチャートである。It is a flowchart of the high level synthetic | combination method in Embodiment 4 of this invention. 従来の高位合成方法のフローチャートである。It is a flowchart of the conventional high-level synthesis method. 配列値から最大値を求める動作記述例を示した図である。It is the figure which showed the example of operation | movement description which calculates | requires the maximum value from an array value.

符号の説明Explanation of symbols

100、200 高位合成装置
111 動作記述
112 RTL記述
113 中間データ
121 動作記述入力部
122 中間データ変形部
123 RTL記述出力部
201 制約設定部
100, 200 High-level synthesis device 111 Behavior description 112 RTL description 113 Intermediate data 121 Behavior description input unit 122 Intermediate data transformation unit 123 RTL description output unit 201 Constraint setting unit

Claims (13)

プログラミング言語で記述された動作記述からレジスタ転送レベルの回路記述を生成する高位合成方法であって、
前記動作記述から、演算をノードで示し、かつデータの流れをエッジで示すデータフローグラフを含む中間データを生成するステップと、
生成された前記中間データに含まれる前記データフローグラフを構成する部分グラフの中から、予め定義された参照グラフに一致する部分グラフを検出するグラフ検出ステップと、
検出された前記部分グラフの各々について、当該部分グラフをノードとして代表するクラスタを生成するクラスタ生成ステップと、
生成された前記クラスタが連続して接続されているクラスタグラフを抽出するステップと、
抽出された前記クラスタグラフのグラフ高さが小さくなるように前記クラスタグラフを変形し、当該変形を前記データフローグラフに反映させるデータフローグラフ高さ削減ステップと、
グラフ高さが削減された前記データフローグラフを含む前記中間データからレジスタ転送レベルの回路記述を生成するステップと
を含むことを特徴とする高位合成方法。
A high-level synthesis method for generating a register transfer level circuit description from an operation description described in a programming language,
Generating intermediate data including a data flow graph indicating operations by nodes and data flows by edges from the behavior description;
A graph detection step of detecting a subgraph that matches a predefined reference graph from among the subgraphs constituting the data flow graph included in the generated intermediate data;
For each of the detected subgraphs, a cluster generation step of generating a cluster that represents the subgraph as a node;
Extracting a cluster graph in which the generated clusters are continuously connected;
A step of reducing the data flow graph height that deforms the cluster graph so that the graph height of the extracted cluster graph is reduced, and reflects the deformation in the data flow graph;
Generating a circuit description of a register transfer level from the intermediate data including the data flow graph with a reduced graph height.
前記参照グラフは、2入力1出力のグラフであり、かつ、当該参照グラフを1つのノードとみなした場合に、当該ノードが示す演算は、結合則又は分配則を満たす
ことを特徴とする請求項1記載の高位合成方法。
The reference graph is a graph of two inputs and one output, and when the reference graph is regarded as one node, an operation indicated by the node satisfies a combination rule or a distribution rule. The high level synthesis method according to 1.
前記参照グラフは、2n入力n出力(nは自然数)のグラフであり、
前記参照グラフの入力及び出力をそれぞれn個ずつグループ化して、2入力1出力のグラフとし、各前記2入力1出力のグラフを1つのノードとみなした場合に、当該ノードが示す演算は、結合則又は分配則を満たす
ことを特徴とする請求項1記載の高位合成方法。
The reference graph is a graph of 2n inputs and n outputs (n is a natural number),
When the input and output of the reference graph are grouped by n to form a 2-input 1-output graph, and each 2-input 1-output graph is regarded as one node, the operation indicated by the node is combined. The high-level synthesis method according to claim 1, wherein a high-level synthesis method is satisfied.
前記データフローグラフ高さ削減ステップでは、前記クラスタグラフに対して、結合則又は分配則に基づいた変形を施す
ことを特徴とする請求項2又は請求項3記載の高位合成方法。
The high-level synthesis method according to claim 2 or 3, wherein, in the data flow graph height reduction step, the cluster graph is modified based on a coupling rule or a distribution rule.
前記データフローグラフ高さ削減ステップは、
前記クラスタグラフの変形後の構造を示す変形構造を、遅延値及び面積の少なくとも1つの変形制約に基づいて決定する変形構造決定ステップと、
決定された変形構造に従って、前記クラスタグラフを変形し、当該変形を前記データフローグラフに反映させる変形ステップとを
含むことを特徴とする請求項1記載の高位合成方法。
The data flow graph height reduction step includes:
A deformed structure determining step for determining a deformed structure indicating a deformed structure of the cluster graph based on at least one deformation constraint of a delay value and an area;
The high-level synthesis method according to claim 1, further comprising: a deformation step of deforming the cluster graph according to the determined deformation structure and reflecting the deformation in the data flow graph.
前記グラフ検出ステップでは、生成された前記中間データに含まれる前記データフローグラフを構成する部分グラフの中から、2つの入力のうち大きい値又は小さい値を出力する処理を示す参照グラフに一致する部分グラフを検出し、
前記変形ステップでは、2つ以上の入力から任意の2入力を総当りで比較して、前記2つ以上の入力の最大値又は最小値を選択する処理を示すグラフである総当り比較選択グラフを1つ以上含む構造に前記クラスタグラフを変形し、
前記変形構造を表す情報は、各総当り比較選択グラフの入力数と、総当り比較選択グラフ間の接続関係とを含む
ことを特徴とする請求項5記載の高位合成方法。
In the graph detection step, a portion that matches a reference graph indicating a process of outputting a large value or a small value of two inputs from among the partial graphs constituting the data flow graph included in the generated intermediate data Detect the graph,
In the transformation step, a brute force comparison selection graph, which is a graph showing a process of comparing any two inputs from two or more inputs with a brute force and selecting the maximum value or the minimum value of the two or more inputs, Transforming the cluster graph into a structure containing one or more,
6. The high-level synthesis method according to claim 5, wherein the information representing the deformation structure includes the number of inputs of each brute force comparison selection graph and a connection relationship between the brute force comparison selection graphs.
前記変形制約は、設定ファイルによる指定、前記動作記述に含まれるプラグマによる指定及びGUI(Graphical User Interface)による指定の少なくとも1つ以上の方法によって予め定義されている
ことを特徴とする請求項5又は請求項6記載の高位合成方法。
6. The deformation constraint is defined in advance by at least one of a method specified by a setting file, a specification by a pragma included in the behavioral description, and a specification by a GUI (Graphical User Interface). The high-level synthesis method according to claim 6.
前記変形構造決定ステップでは、予め定義された動作周期又は動作周波数に基づいてスケジューリングを行い、スケジューリング結果から前記変形制約を求める
ことを特徴とする請求項5又は請求項6記載の高位合成方法。
7. The high-level synthesis method according to claim 5, wherein, in the deformation structure determination step, scheduling is performed based on a predefined operation cycle or operation frequency, and the deformation constraint is obtained from a scheduling result.
前記変形構造決定ステップでは、
前記スケジューリング結果から前記クラスタグラフがクリティカルパス上にあるか否かを判別し、前記クリティカルパス上にある場合には、変形構造が決定可能な最小遅延値を前記変形制約に設定し、前記クリティカルパス上にない場合は、変形構造が決定可能な最小面積を前記変形制約に設定する
ことを特徴とする請求項8記載の高位合成方法。
In the deformation structure determination step,
It is determined whether the cluster graph is on a critical path from the scheduling result. If the cluster graph is on the critical path, a minimum delay value that can determine a deformation structure is set in the deformation constraint, and the critical path 9. The high-level synthesis method according to claim 8, wherein if it is not above, a minimum area where a deformation structure can be determined is set as the deformation constraint.
前記データフローグラフ高さ削減ステップでは、前記変形構造決定ステップと、前記変形ステップとを、前記変形ステップにおける前記クラスタグラフの変形がなくなるまで繰返す
ことを特徴とする請求項5記載の高位合成方法。
6. The high-level synthesis method according to claim 5, wherein, in the data flow graph height reduction step, the deformation structure determination step and the deformation step are repeated until there is no deformation of the cluster graph in the deformation step.
プログラミング言語で記述された動作記述からレジスタ転送レベルの回路記述を生成する高位合成装置であって、
複数の値から最大値又は最小値を選択する機能を含む動作記述の入力を受け付ける動作記述入力手段と、
前記動作記述で示される選択順序とは異なる順序で値を選択することにより前記複数の値から最大値又は最小値を選択する回路を含むレジスタ転送レベルの回路記述を出力するRTL記述出力手段と
を備えることを特徴とする高位合成装置。
A high-level synthesis device that generates a circuit description at a register transfer level from an operation description described in a programming language,
An operation description input means for receiving an operation description including a function for selecting a maximum value or a minimum value from a plurality of values;
RTL description output means for outputting a circuit description of a register transfer level including a circuit for selecting a maximum value or a minimum value from the plurality of values by selecting values in an order different from the selection order indicated in the operation description. A high-level synthesis apparatus comprising:
前記動作記述入力手段は、さらに、前記動作記述から、演算をノードで示しかつデータの流れをエッジで示すデータフローグラフを含む中間データを生成し、
前記高位合成装置は、さらに、
前記複数の値から最大値又は最小値を選択する機能を含む動作記述に対する変形制約を設定する制約設定手段と、
前記制約設定手段において設定された前記変形制約を満たすようにデータフローグラフを変形する中間データ変形手段とを備え、
前記RTL記述出力手段は、変形後の前記データフローグラフより、前記動作記述で示される選択順序とは異なる順序で値を選択することにより前記複数の値から最大値又は最小値を選択する回路を含むレジスタ転送レベルの回路記述を生成し、出力する
ことを特徴とする請求項11記載の高位合成装置。
The behavior description input means further generates, from the behavior description, intermediate data including a data flow graph indicating operations by nodes and data flow by edges,
The high-level synthesis apparatus further includes:
Constraint setting means for setting a deformation constraint for a behavioral description including a function of selecting a maximum value or a minimum value from the plurality of values;
Intermediate data deformation means for deforming a data flow graph so as to satisfy the deformation constraint set in the constraint setting means,
The RTL description output means includes a circuit that selects a maximum value or a minimum value from the plurality of values by selecting values from the modified data flow graph in an order different from the selection order indicated by the behavioral description. The high-level synthesis apparatus according to claim 11, wherein a circuit description including a register transfer level is generated and output.
プログラミング言語で記述された動作記述からレジスタ転送レベルの回路記述を生成するプログラムであって、
前記動作記述から、演算をノードで示し、かつデータの流れをエッジで示すデータフローグラフを含む中間データを生成するステップと、
生成された前記中間データに含まれる前記データフローグラフを構成する部分グラフの中から、予め定義された参照グラフに一致する部分グラフを検出するグラフ検出ステップと、
検出された前記部分グラフの各々について、当該部分グラフをノードとして代表するクラスタを生成するクラスタ生成ステップと、
生成された前記クラスタが連続して接続されているクラスタグラフを抽出するステップと、
抽出された前記クラスタグラフのグラフ高さが小さくなるように前記クラスタグラフを変形し、当該変形を前記データフローグラフに反映させるデータフローグラフ高さ削減ステップと、
グラフ高さが削減された前記データフローグラフを含む前記中間データからレジスタ転送レベルの回路記述を生成するステップと
をコンピュータに実行させるためのプログラム。
A program for generating a register transfer level circuit description from an operation description described in a programming language,
Generating intermediate data including a data flow graph indicating operations by nodes and data flows by edges from the behavior description;
A graph detection step of detecting a subgraph that matches a predefined reference graph from among the subgraphs constituting the data flow graph included in the generated intermediate data;
For each of the detected subgraphs, a cluster generation step of generating a cluster that represents the subgraph as a node;
Extracting a cluster graph in which the generated clusters are continuously connected;
A step of reducing the data flow graph height that deforms the cluster graph so that the graph height of the extracted cluster graph is reduced, and reflects the deformation in the data flow graph;
Generating a circuit description of a register transfer level from the intermediate data including the data flow graph in which the graph height is reduced.
JP2008007298A 2008-01-16 2008-01-16 High-level synthesis method, high-level synthesis device, and program Pending JP2009169694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008007298A JP2009169694A (en) 2008-01-16 2008-01-16 High-level synthesis method, high-level synthesis device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008007298A JP2009169694A (en) 2008-01-16 2008-01-16 High-level synthesis method, high-level synthesis device, and program

Publications (1)

Publication Number Publication Date
JP2009169694A true JP2009169694A (en) 2009-07-30

Family

ID=40970782

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008007298A Pending JP2009169694A (en) 2008-01-16 2008-01-16 High-level synthesis method, high-level synthesis device, and program

Country Status (1)

Country Link
JP (1) JP2009169694A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8856766B2 (en) 2012-05-11 2014-10-07 International Business Machines Corporation Generating layouts for graphs of data flow applications
JP2015197883A (en) * 2014-04-03 2015-11-09 三菱電機株式会社 circuit design support device and circuit design support program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8856766B2 (en) 2012-05-11 2014-10-07 International Business Machines Corporation Generating layouts for graphs of data flow applications
JP2015197883A (en) * 2014-04-03 2015-11-09 三菱電機株式会社 circuit design support device and circuit design support program

Similar Documents

Publication Publication Date Title
US20160275213A1 (en) Behavioral synthesis method, behavioral synthesis device and computer readable recording medium storing behavioral synthesis program
US8589837B1 (en) Constructing inductive counterexamples in a multi-algorithm verification framework
US8037435B1 (en) Directed design space exploration
US9201996B2 (en) Behavioral synthesis apparatus, behavioral synthesis method, data processing system including behavioral synthesis apparatus, and non-transitory computer readable medium storing behavioral synthesis program
JP2007034887A (en) Method and apparatus for automatically creating shift register file for high-level synthesis compiler
Zervakis et al. VADER: Voltage-driven netlist pruning for cross-layer approximate arithmetic circuits
US8117577B1 (en) Determining timing paths within a circuit block of a programmable integrated circuit
US7441212B1 (en) State machine recognition and optimization
CN105446952A (en) Method and system for processing semantic fragments
Hua et al. Cyclone: A static timing and power engine for asynchronous circuits
US10073944B2 (en) Clock tree synthesis based on computing critical clock latency probabilities
US8127259B2 (en) Synthesis constraint creating device, behavioral synthesis device, synthesis constraint creating method and recording medium
JP2009169694A (en) High-level synthesis method, high-level synthesis device, and program
Chin et al. Towards scalable FPGA CAD through architecture
Cong et al. Logic synthesis for better than worst-case designs
Mahzoon et al. Polynomial formal verification of general tree-like circuits
US10430540B1 (en) Processing a block diagram circuit design into an efficient high-level language representation
JP4702357B2 (en) Method, apparatus, and program for verifying equivalence between behavior level description and register transfer level description
JPH096821A (en) Composing method for logic circuit, manufacture of semiconductor device, an optimizing method for bisect determination graph
Thillai Rani et al. Recurrent deep neural learning classification algorithm based high level synthesis in VLSI circuit with runtime adaptability
JP6305644B2 (en) Architecture generation apparatus and architecture generation program
Jozwiak et al. Hardware synthesis for reconfigurable heterogeneous pipelined accelerators
US8499273B1 (en) Systems and methods for optimizing placement and routing
JP5262678B2 (en) Behavioral synthesis system, behavioral synthesis method, and behavioral synthesis program
JP6317603B2 (en) Information processing apparatus, information processing apparatus control method, and program