Skip to content

Commit

Permalink
Fix batch file to run on Wine and remove spaces in end time parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
iwbnwif committed Feb 10, 2024
1 parent 88ff864 commit 7a2905f
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions qucs/qucs_run_hdl.bat
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,19 @@ if "X%6"=="X" goto usage

set NAME=%1
set NAMEOUT=%2
set TIME=%~3
set DIR=%4
set SIMTIME=%~3
set SIMDIR=%4
set BINDIR=%5

if not exist "%DIR%" goto nodir
REM echo %0 %1 %2 %3 %4 %5

cd /d "%DIR%"
REM Remove any spaces in the simulation time command.
set SIMTIME=%SIMTIME: =%
REM echo %SIMTIME%

if not exist "%SIMDIR%" goto nodir

cd /d "%SIMDIR%"

if not exist %NAME% goto nofile

Expand All @@ -45,10 +51,10 @@ echo running GHDL elaboration pass...
ghdl -e TestBench

echo simulating...
ghdl -r TestBench --vcd=digi.vcd --stop-time=%TIME%
ghdl -r TestBench --vcd=digi.vcd --stop-time=%SIMTIME%

echo running VCD conversion...
%BINDIR%\vcd2qucsdat %OPTION% -if vcd -of qucsdata -i %NAME%.vcd -o %NAMEOUT%
%BINDIR%\vcd2qucsdat -if vcd -of qucsdata -i %NAME%.vcd -o %NAMEOUT%

goto end

Expand All @@ -59,7 +65,7 @@ exit /b 1
goto end

:nodir
echo %DIR%: Not a directory
echo %SIMDIR%: Not a directory
exit /b 1
goto end

Expand All @@ -68,4 +74,4 @@ echo %NAME%: No such file
exit /b 1
goto end

:end
:end

0 comments on commit 7a2905f

Please sign in to comment.