cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
alvaro27
Adventurer
Adventurer
2,731 Views
Registered: ‎09-26-2007

TCL PROCEDURE FOR A CUSTOMIP

Jump to solution

 

Hello people,

 

  I need to update some parameters of a custom IP. To do that I need to modify the MPD to add a procedure. I would like to do something like this (this code is included in the EDK reference manual, TCL section): 

 

## MPD snippet

PARAMETER C_PARAM1 = 4, …,

PARAMETER C_PARAM2 = 0, ...,

IPLEVEL_UPDATE_VALUE_PROC = update_param2

## Tcl computes value based on other parameters on the IP

## Argument param_handle points to C_PARAM2 because the Tcl is

## associated with C_PARAM2

 

proc update_param2 {param_handle} {

set retval 0;

set mhsinst [xget_hw_parent_handle $param_handle]

set param1val [xget_hw_param_value $mhsinst “C_PARAM1”]

if {$param1val >= 4}

{ set retval 1;

}

return $retval

}

 

The problem is I do not know where the update_param2 procedure should be included. Do I have to create a TCL file with this name with the procedure inside?Where should this file be located?

 

 

Thanks

0 Kudos
1 Solution

Accepted Solutions
alvaro27
Adventurer
Adventurer
3,242 Views
Registered: ‎09-26-2007

Hello again,

 

 

 

 

 

I have spent more time reading documentation about TCL scripts and finally I have achieved to customize the mpd of IP.

 

 

Thanks

View solution in original post

0 Kudos
1 Reply
alvaro27
Adventurer
Adventurer
3,243 Views
Registered: ‎09-26-2007

Hello again,

 

 

 

 

 

I have spent more time reading documentation about TCL scripts and finally I have achieved to customize the mpd of IP.

 

 

Thanks

View solution in original post

0 Kudos