![]() |
![]() |
![]() |
![]() |
mti_GetProcessName()
Gets the name of a VHDL process.
Syntax
proc_name = mti_GetProcessName( proc_id )Returns
Name Type Description proc_name char * The name of the specified processArguments
Name Type Description proc_id mtiProcessIdT A handle to a VHDL processDescription
mti_GetProcessName() returns the name of the specified process. The returned pointer must not be freed.
Related functions
Example
FLI code
#include <mti.h> void printProcesses( mtiRegionIdT region, int indent ) { mtiProcessIdT procid; for ( procid = mti_FirstProcess( region ); procid; procid = mti_NextProcess() ) { if ( procid ) { mti_PrintFormatted( "%*cProcess %s\n", indent, ' ', mti_GetProcessName( procid ) ); } } } void printHierarchy( mtiRegionIdT region, int indent ) { char * region_name; mtiRegionIdT regid; region_name = mti_GetRegionFullName( region ); mti_PrintFormatted( "%*cRegion %s\n", indent, ' ', region_name ); indent += 2; printProcesses( region, indent ); for ( regid = mti_FirstLowerRegion( region ); regid; regid = mti_NextRegion( regid ) ) { printHierarchy( regid, indent ); } mti_VsimFree( region_name ); } void loadDoneCB( void * param ) { mti_PrintMessage( "\nLoad Done phase:\n" ); printHierarchy( mti_GetTopRegion(), 1 ); } void initForeign( mtiRegionIdT region, /* The ID of the region in which this */ /* foreign architecture is instantiated. */ char *param, /* The last part of the string in the */ /* foreign attribute. */ mtiInterfaceListT *generics, /* A list of generics for the foreign model.*/ mtiInterfaceListT *ports /* A list of ports for the foreign model. */ ) { mti_AddLoadDoneCB( loadDoneCB, 0 ); mti_PrintMessage( "\nElaboration phase:\n" ); printHierarchy( mti_GetTopRegion(), 1 ); }HDL code
entity for_model is end for_model; architecture a of for_model is attribute foreign of a : architecture is "initForeign for_model.sl"; begin end a; entity inv is generic ( delay : time := 5 ns ); port ( a : in bit; b : out bit ); end inv; architecture b of inv is begin b <= a after delay; p1 : process variable count : integer := 0; begin count := count + 1; wait on a; end process; end b; entity top is end top; architecture a of top is signal s1 : bit := '0'; signal s2 : bit := '0'; signal s3 : bit := '0'; signal s4 : bit := '0'; component for_model is end component; for all : for_model use entity work.for_model(a); component inv is generic ( delay : time := 5 ns ); port ( a : in bit; b : out bit ); end component; begin flip : inv port map ( s3, s4 ); i1 : for_model; s1 <= not s1 after 5 ns; s3 <= not s3 after 5 ns; toggle : inv port map ( s1, s2 ); proc1 : process variable count : integer := 0; begin wait on s1; count := count + 1; end process proc1; end a;Simulation output
% vsim -c top Reading .../modeltech/sunos5/../tcl/vsim/pref.tcl # 5.4b # vsim -c top # Loading .../modeltech/sunos5/../std.standard # Loading work.top(a) # Loading work.inv(b) # Loading work.for_model(a) # Loading ./for_model.sl # # Elaboration phase: # Region /top # Region /top/i1 # Region /top/flip # Process p1 # Process line__19 # # Load Done phase: # Region /top # Process proc1 # Process line__58 # Process line__57 # Region /top/flip # Process p1 # Process line__19 # Region /top/i1 # Region /top/toggle # Process p1 # Process line__19 VSIM 1> run 10 VSIM 2> quit
![]() Model Technology Inc. Voice: (503) 641-1340 Fax: (503)526-5410 http://www.model.com sales@model.com |
![]() |
![]() |
![]() |
![]() |