Overview

An overview of available PTcl commands.

Command

Arguments

Description

alias

galport b1 p1

Connect a module port galport to the port p1 of block b1.

animation

[on | off]

Enable or disable printing of primitive names as they fire.

busconnect

b1 p1 b2 p2 w [delay]

Form a bus connection of width w between the two multi portholes p1 and p2 which belong to the blocks b1 and b2, respectively.

cancelAction

action_handle

Cancel an action previously registered using registerAction.

cd

[directory]

Change the current directory to the one given by argument directory.

connect

b1 p1 b2 p2 [delay]

Form a connection between the two portholes p1 and p2 which belong to the blocks b1 and b2, respectively.

cont

num

Continue executing the current system num times (default: 1).

cursystem

[name]

Print or set the name of the current system to name.

defmodule

name { body }

Define a new module class with name.

delds

ds_name

Delete the data structure or enumeration ds_name.

delnode

name

Delete the node with name from the current module.

delprimitive

name

Delete the primitive with name from the current module.

delsystem

[name]

Delete the current system or the system with name.

descriptor

[block]

Return the descriptor of block (default: current module).

disconnect

b1 p1

Remove the connection going to/from the specified port.

domain

[name]

Set the domain name as current, or print the name of the current domain.

domains

 

List the known domains.

execute

filename.ptcl

Reads the file filename.ptcl and runs the simulation.

exit

 

Exits the current PTcl Shell.

halt

 

Request that the current simulation stops.

help

[command]

Print a short description of command, or help on help, if the argument is omitted.

knownlist

[domain]

List the known blocks of domain (default: current domain).

link

objfile

Incrementally link objfile into the interpreter.

listobjs

class [name]

List parameters, ports, multi-ports, events, memories, and resources in the block name (default: current module).

matlab

command [arg1] [arg2]

Manage a Matlab process and evaluate Matlab commands.

mathematica

command [arg1] [arg2]

Manage a Mathematica process and evaluate commands.

multilink

linker_args code.o

Link arbitrary code into the interpreter.

newds

ds_name ds_base

Define a new data structure ds_name with parent type ds_base.

newdsmember

ds_name member_name member_type [default] [subrange]

Define a new member member_name with type member_type for data structure ds_name.

newenum

enum_name enum_base

Define a new enumeration enum_name with parent type enum_base.

newenummember

enum_name member_value member_index

Define a new member with value member_value and index member_index for enumeration enum_name.

newevent

name scope type value

Define an event name for the current module with type and a default value.

newmemory

name scope type value

Define a memory name for the current module with type and a default value.

newparam

name type value

Define a parameter name for the current module with type and a default value.

newquantity

name scope indexed | non-indexed

Define a quantity resource name for the current module. The scope defines whether the resource is external or internal.

newserver

name scope

Define a server resource name for the current module. The scope defines whether the resource is external or internal.

newsystem

[name] [domain]

Create a new empty system with name in domain (defaults: main and the current domain).

node

name

Create a node with name for use by nodeconnect.

nodeconnect

b1 p1 node [delay]

Connect a porthole given by block argument b1 and port argument p1 to a specified node.

numports

b1 p1 number

Force a multi porthole to have a given number of portholes.

paramvalue

b1 name [current | initial]

Print the current or initial value of parameter name in block b1.

permlink

linker_args code.o

Link arbitrary code into the interpreter permanently.

pragma

b1 b2 name value

Set pragma name to value for block b2 in parent b1.

pragmaDefaults

target

Print default values of the pragmas for the target.

primitive

name class

Create an instance with name of a primitive from the given class.

print

[name]

Print a description of block name or block class (or the current module).

printds

ds_name

Print out the default value of the data structure or enumeration ds_name.

printdsnames

 

Lists all existing data structure and enumeration names.

registerAction

pre | post command

Register a Tcl command to be executed before or after primitives are fired.

renamesystem

[oldname] newname

Rename a system (default: current system).

reset

[name]

Empty a system with name (default: main).

run

[num]

Run the current system num times (default: 1).

schedtime

[actual]

Print the normalized (default) or unnormalized current scheduler time.

schedule

 

Generate and print a schedule (only valid for some domains).

seed

number

Change or print the random number seed.

setmemory

block name value

Change the value of memory name of a block block to value.

setevent

block name value

Change the value of event name of a block block to value.

setparam

block name value

Change the parameter name of a block block to value.

setquantity

block name dimension capacity occupancy blocking discipline reject fit

Change the properties of quantity resource name of a block block to value.

setserver

block name dimension servers rate mechanism occupancy overhead preempt discipline reject

Change the properties of server resource name of a block block.

source

filename

No longer valid. See execute.

stoptime

 

Return the stop time of the current run.

systemlist

 

List the names of all defined systems.

target

[newtarget]

Change or display the name of the current target.

targetparam

name [value]

Change or display the value of a target parameter name.

targets

[domain]

List targets usable with domain (default: current domain).

topblocks

[name]

List top-level blocks of the block name (default: current module).

wrapup

 

Invoke the wrapup method of all the blocks.