AN 954: 階層型パーシャル・リコンフィグレーションのチュートリアル: インテル® Agilex® FシリーズFPGA開発ボード用

ID 683687
日付 8/04/2021
Public
ドキュメント目次

ステップ5: ペルソナの定義

このリファレンス・デザインでは、親と子のPRパーティションに5つの個別のペルソナを定義しています。ペルソナを定義してプロジェクトに含めるには、次を実行します。

  1. 4つのSystemVerilogファイルであるblinking_led_child.svblinking_led_child_slow.svblinking_led_child_empty.sv、および blinking_led_slow.sv を5つのペルソナの作業ディレクトリーに作成します。
    注: インテル® Quartus® Prime Text EditorからSystemVerilogファイルを作成する場合は、ファイルを保存するときにAdd file to current projectオプションをディスエーブルします。
    表 2.  リファレンス・デザインのペルソナ
    ファイル名 説明 コード
    blinking_led_child.sv 子レベルデザインのデフォルトのペルソナです。
    `timescale 1 ps / 1 ps
    `default_nettype none
    
    module blinking_led_child (
    
       // clock
       input wire clock,
       input wire [31:0] counter,
    
       // Control signals for the LEDs
       output wire led_three_on
    
    );
       localparam COUNTER_TAP = 23;
       reg led_three_on_r;
    
       assign led_three_on   = led_three_on_r;
       
       always_ff @(posedge clock) begin
          led_three_on_r   <= counter[COUNTER_TAP];
       end
    
    endmodule
    blinking_led_child_slow.sv LED_THREE の点滅が遅くなります。
    `timescale 1 ps / 1 ps
    `default_nettype none
    
    module blinking_led_child_slow (
    
       // clock
       input wire clock,
       input wire [31:0] counter,
    
       // Control signals for the LEDs
       output wire led_three_on
    );
    
       localparam COUNTER_TAP = 27;
       reg led_three_on_r;
    
       assign led_three_on = led_three_on_r;
       
       always_ff @(posedge clock) begin
          led_three_on_r   <= counter[COUNTER_TAP];
       end
    
    endmodule
    blinking_led_child_empty.sv LED_THREE はONのままです。
    `timescale 1 ps / 1 ps
    `default_nettype none
    
    module blinking_led_child_empty (
    
       // clock
       input wire clock,
       input wire [31:0] counter,
    
       // Control signals for the LEDs
       output wire led_three_on
    
    );
    
       // LED is active low
       assign  led_three_on  = 1'b0;
    
    endmodule
    blinking_led_slow.sv LED_TWO の点滅が遅くなります。
    `timescale 1 ps / 1 ps
    `default_nettype none
    
    module blinking_led_slow(
    
       // clock
       input wire clock,
       input wire [31:0] counter,
    
       // Control signals for the LEDs
       output wire led_two_on,
       output wire led_three_on
    
    );
    
       localparam COUNTER_TAP = 27;
    
       reg led_two_on_r;
       assign  led_two_on    = led_two_on_r;
       
       // The counter:
       always_ff @(posedge clock) begin
             led_two_on_r <= counter[COUNTER_TAP];
       end
    
    
       blinking_led_child u_blinking_led_child(
             .led_three_on           (led_three_on),
             .counter             (counter),
             .clock                  (clock)
       );
    
    endmodule