Verilog-AMS

Verilog-AMS
パラダイム 構造化プログラミング
型付け 弱い静的型付け
影響を受けた言語 Pascal, C言語,VHDL
拡張子 .va
テンプレートを表示

Verilog-AMSは、アナログ回路とディジタル回路の混在した回路(いわゆるミックスドシグナル)の動作を定義するためのアナログおよびミックスドシグナル拡張(AMS)を含むVerilogハードウェア記述言語の派生語である。

解説

[編集]

これは、Verilog / SystemVerilog / VHDLのイベントベースのシミュレーターループを、アナログ領域の微分方程式を解く連続時間シミュレーターによって拡張したものでありる。アナログイベントはデジタルアクションをトリガーでき、その逆も可能である。 [1]

Verilog-AMS標準は、アナログおよび混合信号システムと集積回路の設計者が、システムとコンポーネントの高レベルの動作記述と構造記述をカプセル化するモジュールを作成して使用できるようにすることを目的として作成された。 [2] [3] [4]

Verilog-AMSは、ミックスドシグナル回路用の業界標準のモデリング言語である。連続時間とイベント駆動型の両方のモデリングセマンティクスを提供しており、アナログ、デジタル、およびアナログ/デジタル混合回路に適している。これは、非常に複雑なアナログ、ミックスドシグナル、およびRF集積回路の検証に適してる。 [5]

VerilogおよびVerilog/AMSは手続き型プログラミング言語ではなく、イベントベースのハードウェア記述言語(HDL)である。そのため、並列アクションとイベントの定義と同期のための洗練された強力な言語機能を提供している。一方、HDLプログラムステートメントで定義された多くのアクションは並行して実行できる(手続き型言語のスレッドやタスクに多少似ているが、よりきめ細かい)。ただし、Verilog / AMSは、シミュレータのVerilog Procedural Interfaceを使用して、ANSI C言語などの手続き型言語と組み合わせることもできる。これにより、テストスイートの実装が容易になり、レガシーコードまたはテストベンチ機器との対話が可能となる。

Verilog-AMS委員会の当初の意図は、アナログとデジタルの両方で単一の言語であったが、合併プロセスの遅れにより、 VerilogがSystemVerilogに進化してIEEEに移行したのに対し、Verilog-AMSはAccelleraのままとなっている。

コード例

[編集]

Verilog / AMSはVerilogデジタルHDLのスーパーセットであるため、デジタルドメインのすべてのステートメントはVerilogと同様に機能する(例を参照)。すべてのアナログパーツはVerilog-Aと同じように機能する。

次のVerilog-AMSのコード例は、デジタル信号によってトリガーされるアナログ処理の例であるDAC。

`include "constants.vams" `include "disciplines.vams" // Simple DAC model module dac_simple(aout, clk, din, vref); 	 	// Parameters 	parameter integer bits = 4 from [1:24]; 	parameter integer td = 1n from[0:inf);  // Processing delay of the DAC 	 	// Define input/output 	input clk, vref; 	input [bits-1:0] din; 	output aout; 		 	//Define port types 	logic clk; 	logic [bits-1:0] din; 	electrical  aout, vref; 	 	// Internal variables 	real aout_new, ref; 	integer i; 	 	// Change signal in the analog part 	analog begin 		@(posedge clk) begin // Change output only for rising clock edge	 			 			aout_new = 0; 			ref = V(vref); 			 			for(i=0; i<bits; i=i+1) begin 				ref = ref/2; 				aout_new = aout_new + ref * din[i]; 			end 		end	 		V(aout) <+ transition(aout_new, td, 5n); // Get a smoother transition when output level changes 	end endmodule 

次のADCモデルは、デジタルブロックでアナログ信号を読み取っている。

`include "constants.vams" `include "disciplines.vams" // Simple ADC model module adc_simple(clk, dout, vref, vin); 	 	// Parameters 	parameter integer bits = 4 from[1:24]; // Number of bits 	parameter integer td = 1 from[0:inf); // Processing delay of the ADC 	 	// Define input/output 	input clk, vin, vref; 	output [bits-1:0] dout; 	 	//Define port types 	electrical vref, vin; 	logic clk; 	reg [bits-1:0] dout; 	 	// Internal variables	 	real ref, sample; 	integer i; 	 	 	initial begin 		dout = 0; 	end  	// Perform sampling in the digital blocks for rising clock edge 	always @(posedge clk) begin 		 		sample = V(vin); 		ref = V(vref); 			 		for(i=0; i<bits; i=i+1) begin 			 			ref = ref/2; 				 			if(sample > ref) begin 				dout[i] <= #(td) 1; 				sample = sample - ref; 			end 			else 				dout[i] <= #(td) 0; 		end 	end endmodule 

See also

[編集]

出典

[編集]
  1. ^ Scheduling semantics are specified in the Verilog/AMS Language Reference Manual, section 8.
  2. ^ Accellera Verilog Analog Mixed-Signal Group, "Overview," http://www.verilog.org/verilog-ams/htmlpages/overview.html
  3. ^ Verilog-AMS Language Reference Manual
  4. ^ The Designer's Guide to Verilog-AMS
  5. ^ Verification of Complex Analog Integrated Circuits Archived October 18, 2006, at the Wayback Machine.

文献

[編集]

外部リンク

[編集]

オープンソース実装

[編集]