AN 869: Partially Reconfiguring a Design: on Intel® Cyclone® 10 GX FPGA Development Board

ID 683503
Date 7/15/2019
Public

Step 5: Defining Personas

This reference design defines three separate personas for the single PR partition. To define and include the personas in your project:

  1. Create three SystemVerilog files, blinking_led.sv, blinking_led_slow.sv, and blinking_led_empty.sv in your working directory for the three personas.
    Note:
    • blinking_led.sv is already available as part of the files you copy from the flat/ sub-directory. You can simply reuse this file.
    • If you create the SystemVerilog files from the Intel® Quartus® Prime Text Editor, disable the Add file to current project option, when saving the files.
    Table 2.  PR Persona Definitions
    File Name Description Code
    blinking_led.sv Default persona with same design as the flat implementation
    `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 LEDs blink slower
    `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 LEDs stay 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