Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


Referencing environment variables within ModelSim

There are two ways to reference environment variables within ModelSim. Environment variables are allowed in a FILE variable being opened in VHDL. For example,

entity test is end;
use std.textio.all; 
architecture only of test is 
begin
	process
		FILE in_file : text is in "$ENV_VAR_NAME";
	begin
		wait;
	end process;
end; 

Environment variables may also be referenced from the ModelSim command line or in macros using the Tcl env array mechanism:

echo "$env(ENV_VAR_NAME)" 

Model Technology Inc.
Model Technology Incorporated
Voice: (503) 641-1340
Fax: (503)526-5410
www.model.com
sales@model.com
Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase