Main Content

このページは機械翻訳を使用して翻訳されました。元の英語を参照するには、ここをクリックします。

アーキテクチャ、動作、回路ドメインにおけるスタンドアロンCTLEの検証

この例では、ツールの自動化を通じて基礎となるモデルの同期を維持しながら、複数の設計ドメインで連続時間線形イコライザー (CTLE) をシミュレートします。Simulink® アーキテクチャ モデルは、望ましいアナログ回路の動作の高レベル仕様として機能します。HDL Verifier™ を使用して、スタンドアロン CTLE モデルを SystemVerilog 動作モデルにエクスポートします。エクスポートされたモデルを使用すると、アナログ回路を設計する前に、アナログ キャリブレーションのための早期のデジタル制御開発が可能になります。CTLE の回路実装は、アナログ シミュレーションを使用して (オフラインで) 特性評価されます。特性評価の結果は、建築モデルにフィードバックされます。これにより、仕様ベースの Simulink モデルが回路表現モデルに変換されます。この例では、CTLE の仕様と回路を代表するモデルの両方が提供されています。HDL Verifier を使用して SystemVerilog 動作モデルを再生成します。このモデルは、仕様ベースの SystemVerilog モデルを回路を表す SystemVerilog モデルに変換し、混合信号検証に使用できます。この自動化により、アーキテクチャ、動作、回路モデルの同期が維持されます。

はじめにと動機

この例では、スタンドアロン SerDes Toolbox™ CTLE の SystemVerilog 動作エクスポート フローを示します。CTLE は、アナログベース (図 1(a)) と ADC ベース SerDes (図 1(b)) の両方に共通するアナログ ブロックです。CTLE は、チャネル損失を部分的または完全に均等化するアナログ ハイパス フィルタです。また、後続のイコライザー ステージのために、チャネルから取得した信号を調整します。SerDes 規格によっては、CTLE はデジタル制御を使用して低周波信号成分の減衰を設定できる調整可能なフィルタになる場合があります。回路の複雑さが増すものの、さらなる CTLE チューニング機能をサポートする実装も可能です。

(a) An analog-based SerDes receiver that consists of custom analog blocks, mixed-signal blocks (DFE), and custom digital blocks(1:16 demultiplexer), and synthesized digital in the form of the CDR.

(b) An analog-based SerDes receiver that consists of custom analog blocks (CTLE &VCO), mixed-signal blocks (ADC), custom digital blocks (4:64 demultiplexer), and synthesized digital (FFE, DFE, and CDR).

図 1 – アナログベースの SerDes レシーバー (a) は、カスタム アナログ ブロック (CTLE および VCO)、ミックスド シグナル ブロック (DFE)、カスタム デジタル ブロック (1:16 デマルチプレクサ)、および CDR 形式の合成デジタルで構成されます。ADC ベースの SerDes レシーバー (b) は、カスタム アナログ ブロック (CTLE および VCO)、ミックスド シグナル ブロック (ADC)、カスタム デジタル ブロック (4:64 デマルチプレクサ)、および合成デジタル (FFE、DFE、および CDR) で構成されます。どちらの場合も、ブロックは連携してチャネル損失を均等化し、送信されたデータを回復します。どちらのトポロジでも、CTLE を使用して、受信機ベースの初期チャネル イコライゼーションと、後続のイコライゼーション ステージの入力信号調整を実行します。

動作 SystemVerilog モデルは、アナログ回路と相互作用するデジタル回路の開発およびテスト中に、アナログ機能の代替としてミックスドシグナル設計で使用されます。通常、これらのアナログ動作モデルは、アナログ設計が成熟した後、回路の動作を反映するためにアナログまたはデジタル設計者によって手動でコーディングされます。ただし、SerDes 設計の場合、CTLE の望ましい動作は、高レベルのシステム モデルから派生したアナログ設計仕様の形式で、アナログ回路設計の開始前に決定されます。アナログ動作モデルへの早期アクセスは、ミックス信号検証の取り組みを左にシフトするための重要な実現要因です。

この例では、まず、CTLE アナログ設計仕様を反映するように構成されたスタンドアロンの SerDes Toolbox CTLE Simulink モデルに基づいて、CTLE の SystemVerilog モデルを生成します。次に、Simulink と Verilog シミュレーションを使用して、CTLE モデルのオープン ループ動作の同等性を実証します。次に、SystemVerilog モデルがデジタル回路の設計と検証にどのように役立つかを示します。最後に、Simulink CTLE は測定されたアナログ回路データで更新され、結果として得られた SystemVerilog モデルは SystemVerilog エクスポート フローを変更せずに再エクスポートされます。

Simulink モデルから DPI 動作モデルを生成する

Simulink アーキテクチャモデルを調べる

プロジェクトでは、Simulink 仕様ベースの CTLE モデル spec_CTLE.slx が開きます。

openProject('standalone_ctle_proj');
open_system('spec_CTLE');

spec_CTLE_model.png

図 2 – Simulink ベースの CTLE テストベンチ。CTLE をテストするために、ステップ応答と PRBS ジェネレーターの 2 つの入力ソースが提供されています。

図 2 に示す Simulink モデルは、手動で選択可能な 2 つの刺激 (ステップ入力と PRBS シーケンス ジェネレーター) で構成されています。CTLE モデルは実用的な CTLE の簡略化されたバージョンです。したがって、仕様ベースの CTLE モデルには、高周波数から低周波数 (ブースト) のゲインを設定するための制御ポートが 1 つだけあります。

open_system('spec_CTLE/CTLE_core')

(a) Fig3a_TunableCTLE.png (b) spec_CTLE_core_model.png

図 3 – (a) 調整可能な CTLE は、(b) AC (小信号) 周波数ベースの応答と DC (大信号) 電圧ベースの応答を使用してモデル化されています。

仕様ベースの高周波ブーストのみの CTLE (図 3(a)) は、図 3(b) に示すように、小信号 (AC) 応答と大信号 (DC) 応答の直列組み合わせを使用してモデル化されます。CTLE の周波数領域の動作は、CTLE System object™ にカプセル化されている AC 応答によってキャプチャされます。飽和アンプ System object は、DC 応答、つまり大振幅飽和 (制限) をキャプチャします。

CTLE System object をダブルクリックすると、図 4(a) に示す CTLE ダイアログ ボックスが開きます。仕様ベースのCTLEは、図4(b)の振幅/位相周波数応答に示すように、20GHzでピークゲインを持ち、ピークゲイン範囲は1dBステップで0~20dBになるように構成されています。

open_system('spec_CTLE/CTLE_core/AC Response')

(a) spec_CTLE_dialog.png (b) spec_CTLE_TF.png

図 4 – (a) 仕様ベースの CTLE モデルに使用される構成を示す SerDes Toolbox CTLE System object ブロック パラメータ ダイアログ ボックス:20GHz のピーク周波数と 1dB ステップで 0~20dB のピークゲイン。(b) CTLE の周波数応答曲線。

大信号 DC 応答は、回路要素の予想される制限された電圧振幅をモデル化し、パススルー ゲインが 1 の飽和増幅器を使用してモデル化されます。飽和増幅器をダブルクリックすると、図5(a)に示すダイアログウィンドウが表示されます。飽和増幅器は、ゲインが 1、電圧制限が +/- 0.4V になるように構成されています。結果の応答は、「応答の視覚化」ボタンを使用して視覚化することができ、図 5(b) に示されています。

open_system('spec_CTLE/CTLE_core/DC Response')

(a) spec_CTLE_sat_dialog.png (b) spec_CTLE_sat_TF.png

図 5 – (a) SerDes Toolbox 飽和増幅器 System object ブロック パラメータ ダイアログ ボックス。仕様ベースの CTLE モデルに使用される構成を示しています。線形入力振幅は 0.4VPEAK に制限されています。 (b) 飽和増幅器の電圧入力/出力伝達特性。圧縮曲線と振幅は -0.4 ~ +0.4V に制限されています。

異なるブースト値で建築モデルをシミュレートする

提供されているスクリプト ctle_run_sl_sims を使用して、Simulink で CTLE ブースト応答をシミュレートします。図 6a と図 6b は、ブースト設定 0、10、19 を使用したステップおよび PRBS シーケンスの予想される出力を示しています。これは、0、10dB、19dB の高周波ブーストに相当します。ブースト設定を大きくすると、入力ステップの低周波成分が予想どおり大幅に減衰することに注意してください。

% First, choose the model to simulate
current_model = 'spec_CTLE' %#ok<*NASGU>
current_model = 
'spec_CTLE'
% Run sim and plot results using step source
ctle_run_sl_sims
ctle_plot_sl_sims

図 6a – 異なるブースト設定で構成された CTLE のキャプチャされたステップ入力および出力波形:0、10、19dBのDC減衰。

信号ソースを PRBS に変更して再実行します。

% Change source to a pseudorandom binary sequence and rerun and replot
open_system('spec_CTLE/input_switch') % toggle to PRBS
ctle_run_sl_sims
ctle_plot_sl_sims

図 6b – 異なるブースト設定で構成された CTLE のキャプチャされた PRBS 入力および出力波形。

CTLE を SystemVerilog 動作モデルにエクスポートする

図 2 に示す Simulink モデルで CTLE_core モデルを選択し、提供されている事前構成済みのエクスポート可能な Simulink モデルを使用して CTLE モデルの SystemVerilog ビューを作成します。次に、HDL Verifier タブを開き、以下に示すように、DPI コンポーネントの生成 ボタンを押します。

または、コマンド ラインを使用して DPI コンポーネントを生成します。

% Build a SystemVerilog DPI component from the CTLE_core subsystem.
slbuild('spec_CTLE/CTLE_core')
### Starting build procedure for model: CTLE_core
### Generated code for 'CTLE_core' is up to date because no structural, parameter or code replacement library changes were found.
### Starting SystemVerilog DPI Component Generation
### Successful completion of build procedure for model: CTLE_core

Build Summary

Top model targets built:

Model      Action          Rebuild Reason                           
====================================================================
CTLE_core  Code compiled.  Compilation artifacts were out of date.  

1 of 1 models built (0 models already up to date)
Build duration: 0h 0m 53.767s

System Verilog エクスポート用に MATLAB® または Simulink ベースのモデルを構成する方法の詳細については、MATLAB ベースの SystemVerilog DPI 生成を始める および SystemVerilog DPI コンポーネント生成を始める を参照してください。

アナログ CTLE は差動回路を使用して実装される可能性が高いため、CTLE への入力と出力は差動信号ですが、アーキテクチャ モデルでは、飽和増幅器を介した電圧ヘッドルーム制限差動振幅を考慮する以外は、Simulink CTLE モデルと同様に回路の差動特性が抽象化されている可能性があります。さらに、アナログ CTLE 実装には、入力オフセット補償などのキャリブレーション回路も組み込まれる場合があります。

したがって、エクスポートされた Simulink (アーキテクチャ) モデルは、完全な CTLE 動作モデルの中核として機能します。入力/出力形式の変換を行うには、アーキテクチャ モデル コア (青いボックス) の前後に、差動からシングルエンド、およびシングルエンドから差動への変換が必要です。これは、提供されている Verilog CTLE 動作モデル ラッパー hdl_rtl/ctle.v 内で実行されます。CTLE 動作モデルでは、適用される入力参照ノイズの量を制御することもできます。

差動アナログ回路では有限入力オフセットは避けられず、製造後に補正する必要があります。図 7 のアーキテクチャ コア モデルの周囲のフィードバックに、単純な入力オフセット補償回路が示されています。クロックコンパレータ、デジタルキャリブレーションエンジン、デジタル-アナログコンバータ (DAC) で構成されています。

Fig7_CTLEBehavioralModel.png

図 7 – SystemVerilog CTLE 動作モデルのブロック図。コア アナログ機能 (青いボックス) は、アーキテクチャ Simulink モデルから直接エクスポートされます。再利用可能な SystemVerilog ハーネス (緑のボックス) は、動作モデルとアーキテクチャ モデル間のインターフェイスを提供し、アーキテクチャ モデルには存在しない (または必要のない) 追加のサポート システム (クロック コンパレータ、デジタル キャリブレーション エンジン、DAC) も取り込みます。

図 8 にブロック図を示すデジタル キャリブレーション エンジンは、RTL Verilog を使用して実装され、hdl_rtl/ctle_cm_cal.v の例の一部として提供されています。

Fig8_DigitalOffsetCalibration.png

図8 - デジタルオフセットキャリブレーションエンジン。有効にすると、サンプリングされた(高/低)CTLE 差動出力は、N ビットのアップ/ダウン カウンタを使用してデジタル的に統合されます。カウンターの上位 M ビットは DAC を駆動するために使用され、CTLE に一定の DC オフセットを提供し、それによって固有のオフセットを補正します。

SystemVerilog で動作モデルをシミュレートする

ブースト設定 0、10、19dB の一連のテストを実行するには、提供されている ctle_run_cases スクリプトを使用します。このスクリプトは、まず BOOST_VAL 設定を使用して Simulink シミュレーションを実行し、入力データと出力データを BOOST_VAL インデックス付きログ ファイルに保存します。次に、同じ BOOST_VAL 設定を使用して Verilog シミュレーションが実行されます。Verilog シミュレーションは、Simulink シミュレーションに使用される入力波形を読み取り、それを Verilog シミュレータの SystemVerilog モデルに適用します。提供されている CTLE テストベンチは、Verilog シミュレーション実行のテキスト ログ ファイルも作成します。ファイルの名前は、使用されるブースト設定に応じて付けられます (例: BOOST_VAL=0 の場合は verilog_out_b00.log)。データは緑色のボックス(図 7 の境界を参照)で記録されることに注意してください。したがって、個々のシングルエンド信号が保存されます。このファイルの内容は、MATLAB 環境に読み戻して、ctle_plot_cases スクリプトを使用して付随する Simulink 出力に対してプロットすることができます。また、GTKWaves などを使用して、MATLAB の外部で Verilog 結果の生成された標準 VCD ファイルを視覚化することもできることに注意してください。

実行スクリプトはさまざまな HDL シミュレータをサポートします。シミュレータ用のパスとその他の環境を設定する必要があります。

% This is a MathWorks-specific setup. You must assign PATH and
% other settings specific to your environment for your chosen simulator.
setup_questa();

HDLシミュレータを選択する

% Uncomment one of the following supported HDL simulator choices:
current_hdl_simulator = 'Questa'; % Windows or Linux
% current_hdl_simulator = 'Xcelium'; % Linux only
% current_hdl_simulator = 'VCS'; % Linux only
% current_hdl_simulator = 'Vivado'; % Linux only
% Run Simulink and HDL sim and plot results comparison
ctle_run_cases
Reading pref.tcl 
 
# 2022.2 
 
# do {scripts\ctle_tb_tran_questa.do} 
# 0 
# Environment BOOST_VAL=0 
# ** Warning: (vlib-34) Library already exists at "work". 
# Errors: 0, Warnings: 1 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:31:07 on Jul 13,2023 
# vlog -sv CTLE_core_build/CTLE_core_dpi.sv  
# -- Compiling module CTLE_core_dpi 
#  
# Top level modules: 
# 	CTLE_core_dpi 
# End time: 19:31:08 on Jul 13,2023, Elapsed time: 0:00:01 
# Errors: 0, Warnings: 0 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:31:08 on Jul 13,2023 
# vlog -sv hdl_rtl/ctle_cm_cal.v hdl_rtl/ctle.v hdl_tb/ctle_tb_tran.v  
# -- Compiling module ctle_cm_cal 
# -- Compiling module ctle 
# -- Compiling module ctle_tb_tran 
#  
# Top level modules: 
# 	ctle_tb_tran 
# End time: 19:31:08 on Jul 13,2023, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# vsim -c -sv_lib CTLE_core_build/CTLE_core_win64 work.ctle_tb_tran "+BOOST_VAL=0"  
# Start time: 19:31:09 on Jul 13,2023 
# ** Note: (vsim-8009) Loading existing optimized design _opt 
# //  Questa Sim-64 
# //  Version 2022.2 win64 Apr 25 2022 
# // 
# //  Copyright 1991-2022 Mentor Graphics Corporation 
# //  All Rights Reserved. 
# // 
# //  QuestaSim and its associated documentation contain trade 
# //  secrets and commercial or financial information that are the property of 
# //  Mentor Graphics Corporation and are privileged, confidential, 
# //  and exempt from disclosure under the Freedom of Information Act, 
# //  5 U.S.C. Section 552. Furthermore, this information 
# //  is prohibited from disclosure under the Trade Secrets Act, 
# //  18 U.S.C. Section 1905. 
# // 
# Loading sv_std.std 
# Loading work.ctle_tb_tran(fast) 
# Loading .\CTLE_core_build/CTLE_core_win64.dll 
# CTLE_TB_TRAN: Running with boost = 0 
# ** Note: $finish    : hdl_tb/ctle_tb_tran.v(52) 
#    Time: 10000476 fs  Iteration: 0  Instance: /ctle_tb_tran 
# End time: 19:31:11 on Jul 13,2023, Elapsed time: 0:00:02 
# Errors: 0, Warnings: 0 
Reading pref.tcl 
 
# 2022.2 
 
# do {scripts\ctle_tb_tran_questa.do} 
# 10 
# Environment BOOST_VAL=10 
# ** Warning: (vlib-34) Library already exists at "work". 
# Errors: 0, Warnings: 1 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:31:21 on Jul 13,2023 
# vlog -sv CTLE_core_build/CTLE_core_dpi.sv  
# -- Compiling module CTLE_core_dpi 
#  
# Top level modules: 
# 	CTLE_core_dpi 
# End time: 19:31:21 on Jul 13,2023, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:31:21 on Jul 13,2023 
# vlog -sv hdl_rtl/ctle_cm_cal.v hdl_rtl/ctle.v hdl_tb/ctle_tb_tran.v  
# -- Compiling module ctle_cm_cal 
# -- Compiling module ctle 
# -- Compiling module ctle_tb_tran 
#  
# Top level modules: 
# 	ctle_tb_tran 
# End time: 19:31:22 on Jul 13,2023, Elapsed time: 0:00:01 
# Errors: 0, Warnings: 0 
# vsim -c -sv_lib CTLE_core_build/CTLE_core_win64 work.ctle_tb_tran "+BOOST_VAL=10"  
# Start time: 19:31:23 on Jul 13,2023 
# ** Note: (vsim-8009) Loading existing optimized design _opt 
# //  Questa Sim-64 
# //  Version 2022.2 win64 Apr 25 2022 
# // 
# //  Copyright 1991-2022 Mentor Graphics Corporation 
# //  All Rights Reserved. 
# // 
# //  QuestaSim and its associated documentation contain trade 
# //  secrets and commercial or financial information that are the property of 
# //  Mentor Graphics Corporation and are privileged, confidential, 
# //  and exempt from disclosure under the Freedom of Information Act, 
# //  5 U.S.C. Section 552. Furthermore, this information 
# //  is prohibited from disclosure under the Trade Secrets Act, 
# //  18 U.S.C. Section 1905. 
# // 
# Loading sv_std.std 
# Loading work.ctle_tb_tran(fast) 
# Loading .\CTLE_core_build/CTLE_core_win64.dll 
# CTLE_TB_TRAN: Running with boost = 10 
# ** Note: $finish    : hdl_tb/ctle_tb_tran.v(52) 
#    Time: 10000476 fs  Iteration: 0  Instance: /ctle_tb_tran 
# End time: 19:31:24 on Jul 13,2023, Elapsed time: 0:00:01 
# Errors: 0, Warnings: 0 
Reading pref.tcl 
 
# 2022.2 
 
# do {scripts\ctle_tb_tran_questa.do} 
# 19 
# Environment BOOST_VAL=19 
# ** Warning: (vlib-34) Library already exists at "work". 
# Errors: 0, Warnings: 1 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:31:34 on Jul 13,2023 
# vlog -sv CTLE_core_build/CTLE_core_dpi.sv  
# -- Compiling module CTLE_core_dpi 
#  
# Top level modules: 
# 	CTLE_core_dpi 
# End time: 19:31:35 on Jul 13,2023, Elapsed time: 0:00:01 
# Errors: 0, Warnings: 0 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:31:35 on Jul 13,2023 
# vlog -sv hdl_rtl/ctle_cm_cal.v hdl_rtl/ctle.v hdl_tb/ctle_tb_tran.v  
# -- Compiling module ctle_cm_cal 
# -- Compiling module ctle 
# -- Compiling module ctle_tb_tran 
#  
# Top level modules: 
# 	ctle_tb_tran 
# End time: 19:31:35 on Jul 13,2023, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# vsim -c -sv_lib CTLE_core_build/CTLE_core_win64 work.ctle_tb_tran "+BOOST_VAL=19"  
# Start time: 19:31:36 on Jul 13,2023 
# ** Note: (vsim-8009) Loading existing optimized design _opt 
# //  Questa Sim-64 
# //  Version 2022.2 win64 Apr 25 2022 
# // 
# //  Copyright 1991-2022 Mentor Graphics Corporation 
# //  All Rights Reserved. 
# // 
# //  QuestaSim and its associated documentation contain trade 
# //  secrets and commercial or financial information that are the property of 
# //  Mentor Graphics Corporation and are privileged, confidential, 
# //  and exempt from disclosure under the Freedom of Information Act, 
# //  5 U.S.C. Section 552. Furthermore, this information 
# //  is prohibited from disclosure under the Trade Secrets Act, 
# //  18 U.S.C. Section 1905. 
# // 
# Loading sv_std.std 
# Loading work.ctle_tb_tran(fast) 
# Loading .\CTLE_core_build/CTLE_core_win64.dll 
# CTLE_TB_TRAN: Running with boost = 19 
# ** Note: $finish    : hdl_tb/ctle_tb_tran.v(52) 
#    Time: 10000476 fs  Iteration: 0  Instance: /ctle_tb_tran 
# End time: 19:31:38 on Jul 13,2023, Elapsed time: 0:00:02 
# Errors: 0, Warnings: 0 
ctle_plot_cases

図 10 – さまざまなブースト値に対する Simulink と Verilog CTLE 出力波形の比較。

Verilog で閉ループ動作を検証する

これまでのところ、この例では、Simulink と Verilog の CTLE 動作モデルのオープン ループ (パス経由) 動作が一致することが示されました。ただし、図 7 に示されているように、動作 CTLE モデルは、ミックスドシグナル システム、特にデジタル サブシステムと閉ループ内のアナログ システムとの相互作用の開発とテストに使用する場合に強みを発揮します。

実用的な CTLE 実装で予想される非ゼロ入力参照オフセットと、ランダムな入力参照オフセットを除去するために必要なオフセット キャリブレーション回路については既に説明しました。このセクションでは、CTLE の動作モデルを使用して、図 8 に示すデジタル オフセット キャリブレーション エンジンの機能を検証します。このキャリブレーション エンジンは、図 7 に示すように、クロック コンパレータと DAC を備えた閉ループになっています。クロック コンパレータと DAC は両方とも、提供されている CTLE Verilog 動作モデル (hdl_rtl/ctle.v) 内でインラインでモデル化されていますが、これらのブロックは、この例で説明されているフローを使用して、エクスポートされた SystemVerilog アナログ動作モデルとしてモデル化することもできます。一方、図 8 に示すデジタル コントローラは、hdl_rtl/ctle_cm_cal.v によって提供される合成可能な RTL を使用して実装されています。

% Open these Verilog source files in the editor for examination.
edit hdl_tb/ctle_tb_offcomp.v
edit hdl_rtl/ctle.v
edit hdl_rtl/ctle_cm_cal.v

1. オフセット補償器のテストベンチhdl_tb/ctle_tb_offcomp.vを確認し、次の点に注意してください。

  • CTLE 入力 (inp および inm) はコモン モード (cm) に接続され、0V 差動入力が提供されます。

  • リセット後すぐにコモンモードキャリブレーションブロックが有効になります(cm_cal_en)。

  • 非同期クロック ジェネレーターは、その周波数を async_freq パラメーターで設定でき、デジタル キャリブレーション エンジンとクロック コンパレーターのクロックを生成します。オフセットはDC特性であるため、キャリブレーションを完了するために必要な時間以外に、サンプリングクロックに特定の周波数制約はありません。

2. CTLE オフセット キャリブレーション エンジン hdl_rtl/ctle_cm_cal.v を検査し、それが hdl_rtl/ctle.v 内でどのように使用されるかを調べます。実装上の問題はありますか?

3. ctle_run_offset_cals スクリプトを使用して、CTLE ブーストの 3 つの異なる定義済み設定を使用して、CTLE オフセット補正テストベンチをシミュレートします。

4. ctle_plot_offset_cals スクリプトを使用して、シミュレーション実行の結果のログ波形をプロットします。結果の波形を図12に示します。Verilog テストベンチは、標準のデジタル デバッグ ツールを使用して内部を検査できる VCD ファイルも生成することに注意してください。

% Run offset calibration Verilog testbench and plot results in MATLAB
ctle_run_offset_cals
Reading pref.tcl 
 
# 2022.2 
 
# do {scripts\ctle_tb_offcomp_questa.do} 
# 0 
# Environment BOOST_VAL=0 
# ** Warning: (vlib-34) Library already exists at "work". 
# Errors: 0, Warnings: 1 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:31:48 on Jul 13,2023 
# vlog -sv CTLE_core_build/CTLE_core_dpi.sv  
# -- Compiling module CTLE_core_dpi 
#  
# Top level modules: 
# 	CTLE_core_dpi 
# End time: 19:31:49 on Jul 13,2023, Elapsed time: 0:00:01 
# Errors: 0, Warnings: 0 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:31:49 on Jul 13,2023 
# vlog -sv hdl_rtl/ctle_cm_cal.v hdl_rtl/ctle.v hdl_tb/ctle_tb_offcomp.v  
# -- Compiling module ctle_cm_cal 
# -- Compiling module ctle 
# -- Compiling module ctle_tb_offcomp 
#  
# Top level modules: 
# 	ctle_tb_offcomp 
# End time: 19:31:49 on Jul 13,2023, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# vsim -c -sv_lib CTLE_core_build/CTLE_core_win64 work.ctle_tb_offcomp "+BOOST_VAL=0"  
# Start time: 19:31:50 on Jul 13,2023 
# ** Note: (vsim-8009) Loading existing optimized design _opt1 
# //  Questa Sim-64 
# //  Version 2022.2 win64 Apr 25 2022 
# // 
# //  Copyright 1991-2022 Mentor Graphics Corporation 
# //  All Rights Reserved. 
# // 
# //  QuestaSim and its associated documentation contain trade 
# //  secrets and commercial or financial information that are the property of 
# //  Mentor Graphics Corporation and are privileged, confidential, 
# //  and exempt from disclosure under the Freedom of Information Act, 
# //  5 U.S.C. Section 552. Furthermore, this information 
# //  is prohibited from disclosure under the Trade Secrets Act, 
# //  18 U.S.C. Section 1905. 
# // 
# Loading sv_std.std 
# Loading work.ctle_tb_offcomp(fast) 
# Loading .\CTLE_core_build/CTLE_core_win64.dll 
# CTLE_TB_OFFCOMP: Running with boost = 0 
# ** Note: $finish    : hdl_tb/ctle_tb_offcomp.v(46) 
#    Time: 750 ns  Iteration: 1  Instance: /ctle_tb_offcomp 
# End time: 19:31:56 on Jul 13,2023, Elapsed time: 0:00:06 
# Errors: 0, Warnings: 0 
Reading pref.tcl 
 
# 2022.2 
 
# do {scripts\ctle_tb_offcomp_questa.do} 
# 10 
# Environment BOOST_VAL=10 
# ** Warning: (vlib-34) Library already exists at "work". 
# Errors: 0, Warnings: 1 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:32:05 on Jul 13,2023 
# vlog -sv CTLE_core_build/CTLE_core_dpi.sv  
# -- Compiling module CTLE_core_dpi 
#  
# Top level modules: 
# 	CTLE_core_dpi 
# End time: 19:32:05 on Jul 13,2023, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:32:06 on Jul 13,2023 
# vlog -sv hdl_rtl/ctle_cm_cal.v hdl_rtl/ctle.v hdl_tb/ctle_tb_offcomp.v  
# -- Compiling module ctle_cm_cal 
# -- Compiling module ctle 
# -- Compiling module ctle_tb_offcomp 
#  
# Top level modules: 
# 	ctle_tb_offcomp 
# End time: 19:32:06 on Jul 13,2023, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# vsim -c -sv_lib CTLE_core_build/CTLE_core_win64 work.ctle_tb_offcomp "+BOOST_VAL=10"  
# Start time: 19:32:07 on Jul 13,2023 
# ** Note: (vsim-8009) Loading existing optimized design _opt1 
# //  Questa Sim-64 
# //  Version 2022.2 win64 Apr 25 2022 
# // 
# //  Copyright 1991-2022 Mentor Graphics Corporation 
# //  All Rights Reserved. 
# // 
# //  QuestaSim and its associated documentation contain trade 
# //  secrets and commercial or financial information that are the property of 
# //  Mentor Graphics Corporation and are privileged, confidential, 
# //  and exempt from disclosure under the Freedom of Information Act, 
# //  5 U.S.C. Section 552. Furthermore, this information 
# //  is prohibited from disclosure under the Trade Secrets Act, 
# //  18 U.S.C. Section 1905. 
# // 
# Loading sv_std.std 
# Loading work.ctle_tb_offcomp(fast) 
# Loading .\CTLE_core_build/CTLE_core_win64.dll 
# CTLE_TB_OFFCOMP: Running with boost = 10 
# ** Note: $finish    : hdl_tb/ctle_tb_offcomp.v(46) 
#    Time: 750 ns  Iteration: 1  Instance: /ctle_tb_offcomp 
# End time: 19:32:12 on Jul 13,2023, Elapsed time: 0:00:05 
# Errors: 0, Warnings: 0 
Reading pref.tcl 
 
# 2022.2 
 
# do {scripts\ctle_tb_offcomp_questa.do} 
# 19 
# Environment BOOST_VAL=19 
# ** Warning: (vlib-34) Library already exists at "work". 
# Errors: 0, Warnings: 1 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:32:19 on Jul 13,2023 
# vlog -sv CTLE_core_build/CTLE_core_dpi.sv  
# -- Compiling module CTLE_core_dpi 
#  
# Top level modules: 
# 	CTLE_core_dpi 
# End time: 19:32:20 on Jul 13,2023, Elapsed time: 0:00:01 
# Errors: 0, Warnings: 0 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:32:20 on Jul 13,2023 
# vlog -sv hdl_rtl/ctle_cm_cal.v hdl_rtl/ctle.v hdl_tb/ctle_tb_offcomp.v  
# -- Compiling module ctle_cm_cal 
# -- Compiling module ctle 
# -- Compiling module ctle_tb_offcomp 
#  
# Top level modules: 
# 	ctle_tb_offcomp 
# End time: 19:32:20 on Jul 13,2023, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# vsim -c -sv_lib CTLE_core_build/CTLE_core_win64 work.ctle_tb_offcomp "+BOOST_VAL=19"  
# Start time: 19:32:21 on Jul 13,2023 
# ** Note: (vsim-8009) Loading existing optimized design _opt1 
# //  Questa Sim-64 
# //  Version 2022.2 win64 Apr 25 2022 
# // 
# //  Copyright 1991-2022 Mentor Graphics Corporation 
# //  All Rights Reserved. 
# // 
# //  QuestaSim and its associated documentation contain trade 
# //  secrets and commercial or financial information that are the property of 
# //  Mentor Graphics Corporation and are privileged, confidential, 
# //  and exempt from disclosure under the Freedom of Information Act, 
# //  5 U.S.C. Section 552. Furthermore, this information 
# //  is prohibited from disclosure under the Trade Secrets Act, 
# //  18 U.S.C. Section 1905. 
# // 
# Loading sv_std.std 
# Loading work.ctle_tb_offcomp(fast) 
# Loading .\CTLE_core_build/CTLE_core_win64.dll 
# CTLE_TB_OFFCOMP: Running with boost = 19 
# ** Note: $finish    : hdl_tb/ctle_tb_offcomp.v(46) 
#    Time: 750 ns  Iteration: 1  Instance: /ctle_tb_offcomp 
# End time: 19:32:27 on Jul 13,2023, Elapsed time: 0:00:06 
# Errors: 0, Warnings: 0 
ctle_plot_offset_cals

図 12 - CTLE オフセット補正 - 実行失敗。オフセット エンジンが最大の正の値と最小の負の値の間で切り替えを開始するまで、CTLE 出力が暴走していることに注意してください。

オフセット補正システムが意図したとおりに動作していないようです。システムの動作に基づくと、フィードバックの極性が反転しているようです。つまり、統合エンジンが入力サンプルを間違った方向にカウントしています。言い換えると、RTL 実装が壊れているか、アナログとデジタルの接続が正しくありません。

5. 実装ミスを修正するには、hdl_rtl/ctle_cm_cal.vを開いて24行目を

control = control + (en? (sense? -1'sd1: 1'sd1): 1'd0);

のコードを次のように変換します。

control = control + (en? (sense? 1'sd1: -1'sd1): 1'd0);

6. シミュレーションを再実行し、run_offset_cal.m および plot_offset_cal.m スクリプトを再実行して、CTLE 出力がゼロに収束し、制御フィードバックが以下に示すように固定値に落ち着くことを確認します。

% After fixing the Verilog source, rerun the offset calibration Verilog testbench and plot results in MATLAB
% ctle_run_offset_cal
% ctle_plot_offset_cal

spec_cm_fixed.png

図 13 - CTLE オフセット補正 - 正常に実行されました。CTLE 出力がゼロに向かって収束し、オフセット補正制御 (offset_comp) が安定した値に収束していることに注意してください。

アナログシミュレーションベースのCTLEモデル

アナログ回路の設計が完了すると、設計された回路は回路シミュレータを使用して完全に特性評価されます。アナログ シミュレーションの結果を使用して、回路を表す Simulink CTLE モデルを作成します。models/circuit_CTLE.slx で提供されるモデルは、特性評価されたアナログ CTLE を表しており、以前の仕様ベースの CTLE モデルと比較した実装制約による違いを示しています。

open_system('circuit_CTLE')

サポートされているすべてのブースト設定に対して、適切にロードされた CTLE の一連の小信号シミュレーションが実行されました。さらに、サポートされているすべてのブースト設定に対して、CTLE の入力から出力への伝達特性を測定する一連の DC スイープが実行されました。測定された曲線を図14に示します。CTLE の測定された周波数応答を図 14(a) に示します。周波数応答は図 4(b) に示したものとは異なっており、ブースト ピークの幅が広くなっていることに注意してください。DCスイープはCTLEが入力制限されていることを示しており、入力制限の非線形性は図14(b)に示されています。

(a) circuit_CTLE_TF.png (b) circuit_CTLE_sat_TF.png

図 14 - 回路で測定された CTLE (a) ブースト依存のゲインと位相応答、および (b) 入力制限の非線形性。

結果として得られた回路を代表するCTLEモデルを図15に示します。飽和増幅器が CTLE の前にあることに注意してください。

open_system('circuit_CTLE/CTLE_core')

Fig15_UpdatedSimulinkModel.png

図 15 – 回路シミュレーションで更新された CTLE モデル – 非線形性は入力にあり、非線形性と CTLE はシミュレーション結果に基づいていることに注意してください。

結果のモデルは、HDL Verifier ツールストリップを使用して Verilog に再エクスポートできます。CTLE 動作 Verilog ラッパー hdl_rtl/ctle.v を含め、提供されている RTL ファイルのいずれにも変更を加える必要はありません。

% Regenerate the SystemVerilog DPI model using the updated circuit
% representative CTLE.
slbuild('circuit_CTLE/CTLE_core')
### Starting build procedure for model: CTLE_core
### Generated code for 'CTLE_core' is up to date because no structural, parameter or code replacement library changes were found.
### Starting SystemVerilog DPI Component Generation
### Successful completion of build procedure for model: CTLE_core

Build Summary

Top model targets built:

Model      Action          Rebuild Reason                           
====================================================================
CTLE_core  Code compiled.  Compilation artifacts were out of date.  

1 of 1 models built (0 models already up to date)
Build duration: 0h 0m 33.672s
% Resimulate the Simulink and Verilog and compare the results.
current_model = 'circuit_CTLE'; % set model for run script
ctle_run_cases
Reading pref.tcl 
 
# 2022.2 
 
# do {scripts\ctle_tb_tran_questa.do} 
# 0 
# Environment BOOST_VAL=0 
# ** Warning: (vlib-34) Library already exists at "work". 
# Errors: 0, Warnings: 1 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:33:23 on Jul 13,2023 
# vlog -sv CTLE_core_build/CTLE_core_dpi.sv  
# -- Compiling module CTLE_core_dpi 
#  
# Top level modules: 
# 	CTLE_core_dpi 
# End time: 19:33:24 on Jul 13,2023, Elapsed time: 0:00:01 
# Errors: 0, Warnings: 0 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:33:24 on Jul 13,2023 
# vlog -sv hdl_rtl/ctle_cm_cal.v hdl_rtl/ctle.v hdl_tb/ctle_tb_tran.v  
# -- Compiling module ctle_cm_cal 
# -- Compiling module ctle 
# -- Compiling module ctle_tb_tran 
#  
# Top level modules: 
# 	ctle_tb_tran 
# End time: 19:33:24 on Jul 13,2023, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# vsim -c -sv_lib CTLE_core_build/CTLE_core_win64 work.ctle_tb_tran "+BOOST_VAL=0"  
# Start time: 19:33:25 on Jul 13,2023 
# ** Note: (vsim-8009) Loading existing optimized design _opt 
# //  Questa Sim-64 
# //  Version 2022.2 win64 Apr 25 2022 
# // 
# //  Copyright 1991-2022 Mentor Graphics Corporation 
# //  All Rights Reserved. 
# // 
# //  QuestaSim and its associated documentation contain trade 
# //  secrets and commercial or financial information that are the property of 
# //  Mentor Graphics Corporation and are privileged, confidential, 
# //  and exempt from disclosure under the Freedom of Information Act, 
# //  5 U.S.C. Section 552. Furthermore, this information 
# //  is prohibited from disclosure under the Trade Secrets Act, 
# //  18 U.S.C. Section 1905. 
# // 
# Loading sv_std.std 
# Loading work.ctle_tb_tran(fast) 
# Loading .\CTLE_core_build/CTLE_core_win64.dll 
# CTLE_TB_TRAN: Running with boost = 0 
# ** Note: $finish    : hdl_tb/ctle_tb_tran.v(52) 
#    Time: 10000476 fs  Iteration: 0  Instance: /ctle_tb_tran 
# End time: 19:33:27 on Jul 13,2023, Elapsed time: 0:00:02 
# Errors: 0, Warnings: 0 
Reading pref.tcl 
 
# 2022.2 
 
# do {scripts\ctle_tb_tran_questa.do} 
# 10 
# Environment BOOST_VAL=10 
# ** Warning: (vlib-34) Library already exists at "work". 
# Errors: 0, Warnings: 1 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:33:37 on Jul 13,2023 
# vlog -sv CTLE_core_build/CTLE_core_dpi.sv  
# -- Compiling module CTLE_core_dpi 
#  
# Top level modules: 
# 	CTLE_core_dpi 
# End time: 19:33:38 on Jul 13,2023, Elapsed time: 0:00:01 
# Errors: 0, Warnings: 0 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:33:38 on Jul 13,2023 
# vlog -sv hdl_rtl/ctle_cm_cal.v hdl_rtl/ctle.v hdl_tb/ctle_tb_tran.v  
# -- Compiling module ctle_cm_cal 
# -- Compiling module ctle 
# -- Compiling module ctle_tb_tran 
#  
# Top level modules: 
# 	ctle_tb_tran 
# End time: 19:33:38 on Jul 13,2023, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# vsim -c -sv_lib CTLE_core_build/CTLE_core_win64 work.ctle_tb_tran "+BOOST_VAL=10"  
# Start time: 19:33:39 on Jul 13,2023 
# ** Note: (vsim-8009) Loading existing optimized design _opt 
# //  Questa Sim-64 
# //  Version 2022.2 win64 Apr 25 2022 
# // 
# //  Copyright 1991-2022 Mentor Graphics Corporation 
# //  All Rights Reserved. 
# // 
# //  QuestaSim and its associated documentation contain trade 
# //  secrets and commercial or financial information that are the property of 
# //  Mentor Graphics Corporation and are privileged, confidential, 
# //  and exempt from disclosure under the Freedom of Information Act, 
# //  5 U.S.C. Section 552. Furthermore, this information 
# //  is prohibited from disclosure under the Trade Secrets Act, 
# //  18 U.S.C. Section 1905. 
# // 
# Loading sv_std.std 
# Loading work.ctle_tb_tran(fast) 
# Loading .\CTLE_core_build/CTLE_core_win64.dll 
# CTLE_TB_TRAN: Running with boost = 10 
# ** Note: $finish    : hdl_tb/ctle_tb_tran.v(52) 
#    Time: 10000476 fs  Iteration: 0  Instance: /ctle_tb_tran 
# End time: 19:33:40 on Jul 13,2023, Elapsed time: 0:00:01 
# Errors: 0, Warnings: 0 
Reading pref.tcl 
 
# 2022.2 
 
# do {scripts\ctle_tb_tran_questa.do} 
# 19 
# Environment BOOST_VAL=19 
# ** Warning: (vlib-34) Library already exists at "work". 
# Errors: 0, Warnings: 1 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:33:50 on Jul 13,2023 
# vlog -sv CTLE_core_build/CTLE_core_dpi.sv  
# -- Compiling module CTLE_core_dpi 
#  
# Top level modules: 
# 	CTLE_core_dpi 
# End time: 19:33:50 on Jul 13,2023, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# QuestaSim-64 vlog 2022.2 Compiler 2022.04 Apr 25 2022 
# Start time: 19:33:51 on Jul 13,2023 
# vlog -sv hdl_rtl/ctle_cm_cal.v hdl_rtl/ctle.v hdl_tb/ctle_tb_tran.v  
# -- Compiling module ctle_cm_cal 
# -- Compiling module ctle 
# -- Compiling module ctle_tb_tran 
#  
# Top level modules: 
# 	ctle_tb_tran 
# End time: 19:33:51 on Jul 13,2023, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# vsim -c -sv_lib CTLE_core_build/CTLE_core_win64 work.ctle_tb_tran "+BOOST_VAL=19"  
# Start time: 19:33:51 on Jul 13,2023 
# ** Note: (vsim-8009) Loading existing optimized design _opt 
# //  Questa Sim-64 
# //  Version 2022.2 win64 Apr 25 2022 
# // 
# //  Copyright 1991-2022 Mentor Graphics Corporation 
# //  All Rights Reserved. 
# // 
# //  QuestaSim and its associated documentation contain trade 
# //  secrets and commercial or financial information that are the property of 
# //  Mentor Graphics Corporation and are privileged, confidential, 
# //  and exempt from disclosure under the Freedom of Information Act, 
# //  5 U.S.C. Section 552. Furthermore, this information 
# //  is prohibited from disclosure under the Trade Secrets Act, 
# //  18 U.S.C. Section 1905. 
# // 
# Loading sv_std.std 
# Loading work.ctle_tb_tran(fast) 
# Loading .\CTLE_core_build/CTLE_core_win64.dll 
# CTLE_TB_TRAN: Running with boost = 19 
# ** Note: $finish    : hdl_tb/ctle_tb_tran.v(52) 
#    Time: 10000476 fs  Iteration: 0  Instance: /ctle_tb_tran 
# End time: 19:33:53 on Jul 13,2023, Elapsed time: 0:00:02 
# Errors: 0, Warnings: 0 
ctle_plot_cases

図 16 – さまざまなブースト設定の PRBS 波形によって駆動される回路を代表する CTLE の Verilog および Simulink 出力波形。

まとめ

この例では、一般的な SerDes アナログ ブロックである CTLE の SystemVerilog 動作バージョンを生成するために使用されるフローを示しました。SystemVerilog モデルと元の Simulink モデルの相関関係は、シミュレートされた動作を並べて比較することで示されました。初期の SystemVerilog 動作モデルは、CTLE の入力参照オフセットを調整するために使用されるデジタル回路の設計と検証に使用されました。次に、回路シミュレーションから得られたデータを使用して Simulink モデルを更新し、回路を代表するモデルに変換しました。次に、更新された Simulink モデルに基づいて SystemVerilog モデルを再生成することにより、更新された Simulink モデルの動作と一致するように SystemVerilog モデルが更新されました。

参考文献

関連するトピック