FC2カウンター FPGAの部屋 2013年03月
fc2ブログ

FPGAやCPLDの話題やFPGA用のツールの話題などです。 マニアックです。 日記も書きます。

FPGAの部屋

FPGAの部屋の有用と思われるコンテンツのまとめサイトを作りました。Xilinx ISEの初心者の方には、FPGAリテラシーおよびチュートリアルのページをお勧めいたします。

XPSのカスタムIPにおけるMPDファイルの書き方1

XPSプロジェクトのカスタムIPのMPDファイルの書き方を書いておこうと思う。MPDファイルはXPSプロジェクトのカスタムIPのパラメータやIOポートの情報などを書いておくファイルだ。カスタムIPフォルダ\カスタムIP名+バージョン.mpd というファイル名が付いている。現在作っている、カメラ・インターフェースIPでは、mt9d111_inf_axi_master_v1_00_a\data\mt9d111_inf_axi_master_v2_1_0.mpd がMPDファイルだ。
MPDファイルと組になるのが、MUIファイルで、設定ダイアログのGUIをXMLファイルで表している。カメラ・インターフェースIPでは、mt9d111_inf_axi_master_v1_00_a\data\mt9d111_inf_axi_master_v2_1_0.mui がMUIファイルだ。
なお、Platform Specification Format Reference Manual Embedded Development Kit (EDK) 14.1 UG642 (v14.1) April 24, 2012 をマニュアルとして参考にした。

これから、MPDファイルの書き方について解説する。これから mt9d111_inf_axi_master_v2_1_0.mpd を例にとってMPDファイルについて説明するが、最初にMPDファイルのAssignment Commands について解説する。
MPDファイルのAssignment Commands は5つで以下に示す。

• BUS_INTERFACE
• IO_INTERFACE
• OPTION
• PARAMETER
• PORT


MPDファイルに書かれる行は、このコマンドか、コメント文かのいずれかになる。

mt9d111_inf_axi_master_v2_1_0.mpd について解説する。
カメラ・インターフェースIPのAXIバス・インターフェースは2つある。1つは、カメラのデータをPS部に接続されたDDR3 SDRAMのフレームバッファにAXI HPポートを経由して書き込むAXI4 Master インターフェースで、もう1つはフレームバッファのアドレスを設定するためのレジスタ用のAXI4 Lite Slave インターフェースだ。
mt9d111_inf_axi_master_v2_1_0.mpd の46行目から55行目までを下に示す。

BEGIN mt9d111_inf_axi_master

## Peripheral Options
OPTION IPTYPE = PERIPHERAL
OPTION IMP_NETLIST = TRUE
OPTION STYLE = MIX
OPTION DESC = mt9d111_inf_axi_master
OPTION LONG_DESC = An AXI Master Camera Interface
OPTION HDL = MIXED
OPTION RUN_NGCBUILD = FALSE


・BEGIN
コンポーネント定義は BEGIN で始めて、END で終了する。
OPTION IPTYPE = PERIPHERAL
OPTION のIPTYPE には、BUS, PERIPHERAL, PROCESSOR を設定できる。PERIPHERAL は、バスにアドレスマップされるIPを表す。
OPTION IMP_NETLIST = TRUE
Platgen にインプリメント用のネットリスト(NGC) を書き出させる。
OPTION STYLE = MIX
OPTION の STYLE は、ペリフェラルのデザイン構成を表すオプションで、BLACKBOX, HDL, MIX がある。BLACKBOXは、ネットリストのみ、つまり、BBD (Black Box Definition)ファイルのNGCファイルのリストに従ってIPが構成される。
HDLはHDLのみで、PAO (Peripheral Analyze Order)ファイルのHDLファイルのリストに従ってIPが構成される。
MIX は、NGCファイルとHDLファイルの両方を使用してIPが構成される。
OPTION DESC = mt9d111_inf_axi_master
DESC はGUIツールに表示する短いIPコア名を指定する。
OPTION LONG_DESC = An AXI Master Camera Interface
LONG DESC はGUIツールに表示するIPコアの説明を指定する。
OPTION HDL = MIXED
VHDL, VERILOG, MIXED
OPTION RUN_NGCBUILD = FALSE
RUN_NGCBUILD は、NGCBUILD を実行させて、IPのネットリストを1つにまとめるオプション

次のブログ記事は、”XPSのカスタムIPにおけるMPDファイルの書き方2
MPDファイルの全リストは、”カメラ・インターフェースIPにAXI4 Lite Slave インターフェースを追加3(MPD, MUIファイルの作製)”を参照のこと。
  1. 2013年03月31日 06:30 |
  2. EDK
  3. | トラックバック:0
  4. | コメント:0

カメラ・インターフェースIPにAXI4 Lite Slave インターフェースを追加2(シミュレーション)

前回、ISimでシミュレーションしようとしたらエラーが発生した。その原因は、Windowsのフルパス+ファイル名が255文字という制限があって、中間ファイルが作れなかったためだ。
浅い階層にプロジェクトを移動してISimでシミュレーションを行った。下にISimのシミュレーション結果を示す。
AXI4M_and_Lite_Slave_5_130329.png

テストベンチはとっても長いので、スティミュラスを生成するtask とtask を起動するinitial文を抜き出して、下に示す。

    initial begin
        // Initialize Inputs
        s_axi_lite_awaddr = 0;
        s_axi_lite_awport = 0;
        s_axi_lite_wvalid = 0;
        s_axi_lite_wdata = 0;
        s_axi_lite_wvalid = 0;
        s_axi_lite_bready = 0;
        s_axi_lite_araddr = 0;
        s_axi_lite_arport = 0;
        s_axi_lite_arvalid = 0;
        s_axi_lite_rready = 0;

        // Wait Reset rising edge
        @(posedge ARESETN);
        
        for (i=0; i<10; i=i+1) begin
            @(posedge ACLK);    // 次のクロックへ
            #DELAY;
        end
        
        // Add stimulus here
        @(posedge ACLK);    // 次のクロックへ
        #DELAY;
        AXI_MASTER_WADC1(32'h0000_0100, 32'h1234_5678);
        @(posedge ACLK);    // 次のクロックへ
        #DELAY;
        AXI_MASTER_RADC1(32'h0000_0100);
        #DELAY;
        
        @(posedge ACLK);    // 次のクロックへ        
        #DELAY;
        AXI_MASTER_WADC2(32'h0000_0100, 32'h55AA_55AA);
        @(posedge ACLK);    // 次のクロックへ        
        #DELAY;
        AXI_MASTER_RADC2(32'h0000_0600);

    end
            
    // Write Transcation 1
    task AXI_MASTER_WADC1;
        input    [C_S_AXI_LITE_ADDR_WIDTH-1:0]    awaddr;
        input    [C_S_AXI_LITE_DATA_WIDTH-1:0]    wdata;
        begin
            s_axi_lite_awaddr    = awaddr;
            s_axi_lite_awvalid    = 1'b1;
            
            @(posedge ACLK);    // 次のクロックへ
            #DELAY;
            
            s_axi_lite_awvalid = 1'b0;
            s_axi_lite_wdata = wdata;
            s_axi_lite_wvalid = 1'b1;
            @(posedge ACLK);    // 次のクロックへ, s_axi_lite_wready は常に 1
            
            #DELAY;
            s_axi_lite_wvalid = 1'b0;
            s_axi_lite_bready = 1'b1;
            
            @(posedge ACLK);    // 次のクロックへ
            #DELAY;
                
            s_axi_lite_bready = 1'b0;
        end
    endtask

    // Write Transcation 2
    task AXI_MASTER_WADC2;
        input    [C_S_AXI_LITE_ADDR_WIDTH-1:0]    awaddr;
        input    [C_S_AXI_LITE_DATA_WIDTH-1:0]    wdata;
        begin
            s_axi_lite_awaddr    = awaddr;
            s_axi_lite_awvalid    = 1'b1;
            
            @(posedge ACLK);    // 次のクロックへ
            #DELAY;
            
            s_axi_lite_awvalid = 1'b0;
            s_axi_lite_wdata = wdata;
            s_axi_lite_wvalid = 1'b1;
            @(posedge ACLK);    // 次のクロックへ, s_axi_lite_wready は常に 1
            
            #DELAY;
            s_axi_lite_wvalid = 1'b0;        
            @(posedge ACLK);    // 次のクロックへ
            
            #DELAY;        
            s_axi_lite_bready = 1'b1;
            
            @(posedge ACLK);    // 次のクロックへ
            #DELAY;
                
            s_axi_lite_bready = 1'b0;
        end
    endtask
    
    // Read Transcation 1    
    task AXI_MASTER_RADC1;
        input    [31:0]    araddr;
        begin
            s_axi_lite_araddr    = araddr;
            s_axi_lite_arvalid     = 1'b1;
            @(posedge ACLK);    // 次のクロックへ
            #DELAY;
            
            s_axi_lite_araddr    = 0;
            s_axi_lite_arvalid     = 1'b0;
            s_axi_lite_rready = 1'b1;

            @(posedge ACLK);    // 次のクロックへ
            #DELAY;

            s_axi_lite_rready = 1'b0;
        end
    endtask
    
    // Read Transcation 2   
    task AXI_MASTER_RADC2;
        input    [31:0]    araddr;
        begin
            s_axi_lite_araddr    = araddr;
            s_axi_lite_arvalid     = 1'b1;
            @(posedge ACLK);    // 次のクロックへ
            #DELAY;
            
            s_axi_lite_araddr    = 0;
            s_axi_lite_arvalid     = 1'b0;
            @(posedge ACLK);    // 次のクロックへ
            #DELAY;

            s_axi_lite_rready = 1'b1;

            @(posedge ACLK);    // 次のクロックへ
            #DELAY;

            s_axi_lite_rready = 1'b0;
        end
    endtask


今回はWrite用、Read用task を2つに分けて書いていて手抜きをしている。
AXI4 Lite Slave IPの全コードを下に示す。フレームバッファのスタートアドレスのみのレジスタで、AXI4 Lite Slave IP なので信号も少なく、とっても簡単に書けている。(2013/04/07: s_axi_lite_awport と s_axi_lite_arport を削除しました削除しなくても問題ないです。ChipScoepe AXI Monitor の信号には、s_axi_lite_awport と s_axi_lite_arport が存在します。詳しい経緯は”AXI4 Master IP にAXI4 Lite Slave を追加1(インプリメント)”を参照のこと)
2013/04/20: mt9d111_axi_lite_slave.v を修正しました。詳しくは、”AXI4 Master IP にAXI4 Lite Slave を追加9(バグフィックス)”を参照のこと。)

// mt9d111_axi_lite_slave.v 
// mt9d111_inf_axi_master のAXI Lite Slave モジュール。Frame Buffer のスタートアドレス・レジスタを持つ。
//

`default_nettype none

module mt9d111_axi_lite_slave # (
    parameter integer C_S_AXI_LITE_ADDR_WIDTH = 9, // Address width of the AXI Lite Interface
    parameter integer C_S_AXI_LITE_DATA_WIDTH = 32, // Data width of the AXI Lite Interface
    
    parameter [31:0] C_DISPLAY_START_ADDRESS = 32'h1A00_0000
)(
    input    wire                                    s_axi_lite_aclk,
    input    wire                                    axi_resetn,
    
    // AXI Lite Write Address Channel
    input    wire                                    s_axi_lite_awvalid,
    output    wire                                    s_axi_lite_awready,
    input    wire    [C_S_AXI_LITE_ADDR_WIDTH-1: 0]    s_axi_lite_awaddr,

    // AXI Lite Write Data Channel
    input    wire                                    s_axi_lite_wvalid,
    output    wire                                    s_axi_lite_wready,
    input    wire    [C_S_AXI_LITE_DATA_WIDTH-1: 0]    s_axi_lite_wdata,
    
    // AXI Lite Write Response Channel
    output    wire    [1:0]                            s_axi_lite_bresp,
    output    wire                                    s_axi_lite_bvalid,
    input    wire                                    s_axi_lite_bready,

    // AXI Lite Read Address Channel
    input    wire                                    s_axi_lite_arvalid,
    output    wire                                    s_axi_lite_arready,
    input    wire    [C_S_AXI_LITE_ADDR_WIDTH-1: 0]    s_axi_lite_araddr,
    
    // AXI Lite Read Data Channel
    output    wire                                    s_axi_lite_rvalid,
    input    wire                                    s_axi_lite_rready,
    output    wire    [C_S_AXI_LITE_DATA_WIDTH-1: 0]    s_axi_lite_rdata,
    output    wire    [1:0]                            s_axi_lite_rresp,
    
    output    wire    [31:0]                            fb_start_address    // Frame Buffer のスタートアドレス
);

    // RESP の値の定義
    parameter    RESP_OKAY =        2'b00;
    parameter    RESP_EXOKAY =    2'b01;
    parameter    RESP_SLVERR =     2'b10;
    parameter    RESP_DECERR =    2'b11;
    
    parameter    IDLE_WR =            2'b00,    // for wrt_cs
                DATA_WRITE_HOLD =    2'b01,
                BREADY_ASSERT =        2'b11;
                
    parameter    IDLE_RD    =        1'b0,            //  for rdt_cs
                AR_DATA_WAIT =    1'b1;

    reg        [1:0]    wrt_cs = IDLE_WR;
    
    reg        [31:0]    fb_start_addr_reg = C_DISPLAY_START_ADDRESS;
    
    reg        rdt_cs = IDLE_RD;
    
    reg        reset_1d = 1'b0;
    reg        reset = 1'b0;
    reg        awready = 1'b1;
    reg        bvalid = 1'b0;
    reg        arready = 1'b1;
    reg        rvalid = 1'b0;
    wire        aclk;
    
    assign aclk = s_axi_lite_aclk;
    // Synchronization of axi_resetn
    always @(posedge aclk) begin
        reset_1d <= ~axi_resetn;
        reset <= reset_1d;
    end
    
    // AXI4 Lite Slave Write Transaction State Machine
    always @(posedge aclk) begin
        if (reset) begin
            wrt_cs <= IDLE_WR;
            awready <= 1'b1;
            bvalid <= 1'b0;
        end else begin
            case (wrt_cs)
                IDLE_WR :
                    if (s_axi_lite_awvalid & ~s_axi_lite_wvalid) begin    // Write Transaction Start
                        wrt_cs <= DATA_WRITE_HOLD;
                        awready <= 1'b0;
                    end else if (s_axi_lite_awvalid & s_axi_lite_wvalid) begin    // Write Transaction Start with data
                        wrt_cs <= BREADY_ASSERT;
                        awready <= 1'b0;
                        bvalid <= 1'b1;
                    end
                DATA_WRITE_HOLD :
                    if (s_axi_lite_wvalid) begin    // Write data just valid
                        wrt_cs <= BREADY_ASSERT;
                        bvalid <= 1'b1;
                    end
                BREADY_ASSERT :
                    if (s_axi_lite_bready) begin    // The write transaction was terminated.
                        wrt_cs <= IDLE_WR;
                        bvalid <= 1'b0;
                        awready <= 1'b1;
                    end
            endcase
        end
    end
    assign s_axi_lite_awready = awready;
    assign s_axi_lite_bvalid = bvalid;
    assign s_axi_lite_wready = 1'b1;
    assign s_axi_lite_bresp = RESP_OKAY;
    
    // AXI4 Lite Slave Read Transaction State Machine
    always @(posedge aclk) begin
        if (reset) begin
            rdt_cs <= IDLE_RD;
            arready <= 1'b1;
            rvalid <= 1'b0;
        end else begin
            case (rdt_cs)
                IDLE_RD :
                    if (s_axi_lite_arvalid) begin
                        rdt_cs <= AR_DATA_WAIT;
                        arready <= 1'b0;
                        rvalid <= 1'b1;
                    end
                AR_DATA_WAIT :
                    if (s_axi_lite_rready) begin
                        rdt_cs <= IDLE_RD;
                        arready <= 1'b1;
                        rvalid <= 1'b0;
                    end
            endcase
        end
    end
    assign s_axi_lite_arready = arready;
    assign s_axi_lite_rvalid = rvalid;
    assign s_axi_lite_rresp = RESP_OKAY;
                    
    // fb_start_addr_reg
    always @(posedge aclk) begin
        if (reset)
            fb_start_addr_reg <= C_DISPLAY_START_ADDRESS;
        else
            if (s_axi_lite_wvalid)
                fb_start_addr_reg <= s_axi_lite_wdata;
    end
    assign fb_start_address = fb_start_addr_reg;
    assign s_axi_lite_rdata = fb_start_addr_reg;
endmodule


ただし、実機でちゃんと動くかどうかはまだ未定だ。

カメラのデータをWriteするAXI4 Master Write も動作している。
AXI4M_and_Lite_Slave_6_130329.png

AXI4 Master Read アクセスは無しだ。

(2013/03/30:追記)
Windows7 64ビット版から、プロジェクトのフォルダをVirtualBox上のUbuntu にコピーしたところ問題なく動作した。これは良い。とっても嬉しい。
AXI4M_and_Lite_Slave_7_130330.png
  1. 2013年03月29日 05:03 |
  2. 複数のAXI4 バスを持つIPの作製
  3. | トラックバック:0
  4. | コメント:0

農林団地の花見

つくば市の農林関係の研究所が集まっている辺りは桜の名所です。今日は上の娘が仙台に帰る日なので、午前中の30分間休暇を取って、久しぶりに家族5人で花見をして来ました。桜は7分咲きくらいでした。今週末の土日には満開になるでしょう?
これが娘たち2人です。今度、大学3年生と、中学3年生です。
hanami_1_12_03_28.jpg

奥さんと今年、大学1年生の息子です。
hanami_2_12_03_28.jpg

桜はたくさん咲いている木と、まだつぼみが多いの木とあって、木によって様々です。。
hanami_3_12_03_28.jpg

この木は結構、綺麗に咲いていました。
hanami_4_12_03_28.jpg

花見の後は、近くの新しくできたマックカフェで朝マックをしてから仕事に行きました。久しぶりに家族5人揃って花見が出来て、とっても楽しかったです。果たして後何年、一緒に花見ができるでしょう?とっても楽しい朝でした。
  1. 2013年03月26日 21:29 |
  2. 日記
  3. | トラックバック:0
  4. | コメント:0

カメラ・インターフェースIPにAXI4 Lite Slave インターフェースを追加1(ISimでエラー)

ZedBoardのLinuxが起動するときにフレームバッファの領域を確保する。そのフレームバッファ領域のアドレスが違うことがあるので、自分のカメラ・インターフェースIPとビットマップ・ディスプレイ・コントローラIPにフレームバッファのスタートアドレスを通知する仕組みを作ろうと思った。最初にカメラ・インターフェースIPにフレームバッファのスタートアドレスを保存するレジスタを実装する。AXI4 Lite Slave インターフェースを実装して、そこにフレームバッファのスタートアドレスを保存するためのレジスタを設置することにした。
なお、AXI4 Lite Slave 信号の定義は、Xilinx\14.4\ISE_DS\EDK\hw\XilinxProcessorIPLib\pcores\axi_vdma_v5_04_a\hdl\vhdl\axi_vdma.vhd を参考にした。MPDファイルもあるので、いろいろと参考になる。

カメラ・インターフェースIPのトップHDLファイルの mt9d111_inf_axi_maste.v の下に、AXI4 Lite Slave インターフェース用のモジュールを追加することにした。ファイル名は、mt9d111_axi_lite_slave.v とした。mt9d111_axi_lite_slave.v のポート宣言部分を下に示す。(2013/04/07: s_axi_lite_awport と s_axi_lite_arport を削除しました。詳しい経緯は”AXI4 Master IP にAXI4 Lite Slave を追加1(インプリメント)”を参照のこと)

// mt9d111_axi_lite_slave.v 
// mt9d111_inf_axi_master のAXI Lite Slave モジュール。Frame Buffer のスタートアドレス・レジスタを持つ。
//

`default_nettype none

module mt9d111_axi_lite_slave # (
    parameter integer C_S_AXI_LITE_ADDR_WIDTH = 9, // Address width of the AXI Lite Interface
    parameter integer C_S_AXI_LITE_DATA_WIDTH = 32, // Data width of the AXI Lite Interface
    
    parameter [31:0] C_DISPLAY_START_ADDRESS = 32'h1A00_0000
)(
    input    wire                                    s_axi_lite_aclk    = 1'b0,
    input    wire                                    axi_resetn = 1'b0,
    
    // AXI Lite Write Address Channel
    input    wire                                    s_axi_lite_awvalid = 1'b0,
    output    wire                                    s_axi_lite_awready,
    input    wire    [C_S_AXI_LITE_ADDR_WIDTH-1: 0]    s_axi_lite_awaddr = 0,

    // AXI Lite Write Data Channel
    input    wire                                    s_axi_lite_wvalid = 1'b0,
    output    wire                                    s_axi_lite_wready,
    input    wire    [C_S_AXI_LITE_DATA_WIDTH-1: 0]    s_axi_lite_wdata = 0,
    
    // AXI Lite Write Response Channel
    output    wire    [1:0]                            s_axi_lite_bresp,
    output    wire                                    s_axi_lite_bvalid,
    input    wire                                    s_axi_lite_bready,

    // AXI Lite Read Address Channel
    input    wire                                    s_axi_lite_arvalid = 1'b0,
    output    wire                                    s_axi_lite_arready,
    input    wire    [C_S_AXI_LITE_ADDR_WIDTH-1: 0]    s_axi_lite_araddr = 0,
    
    // AXI Lite Read Data Channel
    output    wire                                    s_axi_lite_rvalid,
    input    wire                                    s_axi_lite_rready = 1'b0,
    output    wire    [C_S_AXI_LITE_DATA_WIDTH-1: 0]    s_axi_lite_rdata,
    output    wire    [1:0]                            s_axi_lite_rresp,
    
    output    wire    [31:0]                            fb_start_address    // Frame Buffer のスタートアドレス
);


WSTRBはAXI4 Lite Slave の仕様では使わなくても良いことになっているので、入っていないようだ。この場合は、すべてのバイトレーンがイネーブル状態となる。

mt9d111_inf_axi_maste.v を修正し、 mt9d111_inf_axi_maste_tb.v を修正して、AXI4 Master 用のBFMだけでなく mt9d111_inf_axi_maste.v 用のtask も追加してカメラ・インターフェースIP単体でシミュレーションを行うことにした。ISEのプロジェクトを作成して、シミュレーションを行った。しかし、サポートに連絡というメッセージが出て、シミュレーション用のコンパイルが失敗してしまった。
AXI4M_and_Lite_Slave_3_130325.png

エラーメッセージを下に示す。

Started : "Simulate Behavioral Model".

Determining files marked for global include in the design...
Running fuse...
Command Line: fuse -intstyle ise -incremental -lib unisims_ver -lib unimacro_ver -lib xilinxcorelib_ver -lib secureip -o D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/mt9d111_inf_axi_master_tb_isim_beh.exe -prj D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/mt9d111_inf_axi_master
_tb_beh.prj work.mt9d111_inf_axi_master_tb work.glbl {-v 1}
Running: C:\HDL\Xilinx\14.4\ISE_DS\ISE\bin\nt64\unwrapped\fuse.exe -intstyle ise -incremental -lib unisims_ver -lib unimacro_ver -lib xilinxcorelib_ver -lib secureip -o D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/mt9d111_inf_axi_master_tb_isim_beh.exe -prj D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00
_a/mt9d111_inf_axi_master/mt9d111_inf_axi_master_tb_beh.prj work.mt9d111_inf_axi_master_tb work.glbl -v 1
ISim P.49d (signature 0x7708f090)
Number of CPUs detected in this system: 2
Turning on mult-threading, number of parallel sub-compilation jobs: 4
Determining compilation order of HDL files

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Process "Simulate Behavioral Model" failed


次に、mt9d111_inf_axi_maste.v をシミュレーションのトップに指定してシミュレータが起動するかを確かめてみたが、やはりエラーだった。
AXI4M_and_Lite_Slave_4_130325.png

エラー内容を下に示す。

Started : "Simulate Behavioral Model".

Determining files marked for global include in the design...
Running fuse...
Command Line: fuse -intstyle ise -incremental -lib unisims_ver -lib unimacro_ver -lib xilinxcorelib_ver -lib secureip -o D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/mt9d111_inf_axi_master_isim_beh.exe -prj D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/mt9d111_inf_axi_master_be
h.prj work.mt9d111_inf_axi_master work.glbl {}
Running: C:\Xilinx\14.4\ISE_DS\ISE\bin\nt64\unwrapped\fuse.exe -intstyle ise -incremental -lib unisims_ver -lib unimacro_ver -lib xilinxcorelib_ver -lib secureip -o D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/mt9d111_inf_axi_master_isim_beh.exe -prj D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d
111_inf_axi_master/mt9d111_inf_axi_master_beh.prj work.mt9d111_inf_axi_master work.glbl
ISim P.49d (signature 0x7708f090)
Number of CPUs detected in this system: 2
Turning on mult-threading, number of parallel sub-compilation jobs: 4
Determining compilation order of HDL files
Analyzing Verilog file "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/pixel_fifo.v" into library work
Analyzing Verilog file "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_cam_cont.v" into library work
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 17: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 18: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 19: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 20: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 21: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 23: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 24: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 25: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 26: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 27: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 56: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 57: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 59: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 60: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 61: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/./disp_timing_parameters.vh" Line 62: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_cam_cont.v" Line 43: Parameter declaration becomes local in mt9d111_cam_cont with formal parameter declaration list
Analyzing Verilog file "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" into library work
WARNING:HDLCompiler:489 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 13: Illegal initial value of input port s_axi_lite_aclk for module mt9d111_axi_lite_slave ignored
WARNING:HDLCompiler:489 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 14: Illegal initial value of input port axi_resetn for module mt9d111_axi_lite_slave ignored
WARNING:HDLCompiler:489 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 17: Illegal initial value of input port s_axi_lite_awvalid for module mt9d111_axi_lite_slave ignored
WARNING:HDLCompiler:489 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 19: Illegal initial value of input port s_axi_lite_awaddr for module mt9d111_axi_lite_slave ignored
WARNING:HDLCompiler:489 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 20: Illegal initial value of input port s_axi_lite_awport for module mt9d111_axi_lite_slave ignored
WARNING:HDLCompiler:489 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 23: Illegal initial value of input port s_axi_lite_wvalid for module mt9d111_axi_lite_slave ignored
WARNING:HDLCompiler:489 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 25: Illegal initial value of input port s_axi_lite_wdata for module mt9d111_axi_lite_slave ignored
Analyzing Verilog file "C:/Xilinx/14.4/ISE_DS/ISE//verilog/src/glbl.v" into library work
WARNING:HDLCompiler:489 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 33: Illegal initial value of input port s_axi_lite_arvalid for module mt9d111_axi_lite_slave ignored
WARNING:HDLCompiler:489 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 35: Illegal initial value of input port s_axi_lite_araddr for module mt9d111_axi_lite_slave ignored
WARNING:HDLCompiler:489 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 36: Illegal initial value of input port s_axi_lite_arport for module mt9d111_axi_lite_slave ignored
WARNING:HDLCompiler:489 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 40: Illegal initial value of input port s_axi_lite_rready for module mt9d111_axi_lite_slave ignored
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 48: Parameter declaration becomes local in mt9d111_axi_lite_slave with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 49: Parameter declaration becomes local in mt9d111_axi_lite_slave with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 50: Parameter declaration becomes local in mt9d111_axi_lite_slave with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 51: Parameter declaration becomes local in mt9d111_axi_lite_slave with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 53: Parameter declaration becomes local in mt9d111_axi_lite_slave with formal parameter declaration list
WARNING:HDLCompiler:693 - "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/verilog/mt9d111_axi_lite_slave.v" Line 57: Parameter declaration becomes local in mt9d111_axi_lite_slave with formal parameter declaration list
WARNING:HDLCompiler:1007 - "N:/P.49d/rtf/verilog/src/XilinxCoreLib/FIFO_GENERATOR_V9_3.v" Line 4120: Element index -1 into num_read_words_dc is out of bounds
WARNING:HDLCompiler:1007 - "N:/P.49d/rtf/verilog/src/XilinxCoreLib/FIFO_GENERATOR_V9_3.v" Line 4170: Element index -1 into num_write_words_dc is out of bounds
Parsing VHDL file "D:/HDL/FndtnISEWork/Zynq-7000/ZedBoard/Examples/Digilent_Linux/ZedBoard_OOB_Design2/hw/xps_proj/pcores/mt9d111_inf_axi_master_v1_00_a/mt9d111_inf_axi_master/../hdl/vhdl/mt9d111_inf_axi_master.vhd" into library work
Starting static elaboration
Completed static elaboration
Compiling module glbl
Compiling module mt9d111_axi_lite_slave(9,32,)
Compiling module ODDR(DDR_CLK_EDGE="SAME_EDGE")
Compiling module fifo_generator_v9_3_sync_stage(C...
Compiling module fifo_generator_v9_3_bhv_ver_as(C...
Compiling module fifo_generator_v9_3_bhv_ver_prel...
Compiling module FIFO_GENERATOR_V9_3_CONV_VER(C_C...
Compiling module FIFO_GENERATOR_V9_3(C_DATA_COUNT...
Compiling module pixel_fifo
Compiling module mt9d111_cam_cont(0)
Compiling package standard
Compiling package std_logic_1164
Compiling package numeric_std
Compiling package attributes
Compiling package std_logic_misc
Compiling package vl_types
Compiling architecture implementation of entity mt9d111_inf_axi_master
Time Resolution for simulation is 1ps.
Waiting for 9 sub-compilation(s) to finish...
FATAL_ERROR:Simulator:Fuse.cpp:209:1.133 - Failed to compile one of the generated C files. Please recompile with -mt off -v 1 switch to identify which design unit failed. Process will terminate. For technical support on this issue, please open a WebCase with this project attached at http://www.xilinx.com/support.
FATAL_ERROR:Simulator:Fuse.cpp:209:1.133 - Failed to compile one of the generated C files. Please recompile with -mt off -v 1 switch to identify which design unit failed. Process will terminate. For technical support on this issue, please open a WebCase with this project attached at http://www.xilinx.com/support.

Process "Simulate Behavioral Model" failed


FATAL_ERROR だ。これに該当するアンサーは見つからずに、Xilinx User Community ForumsISE simulator problem が見つかった。
Ubuntu ではないし、ISEの再インストールや、fuse のプロパティに”-v 1”を付けてもダメだった。どうしようか?ISimではお手上げになってしまった。。。他のシミュレータを使うしか無いか?

(追記)
ISimではないシミュレータで、コンパイルが通るところまで直してきたのですが、やはりISimでは同様のエラーが出ます。困りました。ISimの致命的なバグのようです。ビットマップ・ディスプレイ・コントローラを先にやろうと思います。次のバージョンでISimのバグが直ってますように。。。願掛けします。
関連するアンサーです。
ISE Simulator (ISim) - 「FATAL_ERROR:Simulator:Fuse.cpp:217:1.95 - Failed to compile one of the generated C code」というエラー メッセージが表示される

(2013/03/27:追記)
FATAL_ERRORになる原因がわかりました。
フォルダの階層も深く、ISimの生成するファイル名が長くて、Windowsのフルパスサイズを超えてしまって、中間ファイルが作れなかったのが原因でした。浅い階層にコピーしてISimを実行したら問題が無くなりました。
  1. 2013年03月26日 05:35 |
  2. 複数のAXI4 バスを持つIPの作製
  3. | トラックバック:0
  4. | コメント:0

息子の引越し

 今日は息子引越しをして来ました。大学に入学するのに、八王子市にアパートを借りました。大学の近くです。大学は医療系で4年後には国家試験があります。
とりあえず今日は、寝具やこたつ、カーペットなどを持って行きました。つくばから車で首都高速を通って八王子へ。2時間弱くらいですね。首都高速走るのは久しぶりなので、ドキドキしながら走っていました。ナビもトンネルでは使えなくなって看板が頼りです。
アパートに到着して、管理人さんから鍵をもらいました。今日はケーズデンキに頼んだ電化製品と電気温水器なので、東電の方が来ることになっています。地元のケーズデンキで電化製品を買うと、現地のケーズデンキから配送してくれます。つくば-八王子間だけでなく、つくば-仙台間も、この方式で電化製品を買いました。ケーズデンキは少し早めに来てくれて、12時の予定が11時ころ、洗濯機とテレビと炊飯器、電子レンジを設置してもらいました。その後、東電の方が、電気温水器の配線を接続してくれて電気温水器が使えるようになりました。ベッドと冷蔵庫、照明はアパートに付いていました。
午後からは、ホームセンターとダイソーで買い物をしました。ダイソーでは3千円以上初めて買いました。ホームセンター(D2)では、カーテンや鍋、フライパンなどを買いました。
アパートに帰ってから、息子と私は電動アシスト自転車を買いに近くの自転車店へ行って、旧型でお安くしてもらった電動アシスト自転車を購入しました。リチウムイオンバッテリーの容量が6.6Ah と最新の8.9Ah よりも少ないですが、大丈夫でしょう。八王子のココらへんはアップダウンが多く、自転車だと買い物が大変です。原付バイクも考えましたが、講習がいっぱいで春休み期間中に免許を取得出来ませんでした。
その間に奥さんと下に娘は、カーテンを吊ったり、台所の整理をしたりして、だいぶ生活感のある部屋になって来ました。今日は大体ここまでということで、息子も一緒に帰って来ました。次の日曜日にまた行って、もっと生活できるように準備します。4時に出て、多少渋滞はありましたが、6時過ぎには家に到着しました。しばらく、引越し準備で忙しいです。
アパートでのネット環境はWi MAXが良いかな?と思って、UQ WiMAXのお試し貸出セットを借りて行ったのですが、回線が切れてスピードテストもできずにダメでした。フレッツ光のマンションタイプが来ているので、どこかに光回線を頼もうと思います。どこが良いかな?
Hikkoshi_1_130326.jpg
  1. 2013年03月24日 19:42 |
  2. 日記
  3. | トラックバック:0
  4. | コメント:2

FPGAの部屋のブログが300万アクセスを達成

FPGAの部屋のブログのアクセス数が300万アクセスを達成して、2013年3月22日、20時30分時点で、3,000,052アクセスでした。
FPGA_Room_Ac_300M_1_130322.png

皆さん見ていただいて、ありがとうございます。前回、200万アクセスのときは、2011年5月25日でした。あれから、約1年と10ヶ月で100万アクセス行きました。

2011年、2012年、途中ですが、2013年の月別アクセス数のグラフを貼っておきます。
FPGA_Room_Ac_300M_2_130322.png

FPGA_Room_Ac_300M_3_130322.png

FPGA_Room_Ac_300M_4_130322.png

これからもよろしくお願いします。多分、自分で自分のブログを一番見ていると思います。
  1. 2013年03月22日 21:40 |
  2. 日記
  3. | トラックバック:0
  4. | コメント:0

AX4 Master IPにAXI4 Lite Slave インターフェースを追加1(仕様の検討)

CMOSカメラ・インターフェース回路とビットマップ・ディスプレイ・コントローラにフレームバッファのスタートアドレスを指定するためのレジスタを付けようと思っている。これは、ZedBaordのLinux で確保されたフレームバッファ (FB) のスタートアドレスが変わるので、そのアドレスをLinuxから、CMOSカメラ・インターフェース回路とビットマップ・ディスプレイ・コントローラのレジスタに書き込んでおく。そして、その2つのAXI4 Master IPは、レジスタに書かれたFBスタートアドレスからFBを使用する。そうすれば、必ず領域を確保したFBを使用できて、他のLinuxプログラムを破壊することが無くなる。

まずは、CMOSカメラ・インターフェース回路とビットマップ・ディスプレイ・コントローラに付けるAXI4 Lite Slave の仕様を検討した。AXI4 Lite Slave バスについては下の2つのブログを参照のこと。

キャラクタROMをAXI4 Lite Slave として実装する1(AXI4 Lite バスの勉強)
キャラクタROMをAXI4 Lite Slave として実装する2(AXI4 Lite バスの勉強2)


・Write Transaction
(2013/03/22:Write Transaction を変更しました)
実際に作成するAXI4 Lite Slave バスのWrite Transaction のタイミングチャートを書いてみた。それを図1 に示す。
AXI4M_and_Lite_Slave_1_130321.png
図1 Write Transacion タイミングチャート

図1 の説明をすると、AWREADY を通常は 1 にしておく。ただし、Write Transaction を行なっている間は、、AWREADY を 0 にして、次の Write Transaction が始まるのを防ぐ。
Write data channel の WREADY は、常に 1 にアサートしている。よって、WVALIDが 1 にアサートされるのは、1クロックの間だけである。
Write response channel の BRESP は失敗の理由がないので、0 (OKAY) に固定する。

図1 の最初のWrite Transaction は通常に終了するが、60nsec にAWVALID を 1 にして始まる2つ目の Write Transaction は、60nsec には、AWREADY が 0 なので、Write addres channel を終了することができない。80nsec で AWREADY が 1 になるので、Write addres channel を終了することができた。
注:図1には WSTRB が書いてありますが、実際は、無視(すべてのバイトを有効に)します。

・Read Transaction
AXI4 Lite Slave バスのRead Transaction のタイミングチャートを書いてみた。それを図2 に示す。
AXI4M_and_Lite_Slave_2_130322.png
図2 Read Transacion タイミングチャート

図2 のAREADY のプロトコルはAWREADY と同様とする。後の信号は図2 を見てもらえばわかると思う。

この仕様で、2つのAXI4 Master IP(CMOSカメラ・インターフェース回路とビットマップ・ディスプレイ・コントローラ)にAX4 Lite Slave を追加していこうと思う。

なお、AXI4 Lite Slave 信号の定義は、C:\Xilinx\14.4\ISE_DS\EDK\hw\XilinxProcessorIPLib\pcores\axi_vdma_v5_04_a\hdl\vhdl\axi_vdma.vhd を参考にした。MPDファイルもあるので、いろいろと参考になる。
EDKで使用出来るIPについては、(全部かどうかは分からないが)C:\Xilinx\14.4\ISE_DS\EDK\hw\XilinxProcessorIPLib\pcores にIPのソースファイルがあるので、見てみると参考になると思う。
  1. 2013年03月21日 04:47 |
  2. 複数のAXI4 バスを持つIPの作製
  3. | トラックバック:0
  4. | コメント:0

プロセッサなしでEDKでAXI IPコアを使う方法

Qsysと同じように、EDKでもプロセッサ抜きでXPSプロジェクトでAXI IPを接続できるようです。
12.3 EDK - How do I use EDK AXI IP cores in a system with no processor?日本語のページもありますが、図へのリンクが無いみたいです。一旦、BSBでMicroBlaze付きでXPSプロジェクトを構築して、後から必要ないMicroBlazeなどのIPをDeleteしています。
サンプル・プロジェクトもついています。

サンプル・プロジェクトをダウンロードして、ISEを起動しました。xc6vlx760-sff1760 を使っています。
XPSwoMB_2_130319.png

XPSプロジェクトを下に示します。
XPSwoMB_1_130319.png

DDR3 SDRAMコントローラのAXIバス出力を取り出すだけのXPSプロジェクトのようです。

プロセッサなしで使えるかどうかを確かめるために、自作カスタムIPのCMOSカメラ・インターフェース回路とビットマップ・ディスプレイ・コントローラを接続して、インプリメントできるかどうか確かめることにしました。
XPSwoMB_3_130319.png

ISEでXPSプロジェクトのトップファイルを作成して、インプリメントを行いました。

インプリメント終了ました。無事にインプリメント終了です。
XPSwoMB_5_130319.png

FPGA Editor で見ると、bitmap_disp_cntrler もインスタンスされています。問題ないようです。動作はボードが無いので、確かめることができません。
XPSwoMB_4_130319.png

これで、XPSプロジェクトを使用して、MicroBlazeプロセッサなしで、システムを組むことができました。OpenCores のプロセッサをAXIバス入出力に変更してから、XPSプロジェクトでペリフェラルIPと接続することもできると思います。
  1. 2013年03月19日 05:52 |
  2. EDK
  3. | トラックバック:0
  4. | コメント:0

XPSプロジェクトにカスタムAX Slave Lite IPを追加してSysfsを見る

前回、ZedBoard用Digilent LinuxのSysfsを見たが、XPSプロジェクトにカスタムAX Slave Lite IP(char_wirte_axi_master)を追加して、同様にSysfsを見るとどうなるか確かめてみた。char_wirte_axi_masterは、キャラクタ・ジェネレータROMデータをARMプロセッサからReadするAXI4 Slave Liteデバイスだ。

・XPSプロジェクトに、char_wirte_axi_masterをAdd IPして、processing_system7_0 のAXI4 Liteバスに接続した。
ISE_for_Linux_115_130316.png

・Addressタブで、0x46000000番地から64Kバイトの領域を割り当てた。
ISE_for_Linux_114_130316.png

・XPSプロジェクトで、Projectメニュー -> Clean All Generated Files を選択して、XPSが生成したファイルをすべて消去した。

・ISEに戻って、Projectメニュー -> Cleanup Project Files... を行なって、まっさらな状態で論理合成、インプリメントを行った。

・インプリメントが終了した。ビットストリームと一緒にハードウェア・デザインをSDKにエクスポートして、SDKを立ち上げた。

・SDKの全プロジェクトをClean して再ビルドを行ったところ、char_rom_axi_lite_0: char-rom-axi-lite@46000000のエントリができていた。
ISE_for_Linux_116_130317.png

・char_rom_axi_lite_0: char-rom-axi-lite@46000000のエントリだけを、~/HDL/ZedBoard/ZedBoard_OOB_Design/linux/Work/devicetree_ramdisk_mt9d111.dts に追加した。
ISE_for_Linux_117_130317.png

・”~/HDL/ZedBoard/ZedBoard_OOB_Design/linux/Work$ ~/HDL/ZedBoard/linux-digilent-master/scripts/dtc/dtc -O dtb -I dts -o devicetree_ramdisk.dtb devicetree_ramdisk_mt9d111.dts”を実行して、DTCでコンパイル下がエラーになってしまった。エラーを下に示す。

DTC: dts->dtb on file "devicetree_ramdisk_mt9d111.dts"
ERROR (duplicate_property_names): Duplicate property name ranges in /axi@0/char-rom-axi-lite@46000000
ERROR: Input tree has errors, aborting (use -f to force output)

ISE_for_Linux_118_130317.png

・最初の”ranges ;”を消去した。

        char_rom_axi_lite_0: char-rom-axi-lite@46000000 {
            #address-cells = <1>;
            #size-cells = <1>;
            compatible = "xlnx,compound";
            ranges = < 0x46000000 0x46000000 0x10000 >;
        } ;



・もう一度、DTCでコンパイルしたところコンパイルできた。
ISE_for_Linux_119_130317.png

・出来上がったdevicetree_ramdisk.dtb をSDカードにコピーして、ZedBoardに入れて立ち上げた。

・/sys/devices/axi.0 を見てみたが、0x46000000 のアドレスのデバイスはなかった。

cd sys
zynq> ls
block class devices fs module
bus dev firmware kernel power

zynq> cd devices/
zynq> ls
ARMv7 Cortex-A9 breakpoint software virtual
axi.0 platform system

zynq> cd axi.0/
zynq> ls
40400000.axidma e0002000.usb f8f02000.pl310
41600000.i2c e000a000.gpio leds.4
43000000.axivdma e000b000.eth
modalias
45000000.i2c e000d000.qspi power
70e00000.cf-adv7x11-core e0100000.sdhci
subsystem
75c00000.axi-spdif-tx f8001000.timer uevent
adv7511_hdmi_snd.3 f8005000.swdt xilinx_pcm_audio.2
char-rom-axi-lite.1 f8007000.devcfg zed_oled.5
e0001000.uart f8f01000.intc

zynq>


・他のIPには、”reg = "が書いてあるので、char_rom_axi_lite_0 に”reg = < 0x46000000 0x10000 >;”を追加した

        char_rom_axi_lite_0: char-rom-axi-lite@46000000 {
            #address-cells = <1>;
            #size-cells = <1>;
            compatible = "xlnx,compound";
            reg = < 0x46000000 0x10000 >;
            ranges = < 0x46000000 0x46000000 0x10000 >;
        } ;


・これで、DTCでコンパイルして、出来上がったdevicetree_ramdisk.dtb をSDカードにコピーして、ZedBoardに入れて立ち上げた。

・/sys/devices/axi.0 を見たところ、46000000.char-rom-axi-lite ディレクトリができた。

zynq> ls
40400000.axidma             e0100000.sdhci
41600000.i2c                f8001000.timer
43000000.axivdma            f8005000.swdt
45000000.i2c                f8007000.devcfg
46000000.char-rom-axi-lite  f8f01000.intc
70e00000.cf-adv7x11-core    f8f02000.pl310
75c00000.axi-spdif-tx       leds.3
adv7511_hdmi_snd.2
          modalias
e0001000.uart               power
e0002000.usb 
               subsystem
e000a000.gpio               uevent
e000b000.eth                xilinx_pcm_audio.1
e000d000.qspi               zed_oled.4

zynq>

  1. 2013年03月17日 07:13 |
  2. Linux
  3. | トラックバック:0
  4. | コメント:0

ZedBoard用Digilent LinuxのSysfs

ウィキペディアのSysfs によると、”Sysfs は Linuxカーネル 2.6 によって提供される仮想ファイルシステムである。”だそうだ。
以下に、ウィキペディアのSysfsの文章を引用する。

sysfs は元々 ddfs (Device Driver Filesystem) と呼ばれており、始め、実装されているとき新しいドライバモデルをデバッグするために作成された。


ドライバモデルツリーに追加された個々のオブジェクト(ドライバ、クラスドライバを含むデバイス)に対して、sysfs 内にディレクトリが作られる。親と子の関係は(物理的な配置を反映して)/sys/devices/ の下のサブディレクトリに反映される。サブディレクトリ /sys/bus/ はシンボリックリンクが置かれており、どのようにデバイスが異なるバスに所属しているのかを反映している。/sys/block/ がブロックデバイスを含む一方で、/sys/class/ はネットワークのようなクラスによって分類されたデバイスを表している。


Sysfs については、xoxyuxuさんにヒントを頂いた。ありがとうございました。

ZedBoardのLinuxで、/sys ディレクトリの下を見ていこうと思う。(以下、この色で表示された名前はディレクトリを表す)

zynq> cd sys
zynq> ls
block     class     devices   fs        module
bus       dev       firmware  kernel    power

zynq>


8個のディレクトリがある。devices ディレクトリを見てみよう。

zynq> cd devices
zynq> ls
ARMv7 Cortex-A9  breakpoint       software         virtual
axi.0            platform         system

zynq>


axi.0 ディレクトリに入ってみる。

zynq> cd axi.0
zynq> ls
40400000.axidma           e000a000.gpio             leds.3
41600000.i2c              e000b000.eth
              modalias
43000000.axivdma          e000d000.qspi             power
45000000.i2c              e0100000.sdhci 
           subsystem
70e00000.cf-adv7x11-core  f8001000.timer            uevent
75c00000.axi-spdif-tx     f8005000.swdt             xilinx_pcm_audio.1
adv7511_hdmi_snd.2        f8007000.devcfg           zed_oled.4
e0001000.uart             f8f01000.intc
e0002000.usb              f8f02000.pl310

zynq> cd 45000000.i2c/
zynq> ls
driver     i2c-1      modalias   power      subsystem  uevent
zynq> more uevent
DRIVER=xiic-i2c
OF_NAME=i2c
OF_FULLNAME=/axi@0/i2c@45000000
OF_COMPATIBLE_0=xlnx,axi-iic-1.02.a
OF_COMPATIBLE_1=xlnx,xps-iic-2.00.a
OF_COMPATIBLE_N=2
MODALIAS=of:Ni2cT<NULL>Cxlnx,axi-iic-1.02.aCxlnx,xps-iic-2.00.a
zynq>


axi.0 ディレクトリの下には、XPSプロジェクトのIPごとに先にアドレスのついたディレクトリが並んでいる。そのうちの 45000000.i2c にはいった。このIPはXPSプロジェクトでは、axi_iic_mt9d111 というインスタンス名を持っているはずだ。
ISE_for_Linux_112_130316.png

もう1つのaxi iic の41600000.i2c/ を見てみた。

zynq> cd 41600000.i2c/
zynq> ls
driver     i2c-0      modalias   power      subsystem  uevent
zynq> more uevent
DRIVER=xiic-i2c
OF_NAME=i2c
OF_FULLNAME=/axi@0/i2c@41600000
OF_COMPATIBLE_0=xlnx,axi-iic-1.01.b
OF_COMPATIBLE_1=xlnx,xps-iic-2.00.a
OF_COMPATIBLE_N=2
MODALIAS=of:Ni2cT<NULL>Cxlnx,axi-iic-1.01.bCxlnx,xps-iic-2.00.a
zynq>


OF_COMPATIBLE_0 が違っていて、i2c-0 というディレクトリがある。45000000.i2c/には i2c-1 というディレクトリがあった。
試しに、40400000.axidma/ ディレクトリに入ってみたが、OF_COMPATIBLE_1 はなかった。

zynq> cd 40400000.axidma/
zynq> ls
dma        driver     modalias   power      subsystem  uevent
zynq> more uevent
DRIVER=xilinx-dma
OF_NAME=axidma
OF_FULLNAME=/axi@0/axidma@40400000
OF_COMPATIBLE_0=xlnx,axi-dma
OF_COMPATIBLE_N=1
MODALIAS=of:NaxidmaT<NULL>Cxlnx,axi-dma
zynq>


/sys ディレクトリ下のその他のディレクトリの内容を下に示す。

zynq> ls
block     class     devices   fs        module
bus       dev       firmware  kernel    power
zynq> ls block
loop0    loop4    mmcblk0  ram11    ram15    ram5     ram9
loop1    loop5    ram0     ram12    ram2     ram6
loop2    loop6    ram1     ram13    ram3     ram7
loop3    loop7    ram10    ram14    ram4     ram8

zynq> ls class/
bdi           input         mtd           scsi_host     vtconsole
dma           leds          net           sound         watchdog
drm           mdio_bus      rtc           spi_master    xslcr_mio
gpio          mem           scsi_device   tty           xslcr_reset
graphics      misc          scsi_disk     udc
i2c-adapter   mmc_host      scsi_generic  vc

zynq> ls fs
ext4
zynq> ls module/
block           keyboard        rcutree         spurious
brd             loop            scsi_mod        tcp_cubic
drm             mmc_core        sdhci           usb_storage
drm_kms_helper  mmcblk          sg              usbcore
ehci_hcd        mousedev        snd             usbhid
hid             pl330           snd_pcm         vt
i2c_algo_bit    printk          snd_timer       xilinx_uartps
kernel          psmouse         sparse_keymap

zynq> ls bus
amba          event_source  mdio_bus      scsi          spi
clocksource   hid           mmc           sdio          usb
cpu           i2c           platform      serio

zynq> ls dev
block  char
zynq> ls firmware/
zynq> ls kernel/
debug          mm             uevent_helper
fscaps         notes          uevent_seqnum
zynq> ls power/
state
zynq>

ISE_for_Linux_113_130316.png
  1. 2013年03月16日 05:33 |
  2. Linux
  3. | トラックバック:0
  4. | コメント:0

DTCでDevice Tree をコンパイルする2

DTCでDevice Tree をコンパイルする1の続き。

前回は、xilinx.dts をDTCでコンパイルすることができたが、それをdevicetree_ramdisk.dtb をとしてSDカードに入れて使用するとエラーになった。バグを修正して、もう一度、やってみるとフレームバッファの領域を確保することができなかった。
今回は、自作のカスタムIPを搭載して、CMOSカメラの画像をVGAポートに800x600で表示するIPを追加したXPSプロジェクトは、ZedBoard_OOB_Desin に、axi_iic_mt9d111 が追加されているだけである(ARMプロセッサに接続されるAXIスレーブモジュールの話)。よって、axi_iic_mt9d111 の .dts 上の記述を、device_ramdisk.dts に追加してしまうことにした。、axi_iic_mt9d111 の .dts 上の記述を下に示す。

        axi_iic_mt9d111: i2c@45000000 {
            compatible = "xlnx,axi-iic-1.02.a", "xlnx,xps-iic-2.00.a";
            interrupt-parent = <&ps7_scugic_0>;
            interrupts = < 0 55 4 >;
            reg = < 0x45000000 0x10000 >;
            xlnx,family = "zynq";
            xlnx,gpo-width = <0x1>;
            xlnx,iic-freq = <0x186a0>;
            xlnx,instance = "axi_iic_mt9d111";
            xlnx,scl-inertial-delay = <0x0>;
            xlnx,sda-inertial-delay = <0x0>;
            xlnx,sda-level = <0x1>;
            xlnx,ten-bit-adr = <0x0>;
        } ;


これを、”axi_spdif: axi-spdif-tx@0x75c00000 {”の前に追加したところ、エラーになってしまった。

masaaki@masaaki-VirtualBox:~/HDL/ZedBoard/ZedBoard_OOB_Design/linux/Work$ ~/HDL/ZedBoard/linux-digilent-master/scripts/dtc/dtc -O dtb -I dts -f -o devicetree_ramdisk.dtb devicetree_ramdisk.dts
DTC: dts->dtb on file "devicetree_ramdisk.dts"
ERROR (phandle_references): Reference to non-existent node or label "ps7_scugic_0"

Warning: Input tree has errors, output forced


”ps7_scugic_0” は、”interrupt-parent”を設定している部分だ。これがオリジナルの devicetree_ramdisk.dts では、”gic”だったので、axi_iic_mt9d111 の記述を変更した。devicetree_ramdisk.dts の axi_iic_mt9d111 周辺の記述を下に示す。

        devcfg@f8007000 {
            compatible = "xlnx,ps7-dev-cfg-1.00.a";
            reg = <0xf8007000 0x1000>;
            interrupts = <0x0 0x8 0x0>;
            interrupt-parent = <&gic>;
        };

        axi_dma: axidma@40400000 {
            #address-cells = <0x1>;
            #size-cells = <0x1>;
            #dma-cells = <0x1>;
            compatible = "xlnx,axi-dma";
            reg = <0x40400000 0x1000>;
            xlnx,sg-include-stscntrl-strm = <0x0>;

            dma-channel@40400000 {
                compatible = "xlnx,axi-dma-mm2s-channel";
                interrupts = <0x0 0x3a 0x4>;
                xlnx,datawidth = <0x20>;
                xlnx,include-dre = <0x0>;
            };
        };

        axi_iic_mt9d111: i2c@45000000 {
            compatible = "xlnx,axi-iic-1.02.a", "xlnx,xps-iic-2.00.a";
            interrupt-parent = <&gic>;
            interrupts = < 0 55 4 >;
            reg = < 0x45000000 0x10000 >;
            xlnx,family = "zynq";
            xlnx,gpo-width = <0x1>;
            xlnx,iic-freq = <0x186a0>;
            xlnx,instance = "axi_iic_mt9d111";
            xlnx,scl-inertial-delay = <0x0>;
            xlnx,sda-inertial-delay = <0x0>;
            xlnx,sda-level = <0x1>;
            xlnx,ten-bit-adr = <0x0>;
        } ;

        axi_spdif: axi-spdif-tx@0x75c00000 {
            compatible = "adi,axi-spdif-tx-1.00.a";
            reg = <0x75c00000 0x1000>;
            clock-frequency = <0xbb8000>;
        };


これをDTCでコンパイルすると無事にコンパイルすることができた。出来上がった devicetree_ramdisk.dtb をSDカードにコピーして、ZedBoardを立ち上げたところ、フレームバッファの領域を確保することができた。下に起動メッセージを転載する。

U-Boot 2012.04.01-00297-gc319bf9-dirty (Sep 13 2012 - 09:30:49)

DRAM: 512 MiB
WARNING: Caches not enabled
MMC: SDHCI: 0
Using default environment

In: serial
Out: serial
Err: serial
Net: zynq_gem
Hit any key to stop autoboot: 0
Copying Linux from SD to RAM...
Device: SDHCI
Manufacturer ID: 73
OEM: 4247
Name: NCard
Tran Speed: 25000000
Rd Block Len: 512
SD version 1.0
High Capacity: Yes
Capacity: 7.5 GiB
Bus Width: 1-bit
reading zImage

2450208 bytes read
reading devicetree_ramdisk.dtb

6204 bytes read
reading ramdisk8M.image.gz

3699284 bytes read
## Starting application at 0x00008000 ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Linux version 3.6.0-digilent-13.01 (masaaki@masaaki-VirtualBox) (gcc version 4.6.3 (Sourcery CodeBench Lite 2012.03-79) ) #6 SMP PREEMPT Fri Mar 8 19:52:15 JST 2013
[ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Xilinx Zynq Platform, model: Xilinx Zynq ZED
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] BUG: mapping for 0xe0001000 at 0xfe001000 out of vmalloc space
[ 0.000000] PERCPU: Embedded 7 pages/cpu @c1408000 s6976 r8192 d13504 u32768
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
[ 0.000000] Kernel command line: console=ttyPS0,115200 root=/dev/ram rw initrd=0x800000,8M earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 512MB = 512MB total
[ 0.000000] Memory: 506768k/506768k available, 17520k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xfd000000 ( 456 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0423984 (4207 kB)
[ 0.000000] .init : 0xc0424000 - 0xc0449b40 ( 151 kB)
[ 0.000000] .data : 0xc044a000 - 0xc04828e0 ( 227 kB)
[ 0.000000] .bss : 0xc0482904 - 0xc04990b0 ( 90 kB)
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Dump stacks of tasks blocking RCU-preempt GP.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[ 0.000000] NR_IRQS:512
[ 0.000000] Zynq clock init
[ 0.000000] xlnx,ps7-ttc-1.00.a #0 at 0xe0800000, irq=43
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: at arch/arm/kernel/smp_twd.c:389 time_init+0x20/0x30()
[ 0.000000] twd_local_timer_of_register failed (-19)
[ 0.000000] Modules linked in:
[ 0.000000] [] (unwind_backtrace+0x0/0xe0) from [] (warn_slowpath_common+0x4c/0x64)
[ 0.000000] [] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_fmt+0x2c/0x3c)
[ 0.000000] [] (warn_slowpath_fmt+0x2c/0x3c) from [] (time_init+0x20/0x30)
[ 0.000000] [] (time_init+0x20/0x30) from [] (start_kernel+0x1ac/0x2f0)
[ 0.000000] [] (start_kernel+0x1ac/0x2f0) from [<00008044>] (0x8044)
[ 0.000000] ---[ end trace 1b75b31a2719ed1c ]---
[ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.020000] Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096)
[ 0.110000] pid_max: default: 32768 minimum: 301
[ 0.110000] Mount-cache hash table entries: 512
[ 0.110000] CPU: Testing write buffer coherency: ok
[ 0.120000] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.120000] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
[ 0.120000] Setting up static identity map for 0x2ed340 - 0x2ed374
[ 0.130000] L310 cache controller enabled
[ 0.130000] l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72360000, Cache size: 524288 B
[ 0.200000] Map SLCR registers
[ 0.200000] CPU1: Booted secondary processor
[ 0.290000] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.290000] Brought up 2 CPUs
[ 0.290000] SMP: Total of 2 processors activated (2664.03 BogoMIPS).
[ 0.300000] devtmpfs: initialized
[ 0.300000] NET: Registered protocol family 16
[ 0.310000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.320000] xgpiops e000a000.gpio: gpio at 0xe000a000 mapped to 0xe084a000
[ 0.320000] registering platform device 'pl330' id 0
[ 0.330000] registering platform device 'arm-pmu' id 0
[ 0.330000] registering platform device 'zynq-dvfs' id 0
[ 0.340000]
[ 0.340000] ###############################################
[ 0.340000] # #
[ 0.350000] # Board ZED Init #
[ 0.350000] # #
[ 0.360000] ###############################################
[ 0.360000]
[ 0.370000] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 0.380000] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.400000] xslcr xslcr.0: at 0xF8000000 mapped to 0xF8000000
[ 0.420000] bio: create slab at 0
[ 0.420000] SCSI subsystem initialized
[ 0.420000] usbcore: registered new interface driver usbfs
[ 0.420000] usbcore: registered new interface driver hub
[ 0.430000] usbcore: registered new device driver usb
[ 0.440000] Advanced Linux Sound Architecture Driver Version 1.0.25.
[ 0.440000] Switching to clocksource xttcpss_timer1
[ 0.460000] Clockevents: could not switch to one-shot mode:
[ 0.460000] Clockevents: could not switch to one-shot mode: dummy_timer is not functional.
[ 0.460000] Could not switch to high resolution mode on CPU 1
[ 0.460000] dummy_timer is not functional.
[ 0.470000] Could not switch to high resolution mode on CPU 0
[ 0.490000] NET: Registered protocol family 2
[ 0.490000] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.490000] TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.500000] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.510000] TCP: reno registered
[ 0.510000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.510000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.520000] NET: Registered protocol family 1
[ 0.530000] Trying to unpack rootfs image as initramfs...
[ 0.530000] rootfs image is not initramfs (no cpio magic); looks like an initrd
[ 0.570000] Freeing initrd memory: 8192K
[ 0.570000] pl330 dev 0 probe success
[ 0.580000] msgmni has been set to 1005
[ 0.580000] io scheduler noop registered
[ 0.580000] io scheduler deadline registered
[ 0.590000] io scheduler cfq registered (default)
[ 0.590000] xuartps e0001000.uart: failed to get alias id, errno -19
[ 0.600000] e00rイconsole [ttyPS0] enabled, bootconsole disabled
[ 0.600000] console [ttyPS0] enabled, bootconsole disabled
[ 0.610000] xdevcfg f8007000.devcfg: ioremap f8007000 to e0852000 with size 1000
[ 0.620000] [drm] Initialized drm 1.1.0 20060810
[ 0.640000] brd: module loaded
[ 0.650000] loop: module loaded
[ 0.650000] xqspips e000d000.qspi: master is unqueued, this is deprecated
[ 0.660000] xqspips e000d000.qspi: at 0xE000D000 mapped to 0xE0854000, irq=51
[ 0.670000] libphy: XEMACPS mii bus: probed
[ 0.670000] xemacps e000b000.eth: Could not find MAC address in device tree, use default
[ 0.680000] xemacps e000b000.eth: pdev->id -1, baseaddr 0xe000b000, irq 54
[ 0.690000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.690000] xusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controller
[ 0.700000] xusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1
[ 0.740000] xusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000
[ 0.760000] xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00
[ 0.760000] hub 1-0:1.0: USB hub found
[ 0.770000] hub 1-0:1.0: 1 port detected
[ 0.770000] Initializing USB Mass Storage driver...
[ 0.770000] usbcore: registered new interface driver usb-storage
[ 0.780000] USB Mass Storage support registered.
[ 0.790000] mousedev: PS/2 mouse device common for all mice
[ 0.790000] xwdtps f8005000.swdt: Xilinx Watchdog Timer at 0xe085c000 with timeout 10s
[ 0.800000] sdhci: Secure Digital Host Controller Interface driver
[ 0.810000] sdhci: Copyright(c) Pierre Ossman
[ 0.810000] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.820000] mmc0: Invalid maximum block size, assuming 512 bytes
[ 0.870000] mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
[ 0.870000] usbcore: registered new interface driver usbhid
[ 0.880000] usbhid: USB HID core driver
[ 0.890000] adv7511-hdmi-snd adv7511_hdmi_snd.2: CODEC adv7511.2-0039 not registered
[ 0.890000] platform adv7511_hdmi_snd.2: Driver adv7511-hdmi-snd requests probe deferral
[ 0.900000] TCP: cubic registered
[ 0.910000] NET: Registered protocol family 17
[ 0.910000] VFP support v0.3: [ 0.910000] new mode: 1920x1080 2200x1125 148500
[ 0.910000] new mode: 720x480 858x525 27000
[ 0.910000] new mode: 1280x720 1650x750 74250
[ 0.910000] new mode: 720x576 864x625 27000
[ 0.910000] new mode: 1680x1050 1840x1080 119000
[ 0.910000] new mode: 1280x1024 1728x1067 132840
[ 0.910000] new mode: 1280x1024 1728x1066 128946
[ 0.910000] new mode: 1280x1024 1688x1066 108000
[ 0.910000] new mode: 1280x960 1800x1000 108000
[ 0.910000] new mode: 1280x800 1440x823 71000
[ 0.910000] new mode: 800x600 1056x628 40000
[ 0.910000] new mode: 800x600 1024x625 36000
[ 0.910000] new mode: 640x480 840x500 31500
[ 0.910000] new mode: 640x480 832x520 31500
[ 0.910000] new mode: 640x480 864x525 30240
[ 0.910000] new mode: 640x480 800x525 25200
[ 0.910000] new mode: 720x400 900x449 28320
[ 0.910000] new mode: 1280x1024 1688x1066 135000
[ 0.910000] new mode: 1024x768 1312x800 78800
[ 0.910000] new mode: 1024x768 1328x806 75000
[ 0.910000] new mode: 1024x768 1344x806 65000
[ 0.910000] new mode: 832x624 1152x667 57284
[ 0.910000] new mode: 800x600 1056x625 49500
[ 0.910000] new mode: 800x600 1040x666 50000
[ 0.910000] new mode: 848x480 1088x517 33750
[ 0.910000] new mode: 1152x864 1600x900 108000
[ 0.910000] new mode: 1280x768 1440x790 68250
[ 0.910000] new mode: 1280x768 1696x805 102250
[ 0.910000] new mode: 1280x800 1696x838 106500
[ 0.910000] new mode: 1360x768 1792x795 85500
[ 0.910000] new mode: 1400x1050 1560x1080 101000
[ 0.910000] new mode: 1400x1050 1896x1099 156000
[ 0.910000] new mode: 1440x900 1600x926 88750
[ 0.910000] new mode: 1440x900 1936x942 136750
[ 0.910000] new mode: 1024x576 1312x597 46970
[ 0.910000] new mode: 1366x768 1800x795 85885
[ 0.910000] new mode: 1600x900 2128x932 118963
[ 0.910000] new mode: 1680x945 2240x978 131481
[ 0.910000] new mode: 640x480 800x525 25175
[ 0.910000] new mode: 720x480 858x525 27000
[ 0.910000] new mode: 720x480 858x525 27000
[ 0.910000] new mode: 1280x720 1650x750 74250
[ 0.910000] new mode: 1920x1080 2200x1125 74250
[ 0.910000] new mode: 1920x1080 2200x1125 148500
[ 0.910000] new mode: 720x576 864x625 27000
[ 0.910000] new mode: 720x576 864x625 27000
[ 0.910000] new mode: 1280x720 1980x750 74250
[ 0.910000] new mode: 1920x1080 2640x1125 74250
[ 0.910000] new mode: 1440x576 1728x625 54000
[ 0.910000] new mode: 1920x1080 2640x1125 148500
[ 0.910000] new mode: 1920x1080 2200x1125 148500
[ 0.910000] new mode: 720x480 858x525 27000
[ 0.910000] new mode: 1280x720 1650x750 74250
[ 0.910000] new mode: 720x576 864x625 27000
[ 0.910000] new mode: 800x600 1056x628 40000
[ 0.910000] new mode: 800x600 1024x625 36000
[ 0.910000] new mode: 640x480 840x500 31500
[ 0.910000] new mode: 640x480 832x520 31500
[ 0.910000] new mode: 640x480 864x525 30240
[ 0.910000] new mode: 640x480 800x525 25200
[ 0.910000] new mode: 720x400 900x449 28320
[ 0.910000] new mode: 1280x1024 1688x1066 135000
[ 0.910000] new mode: 1024x768 1312x800 78800
[ 0.910000] new mode: 1024x768 1328x806 75000
[ 0.910000] new mode: 1024x768 1344x806 65000
[ 0.910000] new mode: 832x624 1152x667 57284
[ 0.910000] new mode: 800x600 1056x625 49500
[ 0.910000] new mode: 800x600 1040x666 50000
[ 0.910000] new mode: 640x480 800x525 25175
[ 0.910000] new mode: 720x480 858x525 27000
[ 0.910000] new mode: 720x480 858x525 27000
[ 0.910000] new mode: 1280x720 1650x750 74250
[ 0.910000] new mode: 1920x1080 2200x1125 74250
[ 0.910000] new mode: 1920x1080 2200x1125 148500
[ 0.910000] new mode: 720x576 864x625 27000
[ 0.910000] new mode: 720x576 864x625 27000
[ 0.910000] new mode: 1280x720 1980x750 74250
[ 0.910000] new mode: 1920x1080 2640x1125 74250
[ 0.910000] new mode: 1440x576 1728x625 54000
[ 0.910000] new mode: 1920x1080 2640x1125 148500
Modeline 84:"1920x1080" 0 74250 1920 2448 2492 2640 1080 1084 1094 1125 0x40 0x15
Not using 1920x1080 mode 7
Modeline 79:"1920x1080" 0 74250 1920 2008 2052 2200 1080 1084 1094 1125 0x40 0x15
Not using 1920x1080 mode 7
[CONNECTOR:5:HDMI-A-1] probed modes :
Modeline 80:"1920x1080" 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x48 0x5
Modeline 86:"1920x1080" 50 148500 1920 2448 2492 2640 1080 1084 1089 1125 0x40 0x5
Modeline 11:"1680x1050" 60 119000 1680 1728 1760 1840 1050 1053 1059 1080 0x40 0x9
Modeline 44:"1680x945" 60 131481 1680 1784 1960 2240 945 946 949 978 0x0 0x6
Modeline 38:"1400x1050" 75 156000 1400 1504 1648 1896 1050 1053 1057 1099 0x40 0x6
Modeline 37:"1400x1050" 60 101000 1400 1448 1480 1560 1050 1053 1057 1080 0x40 0x9
Modeline 43:"1600x900" 60 118963 1600 1696 1864 2128 900 901 904 932 0x0 0x6
Modeline 68:"1280x1024" 75 135000 1280 1296 1440 1688 1024 1025 1028 1066 0x40 0x5
Modeline 12:"1280x1024" 72 132840 1280 1368 1504 1728 1024 1025 1028 1067 0x0 0x6
Modeline 13:"1280x1024" 70 128946 1280 1368 1504 1728 1024 1025 1028 1066 0x0 0x6
Modeline 14:"1280x1024" 60 108000 1280 1328 1440 1688 1024 1025 1028 1066 0x40 0x5
Modeline 40:"1440x900" 75 136750 1440 1536 1688 1936 900 903 909 942 0x40 0x6
Modeline 39:"1440x900" 60 88750 1440 1488 1520 1600 900 903 909 926 0x40 0x9
Modeline 15:"1280x960" 60 108000 1280 1376 1488 1800 960 961 964 1000 0x40 0x5
Modeline 42:"1366x768" 60 85885 1366 1439 1583 1800 768 769 772 795 0x0 0x6
Modeline 36:"1360x768" 60 85500 1360 1424 1536 1792 768 771 777 795 0x40 0x5
Modeline 35:"1280x800" 75 106500 1280 1360 1488 1696 800 803 809 838 0x40 0x6
Modeline 16:"1280x800" 60 71000 1280 1328 1360 1440 800 803 809 823 0x40 0x9
Modeline 32:"1152x864" 75 108000 1152 1216 1344 1600 864 865 868 900 0x40 0x5
Modeline 34:"1280x768" 75 102250 1280 1360 1488 1696 768 771 778 805 0x40 0x9
Modeline 33:"1280x768" 60 68250 1280 1328 1360 1440 768 771 778 790 0x40 0x9
Modeline 83:"1280x720" 50 74250 1280 1720 1760 1980 720 725 730 750 0x40 0x5
Modeline 78:"1280x720" 60 74250 1280 1390 1430 1650 720 725 730 750 0x40 0x5
Modeline 85:"1440x576" 50 54000 1440 1464 1592 1728 576 581 586 625 0x40 0xa
Modeline 69:"1024x768" 75 78800 1024 1040 1136 1312 768 769 772 800 0x40 0x5
Modeline 70:"1024x768" 70 75000 1024 1048 1184 1328 768 771 777 806 0x40 0xa
Modeline 71:"1024x768" 60 65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa
Modeline 41:"1024x576" 60 46970 1024 1064 1168 1312 576 577 580 597 0x0 0x6
Modeline 72:"832x624" 75 57284 832 864 928 1152 624 625 628 667 0x40 0xa
Modeline 74:"800x600" 72 50000 800 856 976 1040 600 637 643 666 0x40 0x5
Modeline 73:"800x600" 75 49500 800 816 896 1056 600 601 604 625 0x40 0x5
Modeline 61:"800x600" 60 40000 800 840 968 1056 600 601 605 628 0x40 0x5
Modeline 62:"800x600" 56 36000 800 824 896 1024 600 601 603 625 0x40 0x5
Modeline 82:"720x576" 50 27000 720 732 796 864 576 581 586 625 0x40 0xa
Modeline 31:"848x480" 60 33750 848 864 976 1088 480 486 494 517 0x40 0x5
Modeline 77:"720x480" 60 27000 720 736 798 858 480 489 495 525 0x40 0xa
Modeline 64:"640x480" 73 31500 640 664 704 832 480 489 491 520 0x40 0xa
Modeline 63:"640x480" 75 31500 640 656 720 840 480 481 484 500 0x40 0xa
Modeline 65:"640x480" 67 30240 640 704 768 864 480 483 486 525 0x40 0xa
Modeline 66:"640x480" 60 25200 640 656 752 800 480 490 492 525 0x40 0xa
Modeline 75:"640x480" 60 25175 640 656 752 800 480 490 492 525 0x40 0xa
Modeline 67:"720x400" 70 28320 720 738 846 900 400 412 414 449 0x40 0x6

connector 5 enabled? yes
looking for cmdline mode on connector 5
looking for preferred mode on connector 5
found mode 1920x1080
picking CRTCs for 4096x4096 config
desired mode 1920x1080 set on crtc 3
surface width(1920), height(1080) and bpp(32
[ 0.920000] mmc0: new high speed SDHC card at address b368
[ 0.940000] fbi->screen_base = 0xe08d1000
[ 0.940000] fbi->fix.smem_start = 0x19000000
[ 0.940000] fbi->screen_size = 0x7e9000

[ 1.610000] implementor 41 architecture 3 part 30 variant 9 rev 4
[ 1.610000] Registering SWP/SWPB emulation handler
[ 1.610000] mmcblk0: mmc0:b368 NCard 7.48 GiB
[ 1.620000] registered taskstats version 1
[ 1.620000] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 1.620000] ALSA device list:
[ 1.620000] No soundcards found.
[ 1.620000] setting clock to: 148500
[ 1.620000] raw_edid: d8c0cd80 7
[ 1.620000] Using YCbCr output
[ 1.620000] adv7511-hdmi-snd adv7511_hdmi_snd.2: CODEC adv7511.2-0039 not registered
[ 1.620000] mmcblk0: p1
[ 1.620000] platform adv7511_hdmi_snd.2: Driver adv7511-hdmi-snd requests probe deferral
[ 1.620000] adv7511-hdmi-snd adv7511_hdmi_snd.2: CODEC adv7511.2-0039 not registered
[ 1.620000] platform adv7511_hdmi_snd.2: Driver adv7511-hdmi-snd requests probe deferral
[ 1.660000] Console: switching to colour frame buffer device 240x67
[ 1.760000] fb0: frame buffer device
[ 1.760000] drm: registered panic notifier
[ 1.760000] [drm] Initialized analog_drm 1.0.0 20110530 on minor 0
[ 1.780000] RAMDISK: gzip image found at block 0
[ 2.090000] EXT4-fs (ram0): warning: mounting unchecked fs, running e2fsck is recommended
[ 2.100000] EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
[ 2.110000] VFS: Mounted root (ext4 filesystem) on device 1:0.
[ 2.110000] Freeing init memory: 148K
Starting rcS...
++ Mounting filesystem
++ Setting up mdev
++ Configure static IP 192.168.3.130
++ Starting telnet daemon
++ Starting http daemon
++ Starting ftp daemon
++ Starting dropbear (ssh) daemon
++ Starting OLED Display
insmod: can't read '/lib/modules/3.6.0-digilent-13.01/pmodoled-gpio.ko': No such file or directory
++ Exporting LEDs & SWs
rcS Complete
zynq> [ 5.350000] xemacps e000b000.eth: Set clk to 24999999 Hz
[ 5.350000] xemacps e000b000.eth: link up (100/FULL)

  1. 2013年03月15日 05:36 |
  2. Linux
  3. | トラックバック:0
  4. | コメント:0

DTCでDevice Tree をコンパイルする1

前回、SDKにXilinxのDevice Tree Generator をプラグインして、xilinx.dts を生成することができた。今回はDTC (Device Tree Compiler) を使って、xilinx.dts をコンパイルして、xilinx.dtb を生成して、実際にDevice Tree として使えるかどうかを確かめる。

さて、それでは、xilinx.dts を見てみよう。
1.xilinx.dts は、ZedBoard_OOB_Design/hw/xps_proj/SDK/SDK_Export/device-tree_bsp_0/ps7_cortexa9_0/libsrc/device-tree_v0_00_x ディレクトリにある。
ISE_for_Linux_107_130314.png

2.”~/HDL/ZedBoard/linux-digilent-master/scripts/dtc/dtc -O dtb -I dts -o xilinx.dtb xilinx.dts”コマンドを実行した。

3.xilinx.dtb が生成された。(xilinx.dts は 12,527バイト、xilinx.dtb は 9,684バイト)
ISE_for_Linux_108_130314.png

4.”cp xilinx.dtb devicetree_ramdisk.dtb”コマンドで、devicetree_ramdisk.dtb にコピーした。

5.SDカードのdevicetree_ramdisk.dtb をdevicetree_ramdisk_org.dtb にリネームして、4.のdevicetree_ramdisk.dtb をコピーした。
ISE_for_Linux_109_130314.png

6.SDカードをZedBoardに挿入して、ZedBoardを起動した。

7.エラーが出てしまった。エラー内容を下に示す。

Error: unrecognized/unsupported device tree compatible list:
[ 'xlnx,zynq-zc770' ]

Available machine support:

ID (hex) NAME
00000d32 Xilinx Zynq Platform
00000d32 Xilinx Zynq Platform

Please check your kernel config and/or bootloader.


ISE_for_Linux_110_130314.png

・ZedBoard_OOB_Design/linux/devicetree_ramdisk.dts とxilinx.dts を比較してみた。
最初に、ZedBoard_OOB_Design/linux/devicetree_ramdisk.dts の最初の部分を下に示す。

/dts-v1/;

/ {
    model = "Xilinx Zynq ZED";
    compatible = "xlnx,zynq-zed";
    #address-cells = <0x1>;
    #size-cells = <0x1>;
    interrupt-parent = <&gic>;


次に、xilinx.dts の最初の部分を下に示す。

/dts-v1/;
/ {
    #address-cells = <1>;
    #size-cells = <1>;
    compatible = "xlnx,zynq-zc770";
    model = "Xilinx Zynq";


Zynqボードの記述が違っているのがわかる。xilinx.dts は zc770ボード用のようだ。

xilinx.dts をZedBoard_OOB_Design/linux/devicetree_ramdisk.dts と同様に変更して、DTCでコンパイルをし、SDカードにdevicetree_ramdisk.dts としてコピーしたところ、正常にLinuxが起動した。
ISE_for_Linux_111_130314.png

起動メッセージを下に示す。

U-Boot 2012.04.01-00297-gc319bf9-dirty (Sep 13 2012 - 09:30:49)

DRAM: 512 MiB
WARNING: Caches not enabled
MMC: SDHCI: 0
Using default environment

In: serial
Out: serial
Err: serial
Net: zynq_gem
Hit any key to stop autoboot: 0
Copying Linux from SD to RAM...
Device: SDHCI
Manufacturer ID: 73
OEM: 4247
Name: NCard
Tran Speed: 25000000
Rd Block Len: 512
SD version 1.0
High Capacity: Yes
Capacity: 7.5 GiB
Bus Width: 1-bit
reading zImage

2450208 bytes read
reading devicetree_ramdisk.dtb

9688 bytes read
reading ramdisk8M.image.gz

3699284 bytes read
## Starting application at 0x00008000 ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Linux version 3.6.0-digilent-13.01 (masaaki@masaaki-VirtualBox) (gcc version 4.6.3 (Sourcery CodeBench Lite 2012.03-79) ) #6 SMP PREEMPT Fri Mar 8 19:52:15 JST 2013
[ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Xilinx Zynq Platform, model: Xilinx Zynq ZED
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] BUG: mapping for 0xe0001000 at 0xfe001000 out of vmalloc space
[ 0.000000] PERCPU: Embedded 7 pages/cpu @c140a000 s6976 r8192 d13504 u32768
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
[ 0.000000] Kernel command line: console=ttyPS0,115200 root=/dev/ram rw initrd=0x800000,8M earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 512MB = 512MB total
[ 0.000000] Memory: 506760k/506760k available, 17528k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xfd000000 ( 456 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0423984 (4207 kB)
[ 0.000000] .init : 0xc0424000 - 0xc0449b40 ( 151 kB)
[ 0.000000] .data : 0xc044a000 - 0xc04828e0 ( 227 kB)
[ 0.000000] .bss : 0xc0482904 - 0xc04990b0 ( 90 kB)
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Dump stacks of tasks blocking RCU-preempt GP.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[ 0.000000] NR_IRQS:512
[ 0.000000] Zynq clock init
[ 0.000000] xlnx,ps7-ttc-1.00.a #0 at 0xe0800000, irq=43
[ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.010000] Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096)
[ 0.100000] pid_max: default: 32768 minimum: 301
[ 0.100000] Mount-cache hash table entries: 512
[ 0.100000] CPU: Testing write buffer coherency: ok
[ 0.110000] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.110000] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
[ 0.110000] Setting up static identity map for 0x2ed340 - 0x2ed374
[ 0.120000] L310 cache controller enabled
[ 0.120000] l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72360000, Cache size: 524288 B
[ 0.190000] Map SLCR registers
[ 0.190000] CPU1: Booted secondary processor
[ 0.280000] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.280000] Brought up 2 CPUs
[ 0.280000] SMP: Total of 2 processors activated (2664.03 BogoMIPS).
[ 0.290000] devtmpfs: initialized
[ 0.290000] NET: Registered protocol family 16
[ 0.300000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.310000] xgpiops e000a000.ps7-gpio: gpio at 0xe000a000 mapped to 0xe084a000
[ 0.310000] registering platform device 'pl330' id 0
[ 0.320000] registering platform device 'arm-pmu' id 0
[ 0.320000] registering platform device 'zynq-dvfs' id 0
[ 0.330000]
[ 0.330000] ###############################################
[ 0.330000] # #
[ 0.340000] # Board ZED Init #
[ 0.340000] # #
[ 0.350000] ###############################################
[ 0.350000]
[ 0.360000] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 0.370000] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.390000] xslcr xslcr.0: at 0xF8000000 mapped to 0xF8000000
[ 0.410000] bio: create slab at 0
[ 0.410000] SCSI subsystem initialized
[ 0.410000] usbcore: registered new interface driver usbfs
[ 0.420000] usbcore: registered new interface driver hub
[ 0.420000] usbcore: registered new device driver usb
[ 0.430000] Advanced Linux Sound Architecture Driver Version 1.0.25.
[ 0.430000] Switching to clocksource xttcpss_timer1
[ 0.450000] NET: Registered protocol family 2
[ 0.450000] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.460000] TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.460000] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.470000] TCP: reno registered
[ 0.470000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.480000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.490000] NET: Registered protocol family 1
[ 0.490000] Trying to unpack rootfs image as initramfs...
[ 0.500000] rootfs image is not initramfs (no cpio magic); looks like an initrd
[ 0.540000] Freeing initrd memory: 8192K
[ 0.540000] pl330 dev 0 probe success
[ 0.540000] msgmni has been set to 1005
[ 0.540000] io scheduler noop registered
[ 0.550000] io scheduler deadline registered
[ 0.550000] io scheduler cfq registered (default)
[ 0.560000] e0001rェイconsole [ttyPS0] enabled, bootconsole disabled
[ 0.560000] console [ttyPS0] enabled, bootconsole disabled
[ 0.570000] xdevcfg f8007000.ps7-dev-cfg: ioremap f8007000 to e084e000 with size 1000
[ 0.580000] [drm] Initialized drm 1.1.0 20060810
[ 0.600000] brd: module loaded
[ 0.600000] loop: module loaded
[ 0.610000] xqspips e000d000.ps7-qspi: master is unqueued, this is deprecated
[ 0.620000] xqspips e000d000.ps7-qspi: at 0xE000D000 mapped to 0xE0850000, irq=51
[ 0.630000] libphy: XEMACPS mii bus: probed
[ 0.630000] xemacps e000b000.ps7-ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
[ 0.640000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.650000] xusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controller
[ 0.650000] xusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1
[ 0.690000] xusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000
[ 0.710000] xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00
[ 0.710000] hub 1-0:1.0: USB hub found
[ 0.720000] hub 1-0:1.0: 1 port detected
[ 0.720000] Initializing USB Mass Storage driver...
[ 0.720000] usbcore: registered new interface driver usb-storage
[ 0.730000] USB Mass Storage support registered.
[ 0.740000] mousedev: PS/2 mouse device common for all mice
[ 0.740000] sdhci: Secure Digital Host Controller Interface driver
[ 0.750000] sdhci: Copyright(c) Pierre Ossman
[ 0.750000] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.760000] mmc0: Invalid maximum block size, assuming 512 bytes
[ 0.810000] mmc0: SDHCI controller on e0100000.ps7-sdio [e0100000.ps7-sdio] using ADMA
[ 0.820000] usbcore: registered new interface driver usbhid
[ 0.830000] usbhid: USB HID core driver
[ 0.840000] TCP: cubic registered
[ 0.840000] NET: Registered protocol family 17
[ 0.850000] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 0.860000] Registering SWP/SWPB emulation handler
[ 0.860000] registered taskstats version 1
[ 0.870000] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 0.870000] ALSA device list:
[ 0.880000] No soundcards found.
[ 0.880000] RAMDISK: gzip image found at block 0
[ 0.890000] mmc0: new high speed SDHC card at address b368
[ 0.910000] mmcblk0: mmc0:b368 NCard 7.48 GiB
[ 0.910000] mmcblk0: p1
[ 1.220000] EXT4-fs (ram0): warning: mounting unchecked fs, running e2fsck is recommended
[ 1.220000] EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
[ 1.230000] VFS: Mounted root (ext4 filesystem) on device 1:0.
[ 1.240000] Freeing init memory: 148K
Starting rcS...
++ Mounting filesystem
++ Setting up mdev
++ Configure static IP 192.168.3.130
++ Starting telnet daemon
++ Starting http daemon
++ Starting ftp daemon
++ Starting dropbear (ssh) daemon
++ Starting OLED Display
insmod: can't read '/lib/modules/3.6.0-digilent-13.01/pmodoled-gpio.ko': No such file or directory
++ Exporting LEDs & SWs
rcS Complete
zynq> [ 3.480000] xemacps e000b000.ps7-ethernet: Set clk to 124999998 Hz
[ 3.480000] xemacps e000b000.ps7-ethernet: link up (1000/FULL)


DRMが抜けてしまった。フレームバッファの領域が確保されていないようだ。
  1. 2013年03月14日 05:41 |
  2. Linux
  3. | トラックバック:0
  4. | コメント:0

SDKでDevice Treeを生成する2(SDKでxilinx.dtsを生成)

前回は、Device Tree の概要について、ブログに書いた。今回は、SDKからDevice Tree を生成してみようと思う。

XilinxのDevice Tree Generator を使用する。(Ubuntu12.10上のSDK14.4を使用している)
・Device Tree Generator は、EDKのXPSプロジェクトでBSPを自動生成する際に使用するプラグインツール
・デバイスツリー(xilinx.dts) を生成する
・device-tree という名前で、git://git.xilinx.com/device-tree.git にある

それでは、実際にやってみる。
1./opt/Xilinx/14.4/ISE_DS/EDK/sw/lib/bsp ディレクトリにcd した。

2.”git clone git://git.xilinx.com/device-tree.git device-tree_v0_00_x”を実行した。

3./opt/Xilinx/14.4/ISE_DS/EDK/sw/lib/bsp ディレクトリにdevice-tree がクローンされた。
ISE_for_Linux_89_130311.png

4.”xsdk”と入力して、SDKを起動する。(Ubuntu12.10使用)

5.ワークスペースには、HDL/ZedBoard/ZedBoard_OOB_Design/hw/xps_proj/SDK/SDK_Export を指定した。

6.SDKが立ち上がった。
ISE_for_Linux_90_130311.png

7.xps_proj_hw_platform を展開して、system.xml を選択して、Xilinx Tools からReporitories を選択した。
ISE_for_Linux_96_130312.png

8.Preferences ダイアログで、Loacl Repositories の New... ボタンをクリックする。
ISE_for_Linux_97_130312.png

9./opt/Xilinx/14.4/ISE_DS/EDK/sw/lib/bsp/device-tree_v0_00_x ディレクトリを選択した。
ISE_for_Linux_98_130312.png

10.Preferences ダイアログのLoacl Repositories に/opt/Xilinx/14.4/ISE_DS/EDK/sw/lib/bsp/device-tree_v0_00_x ディレクトリが入った。Rescan Repositories ボタンをクリックした。
ISE_for_Linux_99_130312.png

11.OKボタンをクリックして、Preferences ダイアログを閉じた。

12.File -> New -> Board Support Package を選択した。
ISE_for_Linux_91_130311.png

13.New Board Support Package Project ダイアログが開く。Board Support Package OS にdevice-tree が増えている。device-tree を選択して、Finishボタンをクリックした。
ISE_for_Linux_92_130311.png

14.次のダイアログでは、console device に何を設定するか?迷ったが、ps7_uart_1を選択した。と言うか、Noneか、ps7_uart_1しか選択できなかった。bootargs のValue には、”console=ttyPS0,115200 root=/dev/ram rw initrd=0x800000,8M earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0”を入力した。bootargs のDefault には入力することができなかった。
ISE_for_Linux_93_130311.png

15.device-tree_bsp_0 が生成された。
ISE_for_Linux_94_130312.png

16.Project -> Build Automatically を選択した。Buildが始まったが、エラーが出てしまった。エラー内容を下に示す。

ERROR:EDK - device-tree () - can't read "vdma_device_id": no such variable
ERROR:EDK:3416 - Error(s) while running TCL procedure generate().
make: *** [ps7_cortexa9_0/lib/libxil.a] エラー 2
make: ターゲット `all' はエラーにより再 make できませんでした.


ISE_for_Linux_95_130312.png

17.検索を行った結果、”Error while building a new Device Tree”が見つかった。最後のコメントの”the vdma_device_id is not setup in the tcl”に解決方法が書いてあった。

18.それによると、device-tree_v2_1_0.tcl ファイルの”variable vdma_device_id”を”variable vdma_device_id 0”に書き換えてデフォルト値を入れれば良いそうだ。

19.device-tree_v2_1_0.tcl ファイルを検索すると、:/opt/Xilinx/14.4/ISE_DS/EDK/sw/lib/bsp/device-tree_v0_00_x/data ディレクトリにあった。
ISE_for_Linux_100_130313.png

20.”sudo vi device-tree_v2_1_0.tcl”で、device-tree_v2_1_0.tcl ファイルを編集することにした。
ISE_for_Linux_101_130313.png

21./vdma_device_id/ で検索したところ見つかった。
ISE_for_Linux_102_130313.png

22.”variable vdma_device_id”を”variable vdma_device_id 0”に書き換えた。
ISE_for_Linux_102_5_130313.png

23.一度、device-tree_bsp_0 を完全にDelete してから、もう一度、作りなおした。オートビルドされて、コンパイルが通った。xilinx.dts が生成された。
ISE_for_Linux_105_130313.png

24.xilinx.dts を見ると、自分で追加した axi_iic_mt9d111 のエントリが見えた。
ISE_for_Linux_106_130313.png

これで、エラーはあったが、無事にxilinx.dts を生成することができた。
次回は、dtc でコンパイルしてみたい。

(2013/03/18:追記)
Windows 7のSDKでも確かめてみたが、Ubuntu12.10 と同様に、C:\Xilinx\14.4\ISE_DS\EDK\sw\lib\bsp にdevice-tree_v0_00_x フォルダをUbuntuからコピーして、SDKでBSP をUbuntu 同様に作成したところ、xilinx.dts が生成された。
ISE_for_Linux_120_130318.png
  1. 2013年03月11日 05:59 |
  2. Linux
  3. | トラックバック:0
  4. | コメント:0

オズ はじまりの戦い(映画)を見て来ました

昨日、オズ はじまりの戦い(映画)を見て来ました。下の娘と3Dの方を見て来ました。いや~、とにかく映像が綺麗でした。ストーリーもありきたりでしたが、面白く見ることができました。ほうきから黒い煙が出ているのは、…のパクリでしょうか?
  1. 2013年03月11日 04:39 |
  2. 日記
  3. | トラックバック:0
  4. | コメント:0

WebPACK ツール インストールを使用していると IP コアを作成できない

WebPACK14.4でCore Generator でIPコアを作ろうとしても作成できないとうバグがありましたが、アンサーが出ています。ツイッターで、shintamainjp さんに教えてもらいました。
アンサーです。

14.4 CORE Generator - WebPACK ツール インストールを使用していると IP コアを作成できない


環境変数を XIL_CG_LOAD_ALL_FAMILIES=true に設定すれば良いようです。

これで、WebPACK14.4を使うことができそうです。私は、Embedded Edition をインストールしてしまったので、どなたか確かめられる方、確かめてコメント欄でレポートして頂けないでしょうか?よろしくお願いします。
  1. 2013年03月10日 08:25 |
  2. Xilinx ISEについて
  3. | トラックバック:0
  4. | コメント:5

SDKでDevice Treeを生成する1(Device Tree の概要)

Device Tree とは、Linuxカーネルにハードウェアの情報を伝えるファイルのことだそうだ。英語では、OMAPpediaDevice Tree、日本語では、Device Tree を参照した。
Device Tree はLinux の起動メッセージ(dmesg) を見る限りは、U-Bootで読み込んでいると思うのだがどうだろうか?
下にZedBoardの起動メッセージの一部を示す。

U-Boot 2012.04.01-00297-gc319bf9-dirty (Sep 13 2012 - 09:30:49)

DRAM: 512 MiB
WARNING: Caches not enabled
MMC: SDHCI: 0
Using default environment

In: serial
Out: serial
Err: serial
Net: zynq_gem
Hit any key to stop autoboot: 0
Copying Linux from SD to RAM...
Device: SDHCI
Manufacturer ID: 73
OEM: 4247
Name: NCard
Tran Speed: 25000000
Rd Block Len: 512
SD version 1.0
High Capacity: Yes
Capacity: 7.5 GiB
Bus Width: 1-bit
reading zImage

2449976 bytes read
reading devicetree_ramdisk.dtb

5817 bytes read

reading ramdisk8M.image.gz

3699284 bytes read
## Starting application at 0x00008000 ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0


LinuxをUncompressing する前に、devicetree_ramdisk.dtbを読んでいる。
ちなみに、.dtb は、”device tree blob”と呼ばれるバイナリファイルで、カーネルにマージされるそうだ。このファイルは、Digilent社のZedBoardのWebページThis zip file contains the Out Of Box (OOB) SD card image and source.(ZIPファイル注意)の ZedBoard_OOB_Desin/sd_image の下にある。そのDevice Tree のソースファイルは、devicetree_ramdisk.dts で ZedBoard_OOB_Desin/linux にある。.dts は、”device tree source”の略だそうだ。
.dts はDTC (Device Tree Compiler) でコンパイルされて .dtb に変換される。逆変換もできるそうだ。DTCについては、DTC (Device Tree Compiler) を参照した。
dtc は、linux-digilent-master/scripts/dtc に下にある。これについては、XilinxのPowerPC U-boot の Building A Device Tree Blob を参考にした。

devicetree_ramdisk.dts の一部を見てみよう。AXI VDMAの記述を見ることにした。下に引用する。

        axi_vdma: axivdma@43000000 {
            #address-cells = <0x1>;
            #size-cells = <0x1>;
            #dma-cells = <0x1>;
            compatible = "xlnx,axi-vdma";
            reg = <0x43000000 0x1000>;
            xlnx,include-sg = <0x0>;
            xlnx,num-fstores = <0x3>;

            dma-channel@43000000 {
                compatible = "xlnx,axi-vdma-mm2s-channel";
                interrupts = <0x0 0x3b 0x4>;
                xlnx,datawidth = <0x40>;
                xlnx,genlock-mode = <0x0>;
                xlnx,include-dre = <0x0>;
            };
        };


AXI VDMAのレジスタのアドレスと領域も書かれている。XPSプロジェクトのAddressタブの画像を下に示す。
ISE_for_Linux_88_130310.png

自分で作ったXPSプロジェクトのカスタムIPの情報を devicetree_ramdisk.dts に追加して、dtc でコンパイルし、devicetree_ramdisk.dtb にして使用することを目的とする。
  1. 2013年03月10日 05:08 |
  2. Linux
  3. | トラックバック:0
  4. | コメント:0

ZedBoard用Digilent Linuxの解析1(フレームバッファの領域確保)

このごろ、ZedBoard用Digilent Linuxの解析をしている。Digilent Linuxを起動するとHDMIに2頭のペンギンが表示されるが、このフレームバッファを使用して、カメラの画像を書き込みたいからだ。フレームバッファは固定アドレスでなく、アロケートされているようで、物理アドレスが異なる時があるようだ。そのアドレスを取得して、自作カスタムIPのレジスタに物理アドレスを書き込むのを目的とする。つまり、安全にフレームバッファをカメラ画像用に使用する目的のためにLinuxを解析しようと思っている。Linuxのバージョンは下を参照のこと。

[ 0.000000] Linux version 3.6.0-digilent-13.01 (masaaki@masaaki-VirtualBox) (gcc version 4.6.3 (Sourcery CodeBench Lite 2012.03-79) ) #1 SMP PREEMPT Sun Mar 3 06:20:07 JST 2013


最初に、フレームバッファをアロケートしているのは、linux-digilent-master/drivers/gpu/drm/drm_fb_cma_helper.c の drm_fbdev_cma_create() のようだ。

struct fb_info *fbi;


を宣言して、

fbi = framebuffer_alloc(0, dev->dev);


で領域を確保している。
他にも領域を確保しているので、実体は違うのかもしないが、この関数でフレームバッファを確保しようとしているのはわかった。
そこで、下のようにprintk()を挿入してアドレスを確認してみた。

dev->mode_config.fb_base = (resource_size_t)obj->paddr;
fbi->screen_base = obj->vaddr + offset;
printk("fbi->screen_base = 0x%x\n" ,fbi->screen_base); // DEBUG Message by Masaaki
fbi->fix.smem_start = (unsigned long)(obj->paddr + offset);
printk("fbi->fix.smem_start = 0x%x\n" ,fbi->fix.smem_start); // DEBUG Message by Masaaki
fbi->screen_size = size;
printk("fbi->screen_size = 0x%x\n" ,fbi->screen_size); // DEBUG Message by Masaaki
fbi->fix.smem_len = size;


これで、カーネル・イメージをMakeして、SDカードにコピーして起動してみた。その結果を下に示す。

1回目

[ 0.960000] fbi->screen_base = 0xe08b1000
[ 0.960000] fbi->fix.smem_start = 0x19000000
[ 0.960000] fbi->screen_size = 0x7e9000


2回目

[ 1.030000] fbi->screen_base = 0xe08b1000
[ 1.030000] fbi->fix.smem_start = 0x19000000
[ 1.030000] fbi->screen_size = 0x7e9000


3回目

[ 1.010000] fbi->screen_base = 0xe08b1000
[ 1.010000] fbi->fix.smem_start = 0x19000000
[ 1.010000] fbi->screen_size = 0x7e9000


4回目

[ 1.360000] fbi->screen_base = 0xe08b1000
[ 1.370000] fbi->fix.smem_start = 0x19800000
[ 1.370000] fbi->screen_size = 0x7e9000


5回目

++ Setting up mdev
[ 1.320000] new mode: 1280x720 1650x750 74250
[ 1.320000] new mode: 1920x1080 2200x1125 74250
[ 1.330000] new mode: 1920x1080 2200x1125 148500
[ 1.330000] new mode: 720x576 864x625 27000
[ 1.340000] new mode: 720x576 864x625 27000
[ 1.340000] new mode: 1280x720 1980x750 74250
[ 1.350000] new mode: 1920x1080 2640x1125 74250
[ 1.350000] new mode: 1440x576 1728x625 54000
[ 1.360000] new mode: 1920x1080 2640x1125 148500
[ 1.380000] fbi->screen_base = 0xe08b1000
[ 1.380000] fbi->fix.smem_start = 0x19800000
[ 1.390000] fbi->screen_size = 0x7e9000
[ 1.390000] setting clock to: 148500
[ 1.390000] raw_edid: d8b15b80 7
[ 1.390000] Using YCbCr output
[ 1.440000] Console: switching to colour frame buffer device 240x67
[ 1.490000] fb0: frame buffer device
[ 1.490000] drm: registered panic notifier
[ 1.490000] [drm] Initialized analog_drm 1.0.0 20110530 on minor 0


5回目は周りも切り取ってみた。1,2,3回目はフレームバッファの物理アドレスの先頭が0x19000000番地に割り当てられているが、4,5回目は0x19800000に割り当てられている。現在のカメラ画像のフレームバッファのアドレスは0x1A000000からの固定アドレスとなっている。これでも、カメラ画像の表示に問題は無く、Linuxも正常に動作しているように見える。
ここから、アドレス決め打ちでカメラ画像表示用のカスタムIPのレジスタアドレスに書き込むこともできるが、それは出来ればやりたくない。標準的な方法では、devicetree_ramdisk.dts にIPのレジスタマップがテキストで書いてあって、それをコンパイルしたdevicetree_ramdisk.dtb をu-boot? が読んで、Linuxカーネルに知らせて、それを元にAXI VDMAのレジスタを設定しているはずだ。AXI VDMAのレジスタを設定している部分を特定して、同様に、デバイスツリーから読んだ自作カスタムIPのレジスタアドレスに書き込みたいと思っている。

なお、Linuxカーネルコードの解析に多大なる力を貸していただいた”まっちゃん”さん、ありがとうございました。

皆さん、私はよくわからないので、何か情報がありましたら、教えてください。よろしくお願いします。

次回は、デバイスツリーを作る方法とコンパイルする方法をやってみる予定だ。(自作カスタムIPの情報の入ったデバイスツリーを作れないと意味が無いので。。。)
  1. 2013年03月09日 05:28 |
  2. Linux
  3. | トラックバック:0
  4. | コメント:0

ZedBoard用Digilent Linuxの起動メッセージ

ZedBoard用Digilent Linuxの起動メッセージを下に示します。

U-Boot 2012.04.01-00297-gc319bf9-dirty (Sep 13 2012 - 09:30:49)

DRAM: 512 MiB
WARNING: Caches not enabled
MMC: SDHCI: 0
Using default environment

In: serial
Out: serial
Err: serial
Net: zynq_gem
Hit any key to stop autoboot: 0
Copying Linux from SD to RAM...
Device: SDHCI
Manufacturer ID: 73
OEM: 4247
Name: NCard
Tran Speed: 25000000
Rd Block Len: 512
SD version 1.0
High Capacity: Yes
Capacity: 7.5 GiB
Bus Width: 1-bit
reading zImage

2479640 bytes read
reading devicetree_ramdisk.dtb

5817 bytes read
reading ramdisk8M.image.gz

3699284 bytes read
## Starting application at 0x00008000 ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Linux version 3.3.0-digilent-12.07-zed-beta (tinghui.wang@DIGILENT_LINUX) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-50) ) #2 SMP PREEMPT Thu Jul 12 21:01:42 PDT 2012
[ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Xilinx Zynq Platform, model: Xilinx Zynq ZED
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] BUG: mapping for 0xf8f00000 at 0xfe00c000 out of vmalloc space
[ 0.000000] BUG: mapping for 0xe0000000 at 0xfe000000 out of vmalloc space
[ 0.000000] BUG: mapping for 0xffff1000 at 0xfe200000 out of vmalloc space
[ 0.000000] PERCPU: Embedded 7 pages/cpu @c1489000 s5696 r8192 d14784 u32768
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 125824
[ 0.000000] Kernel command line: console=ttyPS0,115200 root=/dev/ram rw initrd=0x800000,8M earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 240MB 256MB = 496MB total
[ 0.000000] Memory: 489856k/489856k available, 34432k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xfd000000 ( 456 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc042f040 (4253 kB)
[ 0.000000] .init : 0xc0430000 - 0xc0456640 ( 154 kB)
[ 0.000000] .data : 0xc0458000 - 0xc0485dc0 ( 184 kB)
[ 0.000000] .bss : 0xc0485de4 - 0xc049d734 ( 95 kB)
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Verbose stalled-CPUs detection is disabled.
[ 0.000000] NR_IRQS:128
[ 0.000000] xlnx,ps7-ttc-1.00.a #0 at 0xe0800000, irq=43
[ 0.000000] Console: colour dummy device 80x30
[ 0.000000] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[ 0.090000] pid_max: default: 32768 minimum: 301
[ 0.090000] Mount-cache hash table entries: 512
[ 0.090000] CPU: Testing write buffer coherency: ok
[ 0.090000] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.100000] smp_twd: clock not found: -2
[ 0.100000] Calibrating local timer... 399.36MHz.
[ 0.170000] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
[ 0.170000] Setting up static identity map for 0x2f8d48 - 0x2f8d7c
[ 0.270000] CPU1: Booted secondary processor
[ 0.310000] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.310000] Brought up 2 CPUs
[ 0.310000] SMP: Total of 2 processors activated (3188.32 BogoMIPS).
[ 0.320000] devtmpfs: initialized
[ 0.320000] ------------[ cut here ]------------
[ 0.320000] WARNING: at arch/arm/mm/dma-mapping.c:198 consistent_init+0x70/0x104()
[ 0.330000] Modules linked in:
[ 0.330000] [] (unwind_backtrace+0x0/0xe0) from [] (warn_slowpath_common+0x4c/0x64)
[ 0.340000] [] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_null+0x18/0x1c)
[ 0.350000] [] (warn_slowpath_null+0x18/0x1c) from [] (consistent_init+0x70/0x104)
[ 0.360000] [] (consistent_init+0x70/0x104) from [] (do_one_initcall+0x90/0x160)
[ 0.360000] [] (do_one_initcall+0x90/0x160) from [] (kernel_init+0x84/0x128)
[ 0.370000] [] (kernel_init+0x84/0x128) from [] (kernel_thread_exit+0x0/0x8)
[ 0.380000] ---[ end trace 1b75b31a2719ed1c ]---
[ 0.380000] ------------[ cut here ]------------
[ 0.390000] WARNING: at arch/arm/mm/dma-mapping.c:198 consistent_init+0x70/0x104()
[ 0.390000] Modules linked in:
[ 0.390000] [] (unwind_backtrace+0x0/0xe0) from [] (warn_slowpath_common+0x4c/0x64)
[ 0.400000] [] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_null+0x18/0x1c)
[ 0.410000] [] (warn_slowpath_null+0x18/0x1c) from [] (consistent_init+0x70/0x104)
[ 0.420000] [] (consistent_init+0x70/0x104) from [] (do_one_initcall+0x90/0x160)
[ 0.430000] [] (do_one_initcall+0x90/0x160) from [] (kernel_init+0x84/0x128)
[ 0.430000] [] (kernel_init+0x84/0x128) from [] (kernel_thread_exit+0x0/0x8)
[ 0.440000] ---[ end trace 1b75b31a2719ed1d ]---
[ 0.440000] NET: Registered protocol family 16
[ 0.460000] L310 cache controller enabled
[ 0.460000] l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72360000, Cache size: 524288 B
[ 0.460000] registering platform device 'pl330' id 0
[ 0.470000] registering platform device 'arm-pmu' id 0
[ 0.470000]
[ 0.470000] ###############################################
[ 0.480000] # #
[ 0.480000] # Board ZED Init #
[ 0.480000] # #
[ 0.490000] ###############################################
[ 0.490000]
[ 0.500000] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 0.500000] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.520000] xslcr xslcr.0: at 0xF8000000 mapped to 0xE0808000
[ 0.540000] bio: create slab at 0
[ 0.540000] gpiochip_add: registered GPIOs 0 to 245 on device: xgpiops
[ 0.540000] xgpiops e000a000.gpio: gpio at 0xe000a000 mapped to 0xe080a000
[ 0.550000] SCSI subsystem initialized
[ 0.550000] usbcore: registered new interface driver usbfs
[ 0.560000] usbcore: registered new interface driver hub
[ 0.560000] usbcore: registered new device driver usb
[ 0.570000] Advanced Linux Sound Architecture Driver Version 1.0.24.
[ 0.570000] Switching to clocksource xttcpss_timer1
[ 0.580000] NET: Registered protocol family 2
[ 0.580000] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.580000] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.590000] TCP bind hash table entries: 16384 (order: 5, 196608 bytes)
[ 0.590000] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.600000] TCP reno registered
[ 0.600000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.610000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.610000] NET: Registered protocol family 1
[ 0.620000] Trying to unpack rootfs image as initramfs...
[ 0.620000] rootfs image is not initramfs (no cpio magic); looks like an initrd
[ 0.650000] Freeing initrd memory: 8192K
[ 0.660000] xscugtimer xscugtimer.0: ioremap fe00c200 to e0810200 with size 400
[ 0.660000] pl330 dev 0 probe success
[ 0.670000] msgmni has been set to 972
[ 0.670000] io scheduler noop registered
[ 0.670000] io scheduler deadline registered
[ 0.670000] io scheduler cfq registered (default)
[ 0.680000] e00 0.680000] console [ttyPS0] enabled, bootconsole disabled
[ 0.680000] console [ttyPS0] enabled, bootconsole disabled
[ 0.690000] xdevcfg f8007000.devcfg: ioremap f8007000 to e0814000 with size 1000
[ 0.700000] [drm] Initialized drm 1.1.0 20060810
[ 0.710000] brd: module loaded
[ 0.720000] loop: module loaded
[ 0.720000] xqspips e000d000.qspi: at 0xE000D000 mapped to 0xE0816000, irq=51
[ 0.730000] GEM: BASEADDRESS hw: e000b000 virt: e0818000
[ 0.730000] XEMACPS mii bus: probed
[ 0.740000] eth0, pdev->id -1, baseaddr 0xe000b000, irq 54
[ 0.740000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.750000] usb_hcd_xusbps_probe: No OTG assigned!
[ 0.750000] usb_hcd_xusbps_probe: OTG now assigned!
[ 0.750000] xusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controller
[ 0.760000] xusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1
[ 0.800000] xusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000
[ 0.820000] xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00
[ 0.820000] hub 1-0:1.0: USB hub found
[ 0.820000] hub 1-0:1.0: 1 port detected
[ 0.830000] Initializing USB Mass Storage driver...
[ 0.830000] usbcore: registered new interface driver usb-storage
[ 0.840000] USB Mass Storage support registered.
[ 0.840000] Xilinx PS USB Device Controller driver (Apr 01, 2011)
[ 0.850000] mousedev: PS/2 mouse device common for all mice
[ 0.850000] Linux video capture interface: v2.00
[ 0.860000] gspca_main: v2.14.0 registered
[ 0.860000] usbcore: registered new interface driver uvcvideo
[ 0.860000] USB Video Class driver (1.1.1)
[ 0.870000] WDT OF probe
[ 0.870000] xwdtps f8005000.swdt: Xilinx Watchdog Timer at 0xe081c000 with timeout 10 seconds
[ 0.880000] sdhci: Secure Digital Host Controller Interface driver
[ 0.880000] sdhci: Copyright(c) Pierre Ossman
[ 0.890000] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.890000] mmc0: Invalid maximum block size, assuming 512 bytes
[ 0.900000] mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
[ 0.910000] usbcore: registered new interface driver usbhid
[ 0.910000] usbhid: USB HID core driver
[ 0.920000] edid status: 1
[ 0.920000] adv7511 0-0039: Failed to add route DAI IN->TMDS
[ 0.940000] asoc: adv7511 <-> 75c00000.axi-spdif-tx mapping ok
[ 0.950000] axi-spdif 75c00000.axi-spdif-tx: Failed to set DAI format: -22
[ 0.960000] ALSA device list:
[ 0.960000] #0: HDMI monitor
[ 0.960000] edid ret: 4
[ 0.960000] TCP cubic registered
[ 0.970000] NET: Registered protocol family 17
[ 0.970000] i2c ret: 2
[ 0.970000] i2c ret: 2
[ 0.970000] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 0.980000] i2c ret: 2
[ 0.980000] i2c ret: 2
[ 0.980000] new mode: 1920x1080 2200x1125 148500
[ 0.980000] new mode: 720x480 858x525 27000
[ 0.980000] new mode: 1280x720 1650x750 74250
[ 0.980000] new mode: 720x576 864x625 27000
[ 0.980000] new mode: 1680x1050 2240x1089 146250
[ 0.980000] new mode: 1280x1024 1728x1067 132840
[ 0.980000] new mode: 1280x1024 1728x1066 128946
[ 0.980000] new mode: 1280x1024 1688x1066 108000
[ 0.980000] new mode: 1280x960 1800x1000 108000
[ 0.980000] new mode: 1280x800 1680x831 83500
[ 0.980000] new mode: 800x600 1056x628 40000
[ 0.980000] new mode: 800x600 1024x625 36000
[ 0.980000] new mode: 640x480 840x500 31500
[ 0.980000] new mode: 640x480 832x520 31500
[ 0.980000] new mode: 640x480 864x525 30240
[ 0.980000] new mode: 640x480 800x525 25200
[ 0.980000] new mode: 720x400 900x449 28320
[ 0.980000] new mode: 1280x1024 1688x1066 135000
[ 0.980000] new mode: 1024x768 1312x800 78800
[ 0.980000] new mode: 1024x768 1328x806 75000
[ 0.980000] new mode: 1024x768 1344x806 65000
[ 0.980000] new mode: 832x624 1152x667 57284
[ 0.980000] new mode: 800x600 1056x625 49500
[ 0.980000] new mode: 800x600 1040x666 50000
[ 0.980000] new mode: 640x480 800x525 25175
[ 0.980000] new mode: 720x480 858x525 27000
[ 0.980000] new mode: 720x480 858x525 27000
[ 0.980000] new mode: 1280x720 1650x750 74250
[ 0.980000] new mode: 1920x1080 2200x1125 74250
[ 0.980000] new mode: 1920x1080 2200x1125 148500
[ 0.980000] new mode: 720x576 864x625 27000
[ 0.980000] new mode: 720x576 864x625 27000
[ 0.980000] new mode: 1280x720 1980x750 74250
[ 0.980000] new mode: 1920x1080 2640x1125 74250
[ 0.980000] new mode: 1440x576 1728x625 54000
[ 0.980000] new mode: 1920x1080 2640x1125 148500
[ 0.990000] mmc0: new high speed SDHC card at address b368
[ 1.000000] drivers/gpu/drm/analog/analog_drm_fbdev.c:analog_drm_fbdev_probe[241]
[ 1.120000] Registering SWP/SWPB emulation handler
[ 1.120000] mmcblk0: mmc0:b368 NCard 7.48 GiB
[ 1.120000] mmcblk0: p1
[ 1.130000] registered taskstats version 1
[ 1.130000] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 1.140000] setting clock to: 148500
[ 1.140000] raw_edid: d8ae1380 7
[ 1.140000] Using YCbCr output
[ 1.170000] Console: switching to colour frame buffer device 240x67
[ 1.220000] fb0: frame buffer device
[ 1.220000] drm: registered panic notifier
[ 1.220000] [drm] Initialized analog_drm 1.0.0 20110530 on minor 0
[ 1.230000] RAMDISK: gzip image found at block 0
[ 1.500000] EXT4-fs (ram0): warning: mounting unchecked fs, running e2fsck is recommended
[ 1.510000] EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
[ 1.510000] VFS: Mounted root (ext4 filesystem) on device 1:0.
[ 1.520000] Freeing init memory: 152K
Starting rcS...
++ Mounting filesystem
++ Setting up mdev
++ Configure static IP 192.168.3.130
[ 1.700000] GEM: lp->tx_bd ffdfa000 lp->tx_bd_dma 18136000 lp->tx_skb d8070280
[ 1.710000] GEM: lp->rx_bd ffdfb000 lp->rx_bd_dma 1811b000 lp->rx_skb d8070380
[ 1.720000] GEM: MAC 0x00350a00, 0x00002201, 00:0a:35:00:01:22
[ 1.720000] GEM: phydev d8b6b400, phydev->phy_id 0x1410dd1, phydev->addr 0x0
[ 1.730000] eth0, phy_addr 0x0, phy_id 0x01410dd1
[ 1.730000] eth0, attach [Marvell 88E1510] phy driver
++ Starting telnet daemon
++ Starting http daemon
++ Starting ftp daemon
++ Starting dropbear (ssh) daemon
++ Starting OLED Display
[ 1.770000] pmodoled-gpio-spi [zed_oled] SPI Probing
++ Exporting LEDs & SWs
rcS Complete
zynq> [ 4.720000] eth0: link up (100/FULL)


ちなみに、drivers/gpu/drm/analog/analog_drm_fbdev.c というファイルはKernelソースには無いです。

cat /proc/dri/0/* の結果を下に示します。

/ # cat /proc/dri/0/*
a dev pid uid magic ioctls

name size handles refcount
ctx/flags use fin blk/rw/rwf wait flushed queued locks

slot offset size type flags address mtrr

vma use count: 0, high_memory = e0000000, 0x20000000


どうも、drivers/gpu/drm/analog/に目的のファイルがありそうなんですが、よくわかりません。
最近、ZedBoardの電源ONでSDカードからLinuxを立ちあげても100%、Linuxが死なないのでこれ良いかな?と思って来ました。勉強のために、Implementing Linux on the Zynq-7000 SoC のLabs(ZIPファイル注意)をやってみようと思います。

その前に、”ZedBoardのLinuxカーネルコンパイルのテスト”で作った zImage をSDカードに書いて動作するかどうか?確かめてみようと思います。

確かめました。自分でビルドしたzImage に変えても問題なく、カメラ画像も表示されました。その起動メッセージを下に示します。(少し違っています)

U-Boot 2012.04.01-00297-gc319bf9-dirty (Sep 13 2012 - 09:30:49)

DRAM: 512 MiB
WARNING: Caches not enabled
MMC: SDHCI: 0
Using default environment

In: serial
Out: serial
Err: serial
Net: zynq_gem
Hit any key to stop autoboot: 0
Copying Linux from SD to RAM...
Device: SDHCI
Manufacturer ID: 73
OEM: 4247
Name: NCard
Tran Speed: 25000000
Rd Block Len: 512
SD version 1.0
High Capacity: Yes
Capacity: 7.5 GiB
Bus Width: 1-bit
reading zImage

2449976 bytes read
reading devicetree_ramdisk.dtb

5817 bytes read
reading ramdisk8M.image.gz

3699284 bytes read
## Starting application at 0x00008000 ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0
[ 0.000000] Linux version 3.6.0-digilent-13.01 (masaaki@masaaki-VirtualBox) (gcc version 4.6.3 (Sourcery CodeBench Lite 2012.03-79) ) #1 SMP PREEMPT Sun Mar 3 06:20:07 JST 2013
[ 0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Xilinx Zynq Platform, model: Xilinx Zynq ZED
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] BUG: mapping for 0xe0001000 at 0xfe001000 out of vmalloc space
[ 0.000000] PERCPU: Embedded 7 pages/cpu @c1408000 s6976 r8192 d13504 u32768
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
[ 0.000000] Kernel command line: console=ttyPS0,115200 root=/dev/ram rw initrd=0x800000,8M earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 512MB = 512MB total
[ 0.000000] Memory: 506768k/506768k available, 17520k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xe0800000 - 0xfd000000 ( 456 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0422984 (4203 kB)
[ 0.000000] .init : 0xc0423000 - 0xc0448b40 ( 151 kB)
[ 0.000000] .data : 0xc044a000 - 0xc04828e0 ( 227 kB)
[ 0.000000] .bss : 0xc0482904 - 0xc04990b0 ( 90 kB)
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Dump stacks of tasks blocking RCU-preempt GP.
[ 0.000000] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[ 0.000000] NR_IRQS:512
[ 0.000000] Zynq clock init
[ 0.000000] xlnx,ps7-ttc-1.00.a #0 at 0xe0800000, irq=43
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: at arch/arm/kernel/smp_twd.c:389 time_init+0x20/0x30()
[ 0.000000] twd_local_timer_of_register failed (-19)
[ 0.000000] Modules linked in:
[ 0.000000] [] (unwind_backtrace+0x0/0xe0) from [] (warn_slowpath_common+0x4c/0x64)
[ 0.000000] [] (warn_slowpath_common+0x4c/0x64) from [] (warn_slowpath_fmt+0x2c/0x3c)
[ 0.000000] [] (warn_slowpath_fmt+0x2c/0x3c) from [] (time_init+0x20/0x30)
[ 0.000000] [] (time_init+0x20/0x30) from [] (start_kernel+0x1ac/0x2f0)
[ 0.000000] [] (start_kernel+0x1ac/0x2f0) from [<00008044>] (0x8044)
[ 0.000000] ---[ end trace 1b75b31a2719ed1c ]---
[ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.020000] Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096)
[ 0.110000] pid_max: default: 32768 minimum: 301
[ 0.110000] Mount-cache hash table entries: 512
[ 0.110000] CPU: Testing write buffer coherency: ok
[ 0.120000] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.120000] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
[ 0.120000] Setting up static identity map for 0x2ed300 - 0x2ed334
[ 0.130000] L310 cache controller enabled
[ 0.130000] l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72360000, Cache size: 524288 B
[ 0.200000] Map SLCR registers
[ 0.200000] CPU1: Booted secondary processor
[ 0.290000] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.290000] Brought up 2 CPUs
[ 0.290000] SMP: Total of 2 processors activated (2664.03 BogoMIPS).
[ 0.300000] devtmpfs: initialized
[ 0.300000] NET: Registered protocol family 16
[ 0.310000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.320000] xgpiops e000a000.gpio: gpio at 0xe000a000 mapped to 0xe084a000
[ 0.320000] registering platform device 'pl330' id 0
[ 0.330000] registering platform device 'arm-pmu' id 0
[ 0.330000] registering platform device 'zynq-dvfs' id 0
[ 0.340000]
[ 0.340000] ###############################################
[ 0.340000] # #
[ 0.350000] # Board ZED Init #
[ 0.350000] # #
[ 0.360000] ###############################################
[ 0.360000]
[ 0.370000] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 0.380000] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.400000] xslcr xslcr.0: at 0xF8000000 mapped to 0xF8000000
[ 0.420000] bio: create slab at 0
[ 0.420000] SCSI subsystem initialized
[ 0.420000] usbcore: registered new interface driver usbfs
[ 0.420000] usbcore: registered new interface driver hub
[ 0.430000] usbcore: registered new device driver usb
[ 0.440000] Advanced Linux Sound Architecture Driver Version 1.0.25.
[ 0.440000] Switching to clocksource xttcpss_timer1
[ 0.460000] Clockevents: could not switch to one-shot mode:
[ 0.460000] Clockevents: could not switch to one-shot mode: dummy_timer is not functional.
[ 0.460000] Could not switch to high resolution mode on CPU 1
[ 0.460000] dummy_timer is not functional.
[ 0.470000] Could not switch to high resolution mode on CPU 0
[ 0.490000] NET: Registered protocol family 2
[ 0.490000] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.490000] TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
[ 0.500000] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.510000] TCP: reno registered
[ 0.510000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.520000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.520000] NET: Registered protocol family 1
[ 0.530000] Trying to unpack rootfs image as initramfs...
[ 0.530000] rootfs image is not initramfs (no cpio magic); looks like an initrd
[ 0.570000] Freeing initrd memory: 8192K
[ 0.570000] pl330 dev 0 probe success
[ 0.580000] msgmni has been set to 1005
[ 0.580000] io scheduler noop registered
[ 0.580000] io scheduler deadline registered
[ 0.590000] io scheduler cfq registered (default)
[ 0.590000] xuartps e0001000.uart: failed to get alias id, errno -19
[ 0.600000] e00rイconsole [ttyPS0] enabled, bootconsole disabled
[ 0.600000] console [ttyPS0] enabled, bootconsole disabled
[ 0.610000] xdevcfg f8007000.devcfg: ioremap f8007000 to e0852000 with size 1000
[ 0.620000] [drm] Initialized drm 1.1.0 20060810
[ 0.640000] brd: module loaded
[ 0.650000] loop: module loaded
[ 0.650000] xqspips e000d000.qspi: master is unqueued, this is deprecated
[ 0.660000] xqspips e000d000.qspi: at 0xE000D000 mapped to 0xE0854000, irq=51
[ 0.670000] libphy: XEMACPS mii bus: probed
[ 0.670000] xemacps e000b000.eth: Could not find MAC address in device tree, use default
[ 0.680000] xemacps e000b000.eth: pdev->id -1, baseaddr 0xe000b000, irq 54
[ 0.690000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.690000] xusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controller
[ 0.700000] xusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1
[ 0.740000] xusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000
[ 0.760000] xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00
[ 0.760000] hub 1-0:1.0: USB hub found
[ 0.770000] hub 1-0:1.0: 1 port detected
[ 0.770000] Initializing USB Mass Storage driver...
[ 0.770000] usbcore: registered new interface driver usb-storage
[ 0.780000] USB Mass Storage support registered.
[ 0.790000] mousedev: PS/2 mouse device common for all mice
[ 0.790000] xwdtps f8005000.swdt: Xilinx Watchdog Timer at 0xe085c000 with timeout 10s
[ 0.800000] sdhci: Secure Digital Host Controller Interface driver
[ 0.810000] sdhci: Copyright(c) Pierre Ossman
[ 0.810000] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.820000] mmc0: Invalid maximum block size, assuming 512 bytes
[ 0.860000] mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
[ 0.870000] usbcore: registered new interface driver usbhid
[ 0.870000] usbhid: USB HID core driver
[ 0.890000] adv7511-hdmi-snd adv7511_hdmi_snd.2: CODEC adv7511.2-0039 not registered
[ 0.890000] platform adv7511_hdmi_snd.2: Driver adv7511-hdmi-snd requests probe deferral
[ 0.900000] TCP: cubic registered
[ 0.910000] NET: Registered protocol family 17
[ 0.910000] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 0.920000] Registering SWP/SWPB emulation handler
[ 0.920000] registered taskstats version 1
[ 0.930000] adv7511-hdmi-snd adv7511_hdmi_snd.2: CODEC adv7511.2-0039 not registered
[ 0.940000] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 0.940000] ALSA device list:
[ 0.950000] platform adv7511_hdmi_snd.2: Driver adv7511-hdmi-snd requests probe deferral
[ 0.950000] No soundcards found.
[ 0.960000] RAMDISK: gzip image found at block 0
[ 0.970000] mmc0: new high speed SDHC card at address b368
[ 0.970000] new mode: 1920x1080 2200x1125 148500
[ 0.980000] mmcblk0: mmc0:b368 NCard 7.48 GiB
[ 0.980000] mmcblk0: p1
[ 0.990000] new mode: 720x480 858x525 27000
[ 0.990000] new mode: 1280x720 1650x750 74250
[ 0.990000] new mode: 720x576 864x625 27000
[ 0.990000] new mode: 1680x1050 1840x1080 119000
[ 0.990000] new mode: 1280x1024 1728x1067 132840
[ 0.990000] new mode: 1280x1024 1728x1066 128946
[ 0.990000] new mode: 1280x1024 1688x1066 108000
[ 0.990000] new mode: 1280x960 1800x1000 108000
[ 0.990000] new mode: 1280x800 1440x823 71000
[ 0.990000] new mode: 800x600 1056x628 40000
[ 0.990000] new mode: 800x600 1024x625 36000
[ 0.990000] new mode: 640x480 840x500 31500
[ 0.990000] new mode: 640x480 832x520 31500
[ 0.990000] new mode: 640x480 864x525 30240
[ 0.990000] new mode: 640x480 800x525 25200
[ 0.990000] new mode: 720x400 900x449 28320
[ 0.990000] new mode: 1280x1024 1688x1066 135000
[ 0.990000] new mode: 1024x768 1312x800 78800
[ 0.990000] new mode: 1024x768 1328x806 75000
[ 0.990000] new mode: 1024x768 1344x806 65000
[ 0.990000] new mode: 832x624 1152x667 57284
[ 0.990000] new mode: 800x600 1056x625 49500
[ 0.990000] new mode: 800x600 1040x666 50000
[ 0.990000] new mode: 848x480 1088x517 33750
[ 0.990000] new mode: 1152x864 1600x900 108000
[ 0.990000] new mode: 1280x768 1440x790 68250
[ 0.990000] new mode: 1280x768 1696x805 102250
[ 0.990000] new mode: 1280x800 1696x838 106500
[ 0.990000] new mode: 1360x768 1792x795 85500
[ 0.990000] new mode: 1400x1050 1560x1080 101000
[ 0.990000] new mode: 1400x1050 1896x1099 156000
[ 0.990000] new mode: 1440x900 1600x926 88750
[ 0.990000] new mode: 1440x900 1936x942 136750
[ 0.990000] new mode: 1024x576 1312x597 46970
[ 0.990000] new mode: 1366x768 1800x795 85885
[ 0.990000] new mode: 1600x900 2128x932 118963
[ 0.990000] new mode: 1680x945 2240x978 131481
[ 0.990000] new mode: 640x480 800x525 25175
[ 0.990000] new mode: 720x480 858x525 27000
[ 0.990000] new mode: 720x480 858x525 27000
[ 0.990000] new mode: 1280x720 1650x750 74250
[ 0.990000] new mode: 1920x1080 2200x1125 74250
[ 0.990000] new mode: 1920x1080 2200x1125 148500
[ 0.990000] new mode: 720x576 864x625 27000
[ 0.990000] new mode: 720x576 864x625 27000
[ 0.990000] new mode: 1280x720 1980x750 74250
[ 0.990000] new mode: 1920x1080 2640x1125 74250
[ 0.990000] new mode: 1440x576 1728x625 54000
[ 0.990000] new mode: 1920x1080 2640x1125 148500
[ 0.990000] new mode: 1920x1080 2200x1125 148500
[ 0.990000] new mode: 720x480 858x525 27000
[ 0.990000] new mode: 1280x720 1650x750 74250
[ 0.990000] new mode: 720x576 864x625 27000
[ 0.990000] new mode: 800x600 1056x628 40000
[ 0.990000] new mode: 800x600 1024x625 36000
[ 0.990000] new mode: 640x480 840x500 31500
[ 0.990000] new mode: 640x480 832x520 31500
[ 0.990000] new mode: 640x480 864x525 30240
[ 0.990000] new mode: 640x480 800x525 25200
[ 0.990000] new mode: 720x400 900x449 28320
[ 0.990000] new mode: 1280x1024 1688x1066 135000
[ 0.990000] new mode: 1024x768 1312x800 78800
[ 0.990000] new mode: 1024x768 1328x806 75000
[ 0.990000] new mode: 1024x768 1344x806 65000
[ 0.990000] new mode: 832x624 1152x667 57284
[ 0.990000] new mode: 800x600 1056x625 49500
[ 0.990000] new mode: 800x600 1040x666 50000
[ 0.990000] new mode: 640x480 800x525 25175
[ 0.990000] new mode: 720x480 858x525 27000
[ 0.990000] new mode: 720x480 858x525 27000
[ 0.990000] new mode: 1280x720 1650x750 74250
[ 0.990000] new mode: 1920x1080 2200x1125 74250
[ 0.990000] new mode: 1920x1080 2200x1125 148500
[ 0.990000] new mode: 720x576 864x625 27000
[ 0.990000] new mode: 720x576 864x625 27000
[ 0.990000] new mode: 1280x720 1980x750 74250
[ 0.990000] new mode: 1920x1080 2640x1125 74250
[ 0.990000] new mode: 1440x576 1728x625 54000
[ 0.990000] new mode: 1920x1080 2640x1125 148500
[ 1.310000] EXT4-fs (ram0): warning: mounting unchecked fs, running e2fsck is recommended
[ 1.340000] EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
Starting rcS...
++ Mounting filesystem
++ Setting up mdev
[ 1.350000] VFS: Mounted root (ext4 filesystem) on device 1:0.
[ 1.350000] adv7511-hdmi-snd adv7511_hdmi_snd.2: CODEC adv7511.2-0039 not registered
[ 1.350000] platform adv7511_hdmi_snd.2: Driver adv7511-hdmi-snd requests probe deferral
[ 1.350000] Freeing init memory: 148K
[ 1.350000] setting clock to: 148500
[ 1.350000] raw_edid: d8c08c80 7
[ 1.350000] Using YCbCr output
[ 1.400000] Console: switching to colour frame buffer device 240x67
[ 1.470000] fb0: frame buffer device
[ 1.470000] drm: registered panic notifier
[ 1.480000] [drm] Initialized analog_drm 1.0.0 20110530 on minor 0
++ Configure static IP 192.168.3.130
++ Starting telnet daemon
++ Starting http daemon
++ Starting ftp daemon
++ Starting dropbear (ssh) daemon
++ Starting OLED Display
insmod: can't read '/lib/modules/3.6.0-digilent-13.01/pmodoled-gpio.ko': No such file or directory
++ Exporting LEDs & SWs
rcS Complete
zynq> [ 4.590000] xemacps e000b000.eth: Set clk to 24999999 Hz
[ 4.590000] xemacps e000b000.eth: link up (100/FULL)


ペンギンを書いているかどうかは疑わしい気がします。黒いプロンプトの位置が最初の位置になっています。プロンプトからずらしたほうが良いので、カメラ用にフレームバッファのアドレスを移動しようと思います。この機会にカメラ表示回路用にレジスタを新設しようと思います。つまり、AXI Master と同時にAXI Slave Lite に対応することにします。
  1. 2013年03月07日 20:01 |
  2. Linux
  3. | トラックバック:0
  4. | コメント:0

Implementing Linux on the Zynq-7000 SoC のビデオで勉強中

ZedBoard.orgHome » SpeedWay Training Courses Implementing Linux on the Zynq-7000 SoC のビデオで勉強中です。
Chapter-2.1のLinux Kernel Basics まで見ました。英語はあまりわかりませんが、プレゼン資料を見ながら聞いていれば大体わかります。最後までビデオでトレーニングを受ける予定です。
ZedBorad上のLinuxでペンギンを描画するメモリ領域を確保して、AXI VDMAのレジスタに、そのアドレスを書いている部分を見つけたいと思っています。描画スタートアドレスをレジスタから設定できるように、私のカスタムIPのハードウェアを変更します。そうして、AXI VDMAのレジスタに書く代わりに、私の作ったカスタムIPに描画スタートアドレスを書き込むようにしたいです。そうすれば、Linuxが暴走することはなくなるはずです。
  1. 2013年03月06日 05:37 |
  2. Linux
  3. | トラックバック:0
  4. | コメント:2

FPGAの部屋、まとめサイトの更新

FPGAの部屋のまとめサイトを更新しました。
新しい項目はありません。
ZedBoard”に、CMOSカメラ画像の表示に関する項目を追加しました。Linuxにカメラ画像を表示する場合には、Linuxカーネルを変更する必要が有るようです。
Xilinx ISEについて”に、LinuxへのISE14.4のインストールに関する項目を追加しました。

その他、2013年3月3日までの記事をまとめサイトに追加しました。
  1. 2013年03月05日 04:19 |
  2. その他のFPGAの話題
  3. | トラックバック:0
  4. | コメント:0

ZedBoardのLinuxカーネルコンパイルのテスト

前回で、ISE14.4はすべてのツールがうまく動作した。今回は、ARMのツールチェーンを使用してZedBoardのカーネルコンパイルを行う。参考にするのは、ひでみのアイデア帳さんの”ZynqのKernelコンパイル”という記事だ。

GitHubのDigilent/linux-digilentからlinux-digilent のZipファイルをダウンロードした。

・解凍すると、linux-digilent-master というディレクトリができた。
ISE_for_Linux_81_130303.png

・linux-digilent-master にZedBoard_OOB_Design/linux ディレクトリの.config ファイルをコピーした。

・linux-digilent-master/arch/arm/boot/dts ディレクトリにdevicetree_ramdisk.dts ファイルをコピーした。

make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- menuconfig を行ったところ、ncurses-devel をインストールする必要があるみたいだ。
ISE_for_Linux_63_130228.png

sudo apt-get install ncurses-dev コマンドを実行して、ncurses-devel をインストールした。
ISE_for_Linux_64_130228.png

・もう一度、make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- menuconfig を行うとKernel Configuration ダイアログが出てきた。
ISE_for_Linux_65_130228.png

・最初のコンフィグレーション画面をExit で抜けた。

・次のコンフィグレーション画面。
ISE_for_Linux_82_130303.png

・コンフィグレーション画面をExit で抜けた。この辺はいろいろとオプションを覗いていたので、わからなくなってしまった。コンフィグレーション画面は2画面あったのか?

・Do you wish to save your new configuration? と聞いてきたので、何も変更はしていないが、Yes を選択した。
ISE_for_Linux_83_130303.png

make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- modules を行った。コンパイルが開始され、無事に終了した。
ISE_for_Linux_84_130303.png

make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- を行った。コンパイルが開始され、無事に終了した。
ISE_for_Linux_85_130303.png

・linux-digilent-master/arch/arm/boot/zImage ができた。
ISE_for_Linux_86_130303.png
  1. 2013年03月03日 06:39 |
  2. Linux
  3. | トラックバック:0
  4. | コメント:0

フライト(映画)を見て来ました

今日は奥さんとフライト(ムービー注意です)(映画)を見て来ました。いや~。こんな内容の映画とは思いませんでした。ちょっとがっくり来ましたが、ラストは良かったと思います。
  1. 2013年03月02日 20:11 |
  2. 日記
  3. | トラックバック:0
  4. | コメント:0

Linux上のSDKでZedBoardのLinuxへリモートデバック

前回、ARMのツールチェーンを変更してARM用のLinux上で動作するソフトウェアをコンパイルすることができた
今回は、Ubuntu12.10上で動作するSDK14.4から、ZedBoard上で動作するLinuxにリモートデバックをできるかどうかを確かめた。

Linux上でのリモートデバックについては、次の2つのブログ記事を参考にした。

Zynq-7000(ZC702)のLinuxチュートリアル3(リモートデバック)
ZedBoard Linux のフレームバッファにカメラ画像を表示9(SDKリモートデバック)


前回コンパイルしたソフトウェアは、すでにLinux上のファイルシステムに書き込まれているので、”>Zynq-7000(ZC702)のLinuxチュートリアル3(リモートデバック)”で行ったHello World プロジェクトをリモートデバックすることにした。
前の2つのブログ記事のように、すべての手順を書くのは面倒なので、要所々々だけ抜き出して書くことにした。詳しい手順は2つのブログ記事を参照してください。

最初に、LinuxソフトウェアのHello_World_Linuxプロジェクトを作成した。
ISE_for_Linux_80_130301.png

Debug Configurationウイザードで、新しいConnection を作成しているところ。ZedBoardのプライベートIPアドレスを設定している。
ISE_for_Linux_74_130301.png

Remote Absolute File Path for C/C++ Application のBrows... ボタンをクリックして、Hello_World_Linux.elf を作成した。(すでにApps ディレクトリは作成済み)
ISE_for_Linux_76_130301.png

これで、Debug Configurationウイザードの設定は終了したので、Debugボタンをクリックしてデバックをスタートした。
ISE_for_Linux_77_130301.png

Debugパースペクティブになった。return 0; の行にブレークポイントを設定した。
ISE_for_Linux_78_130301.png

Resumeボタンをクリックするとreturn 0; の行まで実行された。
ISE_for_Linux_79_130301.png

これで、Ubuntu12.10上で動作するSDK14.4から、ZedBoard上で動作するLinuxにリモートデバックができることがわかった。
  1. 2013年03月02日 05:56 |
  2. EDK
  3. | トラックバック:0
  4. | コメント:0

Linux上のSDKでZedBoard_OOB_Desgin のLinuxソフトウェアをコンパイル

前回、やっとUbuntu12.10 上のSDKでZedBoardをコンフィグレーションして、ソフトウェアを走らせることができた
今回は、ZedBoard_OOB_Desgin のLinuxソフトウェアをコンパイルできるかどうかを確かめて見ることにした。

最終目的は、Linux上に実行用ELFファイルをSSHでsftpして、ZedBoard上にアップロードしてリモートデバックするということだ。その前にARMのツールチェーンでコンパイルする必要がある。Windows上で行った例は、”ZedBoard Linux のフレームバッファにカメラ画像を表示9(SDKリモートデバック)”だ。

SDKのプロジェクトを作成して、コンパイルを行うと、エラーが発生した。
ISE_for_Linux_66_130228.png

sys/mman.h が無いと言われてしまった。エラー内容を下に示す。

/opt/Xilinx/14.4/ISE_DS/EDK/gnu/arm-eabi/bin/../lib/gcc/arm-xilinx-eabi/4.6.3/../../../../arm-xilinx-eabi/include/sys/dirent.h:10:2: error: #error " not supported"
../src/cam_disp3_linux.c:17:22: fatal error: sys/mman.h: No such file or directory
compilation terminated.
make: *** [src/cam_disp3_linux.o] エラー 1


いろいろググって調べてみたが、どうもよくわからないかった。うまくコンパイルできているWindows のSDKプロジェクトと較べてみると、cam_disp3_linuxプロジェクトのinclude のディレクトリの数が違うことに気がついた。Linux上のcam_disp3_linuxプロジェクトのinclude のディレクトリの数は3つでarm-xilinx-eabi に関するインクルード・ディレクトリのみだった。
ISE_for_Linux_67_130228.png

しかし、Windows上での同じディレクトリの数は7つで、最初に、arm-xilinx-linux-gnueabi に関するインクルード・ディレクトリが先に来ていた。これはARMのツールチェーンが違うのだと思った。
そこで、SDKのProjectメニューからProperties を選択して設定を行った。
ダイアログの C/C++ Build -> Tool Chain Editor でCurrent toolchain: がXilinx ARM GNU Toolchain になっていたので、Xilinx ARM GNU/Linux Toolchain を選択した。
ISE_for_Linux_68_130228.png

Xilinx ARM GNU/Linux Toolchain を選択後の画面。
ISE_for_Linux_69_130228.png

Linux上のcam_disp3_linuxプロジェクトのinclude のディレクトリの数は、Windows のSDKと同様に7つになった。
ISE_for_Linux_70_130228.png

これで、ビルドしてみたところ、もう1つエラーがあった。それは、linker のライブラリ・オプションのエラーだった。エラー内容を下に示す。

/opt/Xilinx/14.4/ISE_DS/EDK/gnu/arm/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.3/../../../../arm-xilinx-linux-gnueabi/bin/ld: cannot find -l-Wl,--start-group,-lxil,-lgcc,-lc,--end-group
collect2: ld returned 1 exit status
make: *** [cam_disp3_linux.elf] エラー 1


先程と同様に、SDKのProjectメニューからProperties を選択して設定を行った。
C/C++ Build -> settings -> Tool Settins タブ -> ARM Linux gcc linker -> Libraries のLibraries オプションの -Wl,--start-group,-lxil,-lgcc,-lc,--end-group を2番めの赤バツアイコンをクリックして削除した。
ISE_for_Linux_71_130228.png

Libraries オプション削除後の画面。
ISE_for_Linux_72_130228.png

これでビルドされたら(Auto Buildに設定されている)、コンパイルが通った。
ISE_for_Linux_73_130228.png

やった~。コンパイル成功。
いろいろとトラップがあるが、回避しながら一歩ずつ進んでいる。
  1. 2013年03月01日 05:23 |
  2. EDK
  3. | トラックバック:0
  4. | コメント:0