Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17241 Discussions

Modifying internal components Parameters in a Sub-System Package (QCP)

Bala-Mookkiah
Beginner
3,000 Views

Hi I followed the instructions in online documents and youtube videos on how to add run_system_script for modifying internal components Parameters of a Sub-System Package (QCP) but so far I am not able to successfully modify it. I m hitting two main issues

1. "No Parameter Found" error when loading the QCP in QSYS. I am using internal parameter name but the system is not able to find it

2. load_component and save_component commands in the script is making the component fail to load in qsys.

Any help will be appreciated

 

Here is the subsystem package script

package require -exact qsys 25.1

set_package_property NAME "rpss_ssd"

set_package_property DISPLAY_NAME "rpss_ssd"

set_package_property VERSION "1.5"

set_package_property GROUP ""

set_package_property DESCRIPTION ""

set_package_property ELABORATION_CALLBACK elaboration_callback

set_package_property EXTRACTION_CALLBACK extraction_callback

set_package_property UNLOCKABLE true

 

add_fileset synth_fileset QUARTUS_SYNTH fileset_callback "Quartus Synthesis Fileset"

add_fileset sim_verilog_fileset SIM_VERILOG fileset_callback "Simulation Verilog Fileset"

 

proc elaboration_callback {} {

    enable_all_instances

    run_system_script TEXT {

       package require -exact qsys 25.1

       set args $__run_system_script_args_list__

       set args_len [llength $args]

       for {set i 0} {$i < $args_len} {incr i} {

            set param [lindex $args $i]

            set val [lindex $args [incr i]]

            send_message "Info" "val: $val"

            load_component rpss_0

            set_component_parameter_value QUEUE_MEM_BASE_ADDRESS $val

            save_component

        }

        auto_assign_system_base_addresses

        sync_sysinfo_parameters

        save_system

        } [ list ADDR 0x10000 ]

    # disable_instance clock_in

    # disable_instance reset_in

    # disable_instance rpss_0

    # disable_instance rtile_dummy_0

}

 

proc extraction_callback {} {

    extract_modules

}

proc fileset_callback { output_name } {

    generate_all_instances

}

Labels (1)
0 Kudos
15 Replies
Bala-Mookkiah
Beginner
2,986 Views

BTW, This is a custom IP component which has verilog style PARAMETERS in the source code

0 Kudos
sstrell
Honored Contributor III
2,957 Views

Can you clarify the structure here?  You've created a package named rpss_ssd.qcp.  What components are inside this package and how are they connected?  Show the New Packaged Subsystem dialog box if you can (right-click the .qcp in the IP catalog and choose to Edit it).

Or maybe it's as simple as QUEUE_MEM_BASE_ADDR vs. QUEUE_MEM_BASE_ADDRESS.

0 Kudos
Bala-Mookkiah
Beginner
2,701 Views

Hi sstrell,

Thanks for looking into my issue and prompt response. I tried both QUEUE_MEM_BASE_ADDR vs. QUEUE_MEM_BASE_ADDRESS, but it didn't help. QUEUE_MEM_BASE_ADDRESS is the internal name, and I should use this according to the document. I attached a screenshot of the RSS_SSD QCP internals. rpss_0 is a custom IP (RTL written by me) with HDL parameters. They are configured and exported correctly, as shown in the _hw.tcl. I tried writing a similar script to existing Intel IPs in the IP catalog, and that worked. I am wondering if I need to do anything special in my custom component to configure the parameters in the qcp system.

 

add_parameter QUEUE_MEM_BASE_ADDRESS STD_LOGIC_VECTOR 268435456 ""
set_parameter_property QUEUE_MEM_BASE_ADDRESS DEFAULT_VALUE 268435456
set_parameter_property QUEUE_MEM_BASE_ADDRESS DISPLAY_NAME QUEUE_MEM_BASE_ADDR
set_parameter_property QUEUE_MEM_BASE_ADDRESS WIDTH 32
set_parameter_property QUEUE_MEM_BASE_ADDRESS UNITS None
set_parameter_property QUEUE_MEM_BASE_ADDRESS DESCRIPTION ""
set_parameter_property QUEUE_MEM_BASE_ADDRESS AFFECTS_GENERATION false
set_parameter_property QUEUE_MEM_BASE_ADDRESS HDL_PARAMETER true
set_parameter_property QUEUE_MEM_BASE_ADDRESS TRANSFORM_PARAMETER false
set_parameter_property QUEUE_MEM_BASE_ADDRESS EXPORT true

0 Kudos
sstrell
Honored Contributor III
2,608 Views

Did you include the _hw.tcl file under Additional Files when creating the .qcp?  All files relating to custom IP must be included in the package.

 

FYI, windows key + shift + S for a screenshot will be much easier (and clearer) than taking screenshots with your phone.

0 Kudos
Bala-Mookkiah
Beginner
2,606 Views

Yes I do. The rpss_ssd package is normall working with full functionality. I am just not able to set component level parameters. attached screen shot of the 'addition_file" tab.

0 Kudos
sstrell
Honored Contributor III
2,580 Views

In my .qcp ss.tcl script, I included string matching for the name of the parameter.  So yours would look like this:

 

if {[string match $param "QUEUE_MEM_BASE_ADDRESS"]}{

         load_component rpss_0

          set_component_parameter_value QUEUE_MEM_BASE_ADDRESS $val

          save_component

     }

}

 

I don't know if this will do anything for you.  I put this in because I only wanted a single parameter to appear in the parameter editor for when the .qcp file was added to the system.

0 Kudos
Bala-Mookkiah
Beginner
2,575 Views

Yes, just added the if condition, I am still seeing the original error

Error: set_component_parameter_value QUEUE_MEM_BASE_ADDRESS 0x1F000: No parameter named QUEUE_MEM_BASE_ADDRESS in rpss_0.

 

My qcp script

proc elaboration_callback {} {
    enable_all_instances

run_system_script TEXT {
    package require -exact qsys 25.1

    set args $__run_system_script_args_list__
    set args_len [llength $args]

    for {set i 0} {$i < $args_len} {incr i} {

        set param [lindex $args $i]
        set val [lindex $args [incr i]]
        send_message "Info" "val: $val"

        if {[string match $param "QUEUE_MEM_BASE_ADDRESS"]} {
            load_component rpss_0
            set_component_parameter_value QUEUE_MEM_BASE_ADDRESS $val
            save_component
        }
    }
} [ list QUEUE_MEM_BASE_ADDRESS 0x1F000 ]

# disable_instance clock_in
# disable_instance reset_in
# disable_instance rpss_0
# disable_instance rtile_dummy_0
}

0 Kudos
Bala-Mookkiah
Beginner
2,496 Views

I am wondering about the RPSS custom IP. When it is getting instantiated, I don't see Quartus instantiating with the HDL parameters. Even though it detected the parameters in the create component analysis stage and has all the parameters properly listed in rpss_hw.tcl. So I am wondering if there are any other settings that I am missing for the parameters of the custom IP that need to be set for the detection of parameters correctly by Quartus/Platform Designer.

Instantiation of RPSS does not have parameters

rp_ss rpss_0 (
.hip_clk                    (clock_in_out_clk_clk),                                    //   input,    width = 1,               hip_clock_in.clk
.sys_clk                    (clock_in_out_clk_clk),                                    //   input,    width = 1,                 sys_clk_in.clk
.slow_clk                   (clock_in_out_clk_clk),                                    //   input,    width = 1,                slow_clk_in.clk
.ip_rst_n                   (reset_in_out_reset_reset),                                //   input,    width = 1,                   ip_rst_n.reset_n
.sys_rstn                   (reset_in_out_reset_reset),                                //   input,    width = 1,                   sys_rstn.reset_n
.reset_status               (rtile_dummy_0_r_tile_reset_status_n_reset),               //   input,    width = 1,      R_Tile_reset_status_n.reset_n
.slow_reset_status          (rtile_dummy_0_r_tile_slow_reset_status_n_reset),
 
 
whereas some existing Intel IPs are instantiated with parameters
 
altera_reset_controller #(
.NUM_RESET_INPUTS          (1),
.OUTPUT_RESET_SYNC_EDGES   ("both"),
.SYNC_DEPTH                (2),
.RESET_REQUEST_PRESENT     (0),
.RESET_REQ_WAIT_TIME       (1),
.MIN_RST_ASSERTION_TIME    (3),
.RESET_REQ_EARLY_DSRT_TIME (1),
.USE_RESET_REQUEST_IN0     (0),
.USE_RESET_REQUEST_IN1     (0),
.USE_RESET_REQUEST_IN2     (0),
 
in rpss_hw.tcl
 
add_parameter QUEUE_MEM_BASE_ADDRESS STRING "64'h0001_0000_0000_0000"
set_parameter_property QUEUE_MEM_BASE_ADDRESS DEFAULT_VALUE "64'h0001_0000_0000_0000"
set_parameter_property QUEUE_MEM_BASE_ADDRESS DISPLAY_NAME QUEUE_MEM_BASE_ADDRESS
set_parameter_property QUEUE_MEM_BASE_ADDRESS UNITS None
set_parameter_property QUEUE_MEM_BASE_ADDRESS AFFECTS_GENERATION false
set_parameter_property QUEUE_MEM_BASE_ADDRESS HDL_PARAMETER true
set_parameter_property QUEUE_MEM_BASE_ADDRESS TRANSFORM_PARAMETER false
set_parameter_property QUEUE_MEM_BASE_ADDRESS EXPORT true
0 Kudos
ShengN_Intel
Employee
2,106 Views

Hi,


If you locate the .v file in the synth folder, the instantiation showing the parameters right?


Thanks,

Regards,

Sheng


0 Kudos
Bala-Mookkiah
Beginner
1,381 Views

Hi Thanks for your response. I am still not able to solve this problem and would really appreciate the community to help me resolve this issue

This is my actual RTL module

 

module rp_ss
#(
parameter RX_AFIFO_DEPTH = 512,
parameter RCB_64B_128B = 0, //0:64B 1:128B
parameter MAX_PYLD_SIZE = 13'd512,
// Two-channel memory architecture
parameter QUEUE_MEM_BASE_ADDRESS = 64'h0001_0000_0000_0000,
parameter QUEUE_MEM_SIZE = 64'h0000_1000_0000_0000, // 256GB
parameter DATA_MEM_BASE_ADDRESS = 64'h0004_0000_0000_0000,
parameter DATA_MEM_SIZE = 64'h0003_0000_0000_0000 // 768GB
)

 

This is the generated code

module rpss_0 #(
parameter       RX_AFIFO_DEPTH         = 512,
parameter       RCB_64B_128B           = 0,
parameter       MAX_PYLD_SIZE          = 512,
parameter[63:0] QUEUE_MEM_BASE_ADDRESS = 64'b0000000000000000000000000000000000110000000000000000000000000000,
parameter[63:0] QUEUE_MEM_SIZE         = 64'b0000000000000000000000000000000000000000000000001010000000000000,
parameter[63:0] DATA_MEM_BASE_ADDRESS  = 64'b0000000000000000000000000000000000100000000000000000000000000000,
parameter[63:0] DATA_MEM_SIZE          = 64'b0000000000000000000000000000000000000000000100000000000000000000
)
 
rp_ss #(
.RX_AFIFO_DEPTH         (RX_AFIFO_DEPTH),
.RCB_64B_128B           (RCB_64B_128B),
.MAX_PYLD_SIZE          (MAX_PYLD_SIZE),
.QUEUE_MEM_BASE_ADDRESS (QUEUE_MEM_BASE_ADDRESS),
.QUEUE_MEM_SIZE         (QUEUE_MEM_SIZE),
.DATA_MEM_BASE_ADDRESS  (DATA_MEM_BASE_ADDRESS),
.DATA_MEM_SIZE          (DATA_MEM_SIZE)
) rpss_0 
0 Kudos
ShengN_Intel
Employee
1,341 Views

Hi,


Seem like the generated code already has parameter QUEUE_MEM_BASE_ADDRESS?


Thanks,

Regards,

Sheng


0 Kudos
Bala-Mookkiah
Beginner
701 Views

I am not following your question. The generated code supposed to have the parameters or not?

0 Kudos
ShengN_Intel
Employee
634 Views

Hi,


The generated code should have parameters. Seems like your generated code got the parameters as well.


Thanks,

Regards,

Sheng


0 Kudos
Bala-Mookkiah
Beginner
541 Views

Ok. Any idea why the QCP instantiation is failing then?

0 Kudos
ShengN_Intel
Employee
83 Views

Hi,


When you generated the .qcp file, there's one auto generated code right?

Is that the generated code that you share?

Possible provide the .qcp file for testing? You may send privately to my email.


Thanks,

Regards,

Sheng


0 Kudos
Reply