2008/12/01(月)[QuartusII][SOPC] DDR SDRAM High Performance Controller

[QuartusII][SOPC] DDR SDRAM High Performance Controller

基本

基本的には,ALTERAから出ているUsers Guide~(External DDR Memory PHY Interface Megafunction User Guide (ALTMEMPHY))file:"altmemphy.pdf"~を参照すれば使い方がわかるはずです.


はまったところ

使用するIPのユーザーズガイドは目を通すべし

DDRcontrollerにおいては,2つの制約ファイルが用意されていました.いろいろと調べる羽目になったけれども,SOPC Builderを純粋に使って幾分には,ユーザーズガイドに沿って作業を進めれば乗り越えられたようです...

具体的には,以下のファイルが生成されます.

<module-name>_phy_ddr_timing.sdc
<module-name>_phy_ddr_pins.tcl
 where <module-name> := SOPC Builder の "module name"に記述した名称

SDCファイルはprojectにTimeingQuestへ渡すように設定が必要です.
tclについては,外部端子設定を行うマクロがついています.v7.2のpicture viewerを元にPin Assignment Editorで設定をしてしまったので,使用感は今のところわかりません.scriptを見る感じでは,module階層をたどって外部ピンまで探し出し,ドライブ設定(SSTL-2),電流設定(8mA~Max.まで機能ごとに設定),OutpuEnableGroup設定を行うようです.結果的にどうすべきかのメモを置いておきます.

  • OutpuEnableGroupの設定~1

以下の信号全てを同一グループとし,I/O Bankの制約に引っかからないように制御する.

mem_dq[0..15], mem_dqs[0..1], mem_dm[0..1]
  • OutpuEnableGroupの設定~2

以下の信号全てを同一グループとし,I/O Bankの制約に引っかからないように制御する.

led[0..3]
  • Current_Strengthを設定する
    • Maximum Current
      mem_dq[0..15], mem_addr[0..] //全部
      
    • 12mA
      mem_cs_n, mem_ras_n, mem_cas_n, mem_cke, mem_we_n, mem_clk, mem_clk_n
      mem_ba[0..1], mem_dm[0..1], mem_dqs[0..1]
      

動作クロックがわからない

SOPC BuilderでControllerを貼り付けるが,Clock domainの設定に留意する点がある.DDR controllerの動作クロックは,configurationで自動的にPLLを使ってクロックを生成させる方法をとると,inputするreferenceクロックとほぼ無関係*1に動作する.
このため,本IPの出力クロックを使わないのであれば,Clock Brdigeを加える必要がある.また,本IPはSlave portしか存在しない.このSlavePortの動作クロックは,以下のシンボルのクロックで駆動される.Master Portも同じくロックで駆動する必要がある*2

<DDRcontroller-Module-Name>_sysclk
 where <DDRcontroller-Module-Name> := "Module Name"の欄に入力した文字列

失敗の具体例

システム要件

CPU clock=100MHz
DDR clock=133MHz/66.5MHz
 CPU-DDR間には Clock Bridgeを設置
  BridgeのSlave(CPU側)は CPU clockを設定
  BridgeのMaster(DDR側)は CPU clockを設定(※ここが誤り)

Timing Analysisの結果,以下のようなcritical warningが出る.

Info: Path #1: Setup slack is -3.478 (VIOLATED)
  Info: ===================================================================
  Info: From Node    : Nios2_NoDDR:Nios2_NoDDR_inst|Nios2_NoDDR_clock_1:the_Nios2_NoDDR_clock_1|Nios2_NoDDR_clock_1_slave_FSM:slave_FSM|slave_write_request
  Info: To Node      : Nios2_NoDDR:Nios2_NoDDR_inst|Nios2_NoDDR_clock_1:the_Nios2_NoDDR_clock_1|unxslave_write_requestxx3
  Info: Launch Clock : Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[0]
  Info: Latch Clock  : Nios2_NoDDR_inst|the_ddrsdram|ddrsdram_controller_phy_inst|alt_mem_phy_inst|ddrsdram_phy_alt_mem_phy_inst|clk|pll|altpll_component|auto_generated|pll1|clk[1]
  Info: 
  Info: Data Arrival Path:
  Info: 
  Info: Total (ns)  Incr (ns)     Type  Element
  Info: ==========  ========= ==  ====  ===================================
  Info:     30.000     30.000           launch edge time
  Info:     32.932      2.932  R        clock network delay
  Info:     33.037      0.105     uTco  Nios2_NoDDR:Nios2_NoDDR_inst|Nios2_NoDDR_clock_1:the_Nios2_NoDDR_clock_1|Nios2_NoDDR_clock_1_slave_FSM:slave_FSM|slave_write_request
  Info:     33.037      0.000 FF  CELL  Nios2_NoDDR_inst|the_Nios2_NoDDR_clock_1|slave_FSM|slave_write_request|q
  Info:     33.192      0.155 FF    IC  Nios2_NoDDR_inst|the_Nios2_NoDDR_clock_1|unxslave_write_requestxx3~feeder|datad
  Info:     33.255      0.063 FF  CELL  Nios2_NoDDR_inst|the_Nios2_NoDDR_clock_1|unxslave_write_requestxx3~feeder|combout
  Info:     33.255      0.000 FF    IC  Nios2_NoDDR_inst|the_Nios2_NoDDR_clock_1|unxslave_write_requestxx3|d
  Info:     33.305      0.050 FF  CELL  Nios2_NoDDR:Nios2_NoDDR_inst|Nios2_NoDDR_clock_1:the_Nios2_NoDDR_clock_1|unxslave_write_requestxx3
  Info: 
  Info: Data Required Path:
  Info: 
  Info: Total (ns)  Incr (ns)     Type  Element
  Info: ==========  ========= ==  ====  ===================================
  Info:     30.064     30.064           latch edge time
  Info:     29.960     -0.104  R        clock network delay
  Info:     29.820     -0.140           clock uncertainty
  Info:     29.827      0.007     uTsu  Nios2_NoDDR:Nios2_NoDDR_inst|Nios2_NoDDR_clock_1:the_Nios2_NoDDR_clock_1|unxslave_write_requestxx3
  Info: 
  Info: Data Arrival Time  :    33.305
  Info: Data Required Time :    29.827
  Info: Slack              :    -3.478 (VIOLATED)
  Info: ===================================================================

Launch ClockがCPU clock,Latch clockがDDR controller IPが生成したPLLクロックである.Launch/Latchが逆のケースもあり,そもそも異なるclock domainの信号が交錯している段階で異常.特にCELL名から,WRITE要求信号がViolationしているので,ありえない.
FIFOによるclock分離部分のfalse_path設定やmulticycle_path設定忘れなどではないところに注意.無視してよいものと悪いものの判断ができるようになる必要がある.そのためには同期系回路はどのクロックで駆動されているのかを把握し,clock domain境界はどこにあり,そこはどうやって回避しているのかを把握しておくこと.
位相保障をしつつクロックを整数倍にしていれば,setup/hold条件を満足させることもできるだろう.本システムの場合,100MHzと133MHz(またはその半分)で駆動しているため,必ずエラーとなる.


ポート属性の認識誤り

port attribute に留意する.
特に外部portへの接続時に,inout属性を指定する必要のある端子がある.

.mem_clk_n_to_and_from_the_ddrsdram  (),
.mem_clk_to_and_from_the_ddrsdram    (),
.mem_dq_to_and_from_the_ddrsdram     (),
.mem_dqs_to_and_from_the_ddrsdram    (),

CLKが双方向にする必要というのが理解しきれていないが,cycloneとして必要という認識.
PLLにfeebackしているのかpair clockとして位相を合わせるのに使っているのか,documentを追いかけ切れていない.

DQはデータ信号なので双方向,DQSについては,データ送出側がドライブすることになるので,双方向である必要がある.
DDRになってから,driveするデバイスが入れ替わるようになったようなので,SDRAMだけの知識だけで挑んだのでミスった.

なお,DRAM系の情報としては,ELPIDAが公開している製品情報から教材となるPDFを得られる.和文documentが充実していて非常にありがたい.


失敗の具体例

dqsのポート設定を誤ってoutportとして接続したとき,Synthesisまで通ってしまった.
その後のTimingQuestによるtiming analysisで,TimeQuestがassertionでこけた.(QuartusII v8.1, WEB edition)
本件,属性違いに気づかずALTERA my supportにてSRを出してしまったが,Work Aroundとして"inout"にしてくださいといわれて気づいた.

HDLの仕様上,ポート接続時の属性チェックはなされない模様ですね.Tri-stateを考えると,出力同士が衝突してもおかしくないし,記述自体もinoutでぶら下げたりしてますからね...
そんなわけで,moduleを使うにはmoduleの動作概要の理解とinput/output/inout属性の確認,今回のように外部デバイスと接点がある場合も,その信号の意味等を理解しておくほうが無難です.
SOPC Builderはあくまでもサポートツールであり,その下にあるフレームを理解しなくては,自力でprojectを作り上げることすらできなさそうです.

*1 : 入力クロックにロックするが,位相差はできてしまう.

*2 : 同一クロックを用いない場合は,setup/hold条件を満たすようなクロックを生成する必要があるだろう.

[Altera][TSR] derive_pll_clocks

2008/11/24FPGA::QuartusIIimport

[Altera][TSR] derive_pll_clocks

Usage

derive_pll_clocks [-create_base_clocks] [-use_tan_name]

Options

-create_base_clocks
Creates base clocks on input clock ports of the design that are feeding the PLL
-use_tan_name
Use net names as clock names

Description

デザイン内のPLLか同様のリソースを特定し,そのクロック出力端子をgenerated clockとして生成します.複数のgenerated clockが,PLLがクロックスイッチ切り替えを使っているのであれば,各クロック出力端子毎に作られるでしょう.(1つは入力クロック端子inclk[0],一方はinclk[1]入力クロック端子).

デフォルトでは,このコマンドはPLLを駆動する入力クロックポートに基準クロック(base clock)を作りません.By default this command does not create base clocks on input clock ports that are driving the PLL. "create_base_clocks"オプションを使うとき,"derive_pll_clocks"もまたPLLを駆動する入力クロックポート上の基準クロックを作ります.When you use the create_base_clocks option, derive_pll_clocks also creates the base clock on an input clock port deriving the PLL.このオプションは既存のクロックを上書きしません.デフォルトでは,クロック名は出力クロック端子名と同じになります.ネット名を使う(同じ名前は,クラシックなTiming Analyzerが使います)ためには,"-use_tan_name"オプションを使用してください.


Example

project_open top
create_timing_netlist

# Create the base clock for the input clock port driving the PLL
create_clock -period 10.0 [get_ports sysclk]

# Create the generated clocks for the PLL.
derive_pll_clocks
update_timing_netlist

# Other user actions
report_timing
delete_timing_netlist
project_close


注意事項

英語力の弱い人が適当に訳しています.自分では意味がわかるようにとれたものと,そうでないものとがあります.概要理解の参考にしていただければ幸いですが,オリジナルの英文を参照されることを強く推奨いたします.

[Altera][TSR] get_pins

2008/11/24FPGA::QuartusIIimport

[Altera][TSR] get_pins

Usage

get_pins [-compatibility_mode] [-hierarchical] [-no_duplicates] [-nocase] [-nowarn] <filter>

Options

-compatibility_modeUse simple Tcl matching (Classic Timing Analyzer style)
-hierarchicalSpecifies use of a hierarchical searching method
-no_duplicatesDo not match duplicated pin names
-nocaseSpecifies case-insensitive node name matching
-nowarnDo not issue warnings messages about unmatched patterns
Valid destinations (string patterns are matched using Tcl string matching)


Description

デザイン内のピンのコレクションを返します.コレクション内の全てのピン名は,指定パターンとしてマッチします.ワイルドカードは,一度に複数のピンを選択するのに使えます.

このコマンドでは,以下の3つのTcl文字列マッチング方法があります.

  • デフォルトの方法
  • "-hierarchical"オプションを使う方法
  • "-compatibility_mode"オプションを使う方法

デフォルトでは,1階層レベルを分割するために,次から'|'が使われます.特殊文字として扱われ,ワイルドカードにあわせる文字列マッチング実行時に,考慮に入れられます.

デフォルトマッチングスキームが有効なとき,指定されたパターンは絶対ピン名(absolute pin names)(全体の階層パスを含んだ名前)に対してマッチングされます.

パターン内の全ての階層レベルはレベルごとにマッチングされます.書式"|"のピン名は,マッチングに使われます.全cell名(full cell name)は,階層を考慮するために,複数のパイプ文字'|'を含めることに注意してください.

どんな含まれたワイルドカードも,たった1階層レベルしか参照しません.例えば,"*|*"と"*|*|*"は,それぞれ最も高い階層レベルと2番目の階層レベルとを参照するので,異なるコレクションを提供します.


"-hierarchical"マッチングスキームを使うとき,パイプ文字'|'は,特殊文字として扱われ,文字列マッチングの実行時に適用されます.このマッチングスキームは,階層構造を通して強制的に再帰的にに実行します.
指定されたパターンは関係するピンに対してマッチングされる.(どんな階層構造情報も含まれない,直接名(immediate name))
様式"|"のピン名がマッチングに使われます."short cell name"は,パイプ文字('|')を含んではいけないことに注意してください.どのような含まれているワイルドカードも,関連するピン名にマッチするように拡張されます.
例えば,"*" と "*|*" は,前者が後者に拡張されるので,性格に同じピンにマッチします.


"-compatibility_mode"マッチングスキームは,全て,絶対的なピン名に対して(for full, absolute pin names.)Classic timing analyzerの文字列マッチング挙動を模擬します.

パイプ文字('|')は,ワイルドカードと使ったときに特殊文字として扱われません.デフォルトマッチングスキームは,ピンのみだけではなく,それらのピンから複製されたピンも返します.(前者のピンから,Quartusによって自動生成されるピンを参照ください(どこかにリンクしてるのかな))

複製されたピンを含めないようにするには,"-no_duplicates"オプションを使ってください.特定の型のコレクションを生成するのに使うwildcardのTcl list,または,TimeQuestextension置換規約が必要です.詳細は,"use_timequest_style_escaping"を参照ください.


Example

# Get regout pin of "reg" cell
get_pins -nocase reg|regout

# Create a collection of all pins of "reg" cell
get_pins reg|*

# Create a collection of all pins on the highest hierarachical level
set mycollection [get_pins *]

# Output pin names.
foreach_in_collection pin $mycollection {
  puts [get_pin_info -name $pin]
}

# Create a collection of all pins in the design
set fullcollection [get_pins -hierarchical *]

# Output pin IDs and names.
foreach_in_collection pin $fullcollection {
  puts -nonewline $pin
  puts -nonewline ": "
  puts [get_pin_info -name $pin]
}

注意事項

英語力の弱い人が適当に訳しています.自分では意味がわかるようにとれたものと,そうでないものとがあります.概要理解の参考にしていただければ幸いですが,オリジナルの英文を参照されることを強く推奨いたします.

[Altera][TSR] set_clock_groups

2008/11/24FPGA::QuartusIIimport

[Altera][TSR] set_clock_groups

Usage

set_clock_groups [-asynchronous] [-exclusive] -group <names>

Options

-asynchronous
Specify mutually exclusive clocks (same as the -exclusive option). Exists for compatibility.
-exclusive
Specify mutually exclusive clocks
-group
Valid destinations (string patterns are matched using Tcl string matching)

Description

"Clock groups"は,どのclockが関連しないかを指定するのに早くて便利な方法を提供します.Clock groups provide a quick and convenient way to specify which clocks are not related.

非同期clockは,完全に関係のないものです*1.(例えば,独立した異なるclock源を持つとき)

排他的なclock,同時にはactiveにならないものです*1.(例えば,multiplexされたclock)

TimeQuestは,まるでそれらが同じであるかのように,どちらのオプションも扱います("-exclusive" , "-asynchronous").

"set_clock_groups"の結果は,どんなgroup内の全てのclockも,他の各group内のclock全てから遮断(cut)されます.このコマンドは,全部のgroupの各clockから,他のgroupの各clockへ"set_false_path"を呼び出すのと等価です.clockドメインを切り離す指定を容易にするため,"set_clock_groups"を作りました(?).

単品の"-group"オプションを使うことは,TimeQuestに,"デザイン内のほかの全てのclockから,このgroupを切り離せ"と伝えます.


Example

project_open top
create_timing_netlist
create_clock -period 10.000 -name clkA [get_ports sysclk[0]]
create_clock -period 10.000 -name clkB [get_ports sysclk[1]]

# Set clkA and clkB to be mutually exclusive clocks.
set_clock_groups -exclusive -group {clkA} -group {clkB}

# The previous line is equivalent to the following two commands.
set_false_path -from [get_clocks clkA] -to [get_clocks clkB]
set_false_path -from [get_clocks clkB] -to [get_clocks clkA]

*1 : テキトウ.例文で把握されたし.

注意事項

英語力の弱い人が適当に訳しています.自分では意味がわかるようにとれたものと,そうでないものとがあります.概要理解の参考にしていただければ幸いですが,オリジナルの英文を参照されることを強く推奨いたします.

[QuartusII][NiosII] 評価ボードでぶちあたる壁

2008/11/24FPGA::QuartusIIimport

FPGAをまともにいじるのは初めてのソフト屋,を前提ですすめます.ここではsynthesisするときに出てきたwarningとその対策を記します.ただし,個人的解釈に基づくメモであり,記述漏れ,誤記,解釈誤りがありえます.
間違いを指摘いただけますと幸いです..

で,SOPC Builderで新規に作った構成を記しておきます.評価キットのsampleを持ってきたわけではないので,大量にWarningが出てきます.サンプルですら出てきますが...

mori_Nios2_NoDDR_SOPC_Builder.PNG

前もって設定する事項

Active Serial/Active Parallelをenableにした場合,そのピンが使用されているような警告画でます.コレを回避するためには,QuartusIIのデバイス設定をいじくると良いようです.
図の例はActive Parallelの例です.config後の端子をどうするかを選択できます.ユーザ定義のIOとして使う場合は,図のように"Use as regular I/O"とすればOKです.

Q2_Set_DevPinOpt_DPP_CHK.PNG

Processing windowのWarningについて(Quartus II Analysis & Synthesis)

Warning: Output pins are stuck at VCC or GND
  Warning (13410): Pin "flash_reset_n" is stuck at VCC
  Warning (13410): Pin "sram_flash_a[0]" is stuck at GND
[HELP]
 CAUSE: The output pins are minimized to either VCC or GND in a design file. This condition may be the result of the optimization process performed during logic synthesis.
 ACTION: If you intend the output pins to behave in this manner, no action is required. Otherwise, check the design file for errors and ensure that the project's logic does not reduce to VCC or GND.

記述ミスや設定ミスにより意図しない出力値固定となることもあるので,レベルが固定されたピンを確認しておく.

Warning: Feature Virtual IO is not available with your current license

Virtual I/O宣言を処理するためのライセンスがない.グループ開発で有用なものだったはず.無償評価版では使えない.合成結果で,ピン配置が異様でなければOKとする.

Processing windowのWarningについて(Quartus II Fitter)

Warning: Feature LogicLock is not available with your current license

これまたライセンスがない.

Warning: Some pins have incomplete I/O assignments. Refer to the I/O Assignment Warnings report for details
[HELP]
 CAUSE: There are one or more pins with incomplete I/O assignments. The I/O Assignment Warnings report section in the Fitter compilation report lists the affected pins and the missing I/O assignments.
 ACTION: Use the Assignment Editor or the Pin Planner to add the missing I/O assignments to the affected pins.

たぶん,以下のピンアサインをさしていると思う.

Warning: No exact pin location assignment(s) for 1 pins of 82 total pins
  Info: Pin sram_flash_a[0] not assigned to an exact location on the device

virtual指定していたピン.未配線なので捨ててよいとおもう.

Warning: At least one of the filters had some problems and could not be matched.
	Warning: *the*clock*|unxmaster*donex*|*data* could not be matched with a pin.
Warning: Ignored assignment: set_false_path -from [get_registers *] -to [get_pins -nocase -compatibility_mode {*the*clock*|unxmaster*donex*|*data*}]
	Warning: Argument -to with value [get_pins -nocase -compatibility_mode {*the*clock*|unxmaster*donex*|*data*}] contains zero elements
Warning: At least one of the filters had some problems and could not be matched.
	Warning: *the*clock*|unxslave*requestx*|*data* could not be matched with a pin.
Warning: Ignored assignment: set_false_path -from [get_registers *] -to [get_pins -nocase -compatibility_mode {*the*clock*|unxslave*requestx*|*data*}]
	Warning: Argument -to with value [get_pins -nocase -compatibility_mode {*the*clock*|unxslave*requestx*|*data*}] contains zero elements
Warning: At least one of the filters had some problems and could not be matched.
	Warning: *the*clock*|slave_address*|* could not be matched with a pin.
Warning: Ignored assignment: set_false_path -from [get_pins -nocase -compatibility_mode {*the*clock*|slave_address*|*}] -to [get_registers *]
	Warning: Argument -from with value [get_pins -nocase -compatibility_mode {*the*clock*|slave_address*|*}] contains zero elements
Warning: At least one of the filters had some problems and could not be matched.
	Warning: *the*clock*|slave_byteenable*|* could not be matched with a pin.
Warning: Ignored assignment: set_false_path -from [get_pins -nocase -compatibility_mode {*the*clock*|slave_byteenable*|*}] -to [get_registers *]
	Warning: Argument -from with value [get_pins -nocase -compatibility_mode {*the*clock*|slave_byteenable*|*}] contains zero elements
Warning: The master clock for this clock assignment could not be derived.  Clock: altera_internal_jtag|tckutap was not created.
	Warning: No clocks found on or feeding the specified source node: altera_internal_jtag|tck
Warning: Node: altera_reserved_tck was determined to be a clock but was found without an associated clock assignment.
Warning: The following clock transfers have no clock uncertainty assignment
	Warning: From Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[0] (Rise) to Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[0] (Rise) (setup and hold)
	Warning: From Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[0] (Fall) to Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[0] (Rise) (setup and hold)
	Warning: From Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[2] (Rise) to Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[0] (Rise) (setup and hold)
	Warning: From Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[0] (Rise) to Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[0] (Fall) (setup and hold)
	Warning: From Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[1] (Rise) to Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[1] (Rise) (setup and hold)
	Warning: From Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[0] (Rise) to Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[2] (Rise) (setup and hold)
	Warning: From osc_clk (Rise) to osc_clk (Rise) (setup and hold)
Warning: Ignored I/O standard assignments to the following nodes
Warning: Ignored locations or region assignments to the following nodes

実際に端子名が列挙されますが,省略します.DDR-SDRAMのlocaltion設定を記述していたので,そんなものないから制約から消しますよ,というメッセージになります.
記述誤りで無視されることもありえるので,ココもチェック必要です*1

Warning:
 The total number of single-ended output or bi-directional pins in Bank 8 exceeded the recommended amount in a bank where dedicated LVDS, RSDS or mini-LVDS outputs exists.
 Such condition may result in excessive output jitter on the differential outputs at condition where all the single-ended outputs are switching simultaneously.
 Refer to the Pad Placement and DC Guidelines section in the Cyclone III Device I/O Features chapter of the Cyclone III Device Handbook for details on this condition.
	Info: There are 28 output pin(s) with I/O standard 2.5 V and current strength 8mA.
		Info: Location E10 (pad PAD_213) : Pin sram_flash_a[16] of type output uses 2.5 V I/O standard
		Info: Location C9 (pad PAD_214) : Pin sram_flash_a[17] of type output uses 2.5 V I/O standard
		Info: Location D9 (pad PAD_215) : Pin sram_flash_a[18] of type output uses 2.5 V I/O standard
		Info: Location A8 (pad PAD_218) : Pin sram_flash_d[2] of type bi-directional uses 2.5 V I/O standard
		Info: Location B8 (pad PAD_219) : Pin sram_flash_d[3] of type bi-directional uses 2.5 V I/O standard
		Info: Location A7 (pad PAD_220) : Pin sram_flash_a[19] of type output uses 2.5 V I/O standard
		Info: Location B7 (pad PAD_221) : Pin sram_flash_d[4] of type bi-directional uses 2.5 V I/O standard
		Info: Location A6 (pad PAD_222) : Pin sram_flash_a[20] of type output uses 2.5 V I/O standard
		Info: Location B6 (pad PAD_223) : Pin sram_flash_d[15] of type bi-directional uses 2.5 V I/O standard
		Info: Location C7 (pad PAD_224) : Pin sram_flash_d[31] of type bi-directional uses 2.5 V I/O standard
		Info: Location A5 (pad PAD_225) : Pin sram_flash_d[14] of type bi-directional uses 2.5 V I/O standard
		Info: Location B5 (pad PAD_226) : Pin sram_flash_d[13] of type bi-directional uses 2.5 V I/O standard
		Info: Location C5 (pad PAD_227) : Pin sram_flash_d[5] of type bi-directional uses 2.5 V I/O standard
		Info: Location D7 (pad PAD_228) : Pin sram_flash_d[27] of type bi-directional uses 2.5 V I/O standard
		Info: Location F9 (pad PAD_230) : Pin sram_ce_n of type output uses 2.5 V I/O standard
		Info: Location E8 (pad PAD_231) : Pin sram_flash_d[6] of type bi-directional uses 2.5 V I/O standard
		Info: Location A4 (pad PAD_232) : Pin sram_flash_d[7] of type bi-directional uses 2.5 V I/O standard
		Info: Location B4 (pad PAD_233) : Pin sram_flash_d[8] of type bi-directional uses 2.5 V I/O standard
		Info: Location E7 (pad PAD_234) : Pin sram_flash_d[9] of type bi-directional uses 2.5 V I/O standard
		Info: Location F8 (pad PAD_235) : Pin sram_flash_d[26] of type bi-directional uses 2.5 V I/O standard
		Info: Location A3 (pad PAD_236) : Pin sram_flash_d[10] of type bi-directional uses 2.5 V I/O standard
		Info: Location B3 (pad PAD_237) : Pin sram_flash_d[11] of type bi-directional uses 2.5 V I/O standard
		Info: Location E6 (pad PAD_238) : Pin sram_flash_d[29] of type bi-directional uses 2.5 V I/O standard
		Info: Location F7 (pad PAD_239) : Pin sram_adsc_n of type output uses 2.5 V I/O standard
		Info: Location F6 (pad PAD_241) : Pin sram_flash_d[28] of type bi-directional uses 2.5 V I/O standard
		Info: Location D5 (pad PAD_242) : Pin sram_flash_d[12] of type bi-directional uses 2.5 V I/O standard
		Info: Location A2 (pad PAD_246) : Pin sram_clk of type output uses 2.5 V I/O standard
		Info: Location G6 (pad PAD_247) : Pin sram_flash_d[30] of type bi-directional uses 2.5 V I/O standard
	Info: There are 1 output pin(s) with I/O standard 2.5 V and current strength 12mA.
		Info: Location E9 (pad PAD_216) : Pin sram_oe_n of type output uses 2.5 V I/O standard

SingleEndの端子が多すぎてジッタが乗ったりしても知らないよ,とのこと.まぁ大丈夫だろ...
DDRを使うときは,同じバンクにあるLEDの端子を未使用にすること.IO制約により使えなくなる.


Warning: Following 2 pins must use external clamping diodes.
	Info: Pin sram_flash_d[0] uses I/O standard 2.5 V at H3
	Info: Pin sram_flash_d[1] uses I/O standard 2.5 V at D1

外部のクランプダイオードを用意するように言われるが,schematic見ても無いような気が...?

Warning: Following 2 pins have nothing, GND, or VCC driving datain port -- changes to this connectivity may change fitting results
	Info: Pin flash_reset_n has VCC driving its datain port
	Info: Pin sram_flash_a[0] has GND driving its datain port
[HELP]
 CAUSE: The specified pins either have nothing, GND, or VCC driving the datain port.
        If you modify this setting, additional pin placement restrictions such as simultaneously switching outputs may be necessary and may lead to a change in the fitting results.
 ACTION: If you do not intend to connect these pins, no action is required. Otherwise, modify the design to reflect the required connectivity.

端子出力が固定になっていますというメッセージのようですね.
問題がなければ無視してもいいでしょう.


*1 : Pin Plannerで,pinが未定義だと色が変わるようになっていますので,事前チェックはできるでしょう.

Warningについて(Quartus II Assembler)

Warning: Can't convert time-limited SOF into POF, HEX File, TTF, or RBF

NiosII評価ライセンスだとこうなる.買えばOK...


TimeQuest Timing Analyzerの吐くmessageについて

Warning: At least one of the filters had some problems and could not be matched.
 Warning: *|the_pll_0|the_pll|altpll_component|auto_generated|pll1|clk[1] could not be matched with a clock.
[HELP]
 CAUSE: At least one of the filters cannot be matched with an element.
 ACTION: Change the filter to match with at least one element.

false_path設定のところで,パターンマッチングに失敗した旨の表示.これは自分で作った制約ファイルでの話しなので,修正は必要.PLL出力をパターンマッチングで抽出し,clock domain境界でタイミングチェックを行わないようにするため.
bridgeを介在しているため,チェックする必要がないpathのみのdomainをノーチェックとしている.


ガバッと省略(書き溜め不足)

Critical Warning: Timing requirements not met

Info: Path #1: Hold slack is -2.284 (VIOLATED)
  Info: ===================================================================
  Info: From Node    : sram_flash_d[5]
  Info: To Node      : Nios2_NoDDR:Nios2_NoDDR_inst|pipeline_bridge_m1_arbitrator:the_pipeline_bridge_m1|dbs_latent_16_reg_segment_0[5]
  Info: Launch Clock : Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[2]
  Info: Latch Clock  : Nios2_NoDDR_inst|the_pll0|the_pll|altpll_component|auto_generated|pll1|clk[0]
  Info: Multicycle - Setup End   : 2
  Info:
  Info: Data Arrival Path:
  Info:
  Info: Total (ns)  Incr (ns)     Type  Element
  Info: ==========  ========= ==  ====  ===================================
  Info:      0.000      0.000           launch edge time
  Info:      1.058      1.058  R        clock network delay
  Info:      5.158      4.100  R  iExt  sram_flash_d[5]
  Info:      5.158      0.000 RR    IC  sram_flash_d[5]~input|i
  Info:      5.520      0.362 RR  CELL  sram_flash_d[5]~input|o
  Info:      7.631      2.111 RR    IC  Nios2_NoDDR_inst|the_pipeline_bridge_m1|dbs_latent_16_reg_segment_0[5]~feeder|datab
  Info:      7.785      0.154 RR  CELL  Nios2_NoDDR_inst|the_pipeline_bridge_m1|dbs_latent_16_reg_segment_0[5]~feeder|combout
  Info:      7.785      0.000 RR    IC  Nios2_NoDDR_inst|the_pipeline_bridge_m1|dbs_latent_16_reg_segment_0[5]|d
  Info:      7.816      0.031 RR  CELL  Nios2_NoDDR:Nios2_NoDDR_inst|pipeline_bridge_m1_arbitrator:the_pipeline_bridge_m1|dbs_latent_16_reg_segment_0[5]
  Info:
  Info: Data Required Path:
  Info:
  Info: Total (ns)  Incr (ns)     Type  Element
  Info: ==========  ========= ==  ====  ===================================
  Info:     10.000     10.000           latch edge time
  Info:     10.169      0.169  R        clock network delay
  Info:     10.253      0.084      uTh  Nios2_NoDDR:Nios2_NoDDR_inst|pipeline_bridge_m1_arbitrator:the_pipeline_bridge_m1|dbs_latent_16_reg_segment_0[5]
  Info:
  Info: Data Arrival Time  :     7.816
  Info: Data Required Time :    10.253
  Info: Clock Pessimism    :     0.153
  Info: Slack              :    -2.284 (VIOLATED)
  Info: ===================================================================
  Info:

論理合成後にタイミング違反を検出.これはSSRAMへ供給しているクロックと,データ信号との制約に対する違反(Violation)ですね.
図を描けば確認できるかと思いますが,Hold timeのslackを救おうとしても,Setupとの兼ね合いもあるので,単純には解決できない模様です.

ここで注目すべきはSSRAM CLKです.
starterkitのサンプルを見ていて,systemで使っているクロックと同じ100MHzなのにPLL出力が違ったのです.未確認ですが位相をずらして制約をカバーしているのではないかと踏んだわけです.
少し端折りますが,位相をずらして対策をいれたときの,TimeQuest Timing Analyzerを使って図示させます.

TQ_TIMING_VIEW03_a.PNG

SSRAM CLKを2.5nSec早めることでHold Timeを稼ぐことができました.synthesisをやり直しているので,全く同じ回路でPLL遅延だけが変化したのかはわかりかねますが,Timing Errorを回避させました.
とはいえ,今回はLaunch ClockとLatch Clockとが異なっていたのでできた回避作ですね.

図中,Pane-3に波形が図示されますが,Pane-1にはドコでどの程度時間を消費しているかの詳細がわかります.最適化の変更や回路設計そのものの変更などにより,その時間を調整する必要があるのでしょうが,その時限の話はまたぶちあたった時にでも考えましょう.