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

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

ステップ2: 子レベルのサブモジュールの作成

フラットデザインを階層PRデザインに変換するには、親サブモジュール (blinking_led.sv) 内に、子サブモジュール (blinking_led_child.sv) を作成します。
  1. 新しいデザインファイル 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
  2. blinking_led.sv を変更して、led_two_on をスタティック領域からカウンターのビット23に接続し、blinking_led_child モジュールをインスタンス化します。blinking_led.sv は、次のように表示される必要があります。
    `timescale 1 ps / 1 ps
    `default_nettype none
    
    module blinking_led(
       // 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 = 23;
    
       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
  3. Add file to current projectオプションを保持したまま、すべてのファイルを保存します。
  4. Processing > Start > Start Analysis & Synthesisの順でクリックします。