@@ -34,6 +34,11 @@ public sealed class ActiveHdlSimulator : Simulator
3434 /// </summary>
3535 private const string SimApp = "vsimsa" ;
3636
37+ /// <summary>
38+ /// Library output directory path (relative to working directory)
39+ /// </summary>
40+ private const string LibDirPath = "VHDLTest.out/ActiveHDL" ;
41+
3742 /// <summary>
3843 /// Compile processor
3944 /// </summary>
@@ -88,7 +93,7 @@ public override RunResults Compile(Context context, Options options)
8893 context . WriteVerboseLine ( $ " Simulator Path: { simPath } ") ;
8994
9095 // Create the library directory
91- var libDir = Path . Combine ( options . WorkingDirectory , "VHDLTest.out/ActiveHDL" ) ;
96+ var libDir = Path . Combine ( options . WorkingDirectory , LibDirPath ) ;
9297 context . WriteVerboseLine ( $ " Library Directory: { libDir } ") ;
9398 if ( ! Directory . Exists ( libDir ) )
9499 {
@@ -98,7 +103,7 @@ public override RunResults Compile(Context context, Options options)
98103 // Build the batch file
99104 var writer = new StringBuilder ( ) ;
100105 writer . AppendLine ( "onerror {exit -code 1}" ) ;
101- writer . AppendLine ( "alib work VHDLTest.out/ActiveHDL " ) ;
106+ writer . AppendLine ( $ "alib work { LibDirPath } ") ;
102107 writer . AppendLine ( "set worklib work" ) ;
103108 foreach ( var file in options . Config . Files )
104109 {
@@ -113,12 +118,12 @@ public override RunResults Compile(Context context, Options options)
113118 // Run the ActiveHDL compiler
114119 var application = Path . Combine ( simPath , SimApp ) ;
115120 context . WriteVerboseLine ( $ " Run Directory: { options . WorkingDirectory } ") ;
116- context . WriteVerboseLine ( $ " Run Command: { application } -do VHDLTest.out/ActiveHDL /compile.do") ;
121+ context . WriteVerboseLine ( $ " Run Command: { application } -do { LibDirPath } /compile.do") ;
117122 return CompileProcessor . Execute (
118123 application ,
119124 options . WorkingDirectory ,
120125 "-do" ,
121- "VHDLTest.out/ActiveHDL /compile.do") ;
126+ $ " { LibDirPath } /compile.do") ;
122127 }
123128
124129 /// <inheritdoc />
@@ -133,7 +138,7 @@ public override TestResult Test(Context context, Options options, string test)
133138 context . WriteVerboseLine ( $ " Simulator Path: { simPath } ") ;
134139
135140 // Get the library directory
136- var libDir = Path . Combine ( options . WorkingDirectory , "VHDLTest.out/ActiveHDL" ) ;
141+ var libDir = Path . Combine ( options . WorkingDirectory , LibDirPath ) ;
137142 context . WriteVerboseLine ( $ " Library Directory: { libDir } ") ;
138143
139144 // Build the batch file
@@ -153,12 +158,12 @@ public override TestResult Test(Context context, Options options, string test)
153158 // Run the test
154159 var application = Path . Combine ( simPath , SimApp ) ;
155160 context . WriteVerboseLine ( $ " Run Directory: { options . WorkingDirectory } ") ;
156- context . WriteVerboseLine ( $ " Run Command: { application } -do VHDLTest.out/ActiveHDL /test.do") ;
161+ context . WriteVerboseLine ( $ " Run Command: { application } -do { LibDirPath } /test.do") ;
157162 var testRunResults = TestProcessor . Execute (
158163 Path . Combine ( simPath , SimApp ) ,
159164 options . WorkingDirectory ,
160165 "-do" ,
161- "VHDLTest.out/ActiveHDL /test.do") ;
166+ $ " { LibDirPath } /test.do") ;
162167
163168 // Return the test results
164169 return new TestResult (
0 commit comments