ステップ4: ペルソナの定義
このリファレンス・デザインでは、単一のPRパーティションに対して3つの個別のペルソナを定義します。ペルソナを定義してプロジェクトに含めるには、次を実行します。
- 3つのSystemVerilogファイルの blinking_led.sv、blinking_led_slow.sv、および blinking_led_empty.sv に、3つのペルソナの作業ディレクトリーを作成します。
表 2. リファレンス・デザインのペルソナ ファイル名 説明 コード 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; reg led_three_on_r; assign led_two_on = led_two_on_r; assign led_three_on = led_three_on_r; always_ff @(posedge clock) begin led_two_on_r <= counter[COUNTER_TAP]; led_three_on_r <= counter[COUNTER_TAP]; end endmodule
blinking_led_slow.sv LEDの点滅が遅くなります。 `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; reg led_three_on_r; assign led_two_on = led_two_on_r; assign led_three_on = led_three_on_r; always_ff @(posedge clock) begin led_two_on_r <= counter[COUNTER_TAP]; led_three_on_r <= counter[COUNTER_TAP]; end endmodule
blinking_led_empty.sv LEDはONのままです。 `timescale 1 ps / 1 ps `default_nettype none module blinking_led_empty( // clock input wire clock, input wire [31:0] counter, // Control signals for the LEDs output wire led_two_on, output wire led_three_on ); // LED is active low assign led_two_on = 1'b0; assign led_three_on = 1'b0; endmodule
注:
- blinking_led.sv は、flat/ サブディレクトリーからコピーしたファイルの一部としてすでに使用可能です。それには、このファイルを再利用するだけです。
- インテルQuartus Prime Text EditorからSystemVerilogファイルを作成する場合、ファイルを保存するときに、Add file to current projectオプションをディスエーブルします。