手順 5: ペルソナを定義する
このリファレンス・デザインでは、親と子のPRパーティションに対して5つの異なるペルソナを定義しています。ペルソナを定義し、プロジェクトに含めるには次を実行します。
- 5つのペルソナに対して、blinking_led_child.sv、blinking_led_child_slow.sv、blinking_led_child_empty.sv、blinking_led_slow.svの4つのSystemVerilogファイルを作業ディレクトリーに作成します。
注: インテル® 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 endmoduleblinking_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 endmoduleblinking_led_child_empty.sv LED_THREEは継続して点灯します `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; endmoduleblinking_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