Power and Thermal Analyzer User Guide

ID 865226
Date 9/29/2025
Public
Document Table of Contents

B.2. copy

Usage

copy [-h] [-help] [-long_help] [-count <Number of copies to create>] [-name <New name for target>] [-parent <Destination instance path>] -source <Source instance path>
Arguments
-h: Quick usage.
-help: Short help.
-long_help: Long help with examples and possible return values.
-count <Number of copies to create>: If more than 1 copy is required, this is used to create multiple copies.
-name <New name for target>: The new name for the copy.
-parent <Destination instance path>: Instance path to copy under.
-source <source instance path>: Instance path or paths to copy.

Tcl Package and Version

Belongs to ::quartus::pta 1.0 .

Description

This command copies the object in source path to the destination path.

The source is copied beneath the provided parent. This command returns the newly created object's instance path.

Example Usage

# ----------------------------------------------------
    # Consider an example hierarchy that is initially
    # laid out as follows:
    #
    # Agilex 7 : AGFA012R24B
    #   |
    #   |foo
    #   |foo|bar
    #   |foo|bar|logic[0]
    #   |foo|bar|dsp[0]
    #   |foo|baz
    #   |foo|baz|clock[0]
    # ----------------------------------------------------
    # Copy bar to a new baz instance.
    copy -source {|foo|bar} -parent {|foo} -name {baz}
    # returns: {|foo[0]|baz[1]}
    # The resulting hierarchy is as follows: 
    #
    # Agilex 7 : AGFA012R24B
    #   |
    #   |foo
    #   |foo|bar
    #   |foo|bar|logic[0]
    #   |foo|bar|dsp[0]
    #   |foo|baz[0]
    #   |foo|baz[0]|clock[0]
    #   |foo|baz[1]
    #   |foo|baz[1]|logic[0]
    #   |foo|baz[1]|dsp[0]
    # Copy DSP block from under bar to existing baz instance.
    copy -source {|foo|bar|dsp[0]} -parent {|foo|baz}
    # returns: {|foo[0]|baz[0]|dsp[0]}
    # The resulting hierarchy is as follows:
    #
    # Agilex 7 : AGFA012R24B
    #   |
    #   |foo
    #   |foo|bar
    #   |foo|bar|logic[0]
    #   |foo|bar|dsp[0]
    #   |foo|baz
    #   |foo|baz|clock[0]
    #   |foo|baz|dsp[0]

Return Value

Code Name Code String Return
TCL_OK 0 INFO: Operation successful
TCL_ERROR 1 ERROR: Cannot apply <string> operation where source "<string>" contains target "<string>".