summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ngspice_Version_Change.md37
-rw-r--r--Ubuntu/README.md12
-rwxr-xr-xUbuntu/install-nghdl.sh141
-rw-r--r--Ubuntu/verilator-4.210.tar.xzbin0 -> 2442908 bytes
-rw-r--r--Windows/MinGW+MSYS.md29
-rw-r--r--Windows/README.md9
-rw-r--r--Windows/nghdl-setup-script.nsi85
-rw-r--r--Windows/sources/MSYS.7zbin8449807 -> 16957136 bytes
-rw-r--r--Windows/sources/mingw64.7zbin27332061 -> 63598866 bytes
-rw-r--r--Windows/sources/nghdl-simulator.7zbin0 -> 5190141 bytes
-rw-r--r--Windows/sources/ngspice-nghdl.7zbin6709844 -> 0 bytes
-rw-r--r--Windows/sources/verilator.7zbin0 -> 3166538 bytes
12 files changed, 204 insertions, 109 deletions
diff --git a/Ngspice_Version_Change.md b/Ngspice_Version_Change.md
index 1662269..b8e8b86 100644
--- a/Ngspice_Version_Change.md
+++ b/Ngspice_Version_Change.md
@@ -1,6 +1,6 @@
# Changes for Ngspice version upgrade
-1. Download the source code for the new Ngspice version and rename its top-level directory as `ngspice-nghdl`.
+1. Download the source code for the new Ngspice version and rename its top-level directory as `nghdl-simulator-source`.
2. Manually add the GHDL server close patch (Necessary C headers and `close_server` function at the appropriate location) in the `outitf.c` which comes with the new Ngspice version.
@@ -22,42 +22,43 @@
4. Replace the old `outitf.c` at `src` directory of `master` branch of `nghdl` repository with this newly patched version of `outitf.c` file.
-5. Similarly, manually add following patch for identification of Mingw and linking of `libws2_32.a` to `makedefs.in` at *`ngspice-nghdl/src/xspice/icm`* **after the line `LIBS = -lm`** (important)
+5. Similarly, manually add following patch for identification of Mingw and linking of `libws2_32.a` to `makedefs.in` at *`nghdl-simulator-source/src/xspice/icm`* **after the line `LIBS = -lm`** (important)
```make
ISMINGW = $(shell uname | grep -c "MINGW64")
ifeq ($(ISMINGW), 1)
- LIBS = -lm -lws2_32
+ LIBS = -lm -lws2_32 -lstdc++
endif
ISMINGW = $(shell uname | grep -c "MINGW32")
ifeq ($(ISMINGW), 1)
- LIBS = -lm -lws2_32
+ LIBS = -lm -lws2_32 -lstdc++
endif
ISMINGW = $(shell uname | grep -c "MSYS")
ifeq ($(ISMINGW), 1)
- LIBS = -lm -lws2_32
+ LIBS = -lm -lws2_32 -lstdc++
endif
```
-6. Add patch for linking `libws2_32.a` in Windows OS at `Makefile.in` at *`ngspice-nghdl/src/`* by modifying the line:
+6. Add patch for linking `libws2_32.a` in Windows OS at `Makefile.in` at *`nghdl-simulator-source/src/`* by modifying the line:
```make
- @WINGUI_TRUE@am__append_19 = -lpsapi -lShlwapi
+ @WINGUI_TRUE@am__append_18 = -lpsapi -lShlwapi
```
To
```make
- @WINGUI_TRUE@am__append_19 = -lpsapi -lShlwapi -lws2_32
+ @WINGUI_TRUE@am__append_18 = -lpsapi -lShlwapi -lws2_32
```
-7. Add GHDL codemodel to the spinit.in file at *`ngspice-nghdl/src/`* as an addition to the section:
+7. Add GHDL codemodel to the spinit.in file at *`nghdl-simulator-source/src/`* as an addition to the section:
```make
* The other codemodels
```
with the line:
```make
@XSPICEINIT@ codemodel @pkglibdir@/ghdl.cm
+ @XSPICEINIT@ codemodel @pkglibdir@/Ngveri.cm
```
- and in `GNUmakefile.in` at *`ngspice-nghdl/src/xspice/icm`* by replacing the line:
+ and in `GNUmakefile.in` at *`nghdl-simulator-source/src/xspice/icm`* by replacing the line:
```make
CMDIRS = spice2poly digital analog xtradev xtraevt table
```
@@ -66,9 +67,9 @@
CMDIRS = spice2poly digital analog xtradev xtraevt table ghdl Ngveri
```
-8. Create a **`ghdl`** and **`Ngveri`** directories at the location *`ngspice-nghdl/src/xspice/icm/`*, each with two empty files named `modpath.lst` and `udnpath.lst`
+8. Create **`ghdl`** and **`Ngveri`** directories at the location *`nghdl-simulator-source/src/xspice/icm/`*, each with two empty files named `modpath.lst` and `udnpath.lst`
- > Note: For Ubuntu OS, now compress this new version of Ngspice to `ngspice-nghdl.tar.xz` file and replace the existing older tar file at the `master` branch of this repository.
+ > Note: For Ubuntu OS, now compress this new version of Ngspice to `nghdl-simulator-source.tar.xz` file and replace the existing older tar file at the `master` branch of this repository.
## Following procedures are specific only to Windows OS:
@@ -79,16 +80,16 @@
$ mkdir release
$ mkdir install_dir
$ cd release
- $ ../configure --with-wingui --enable-xspice --disable-debug --prefix=<absolute_path>/ngspice-nghdl/install_dir --exec-prefix=<absolute_path>/ngspice-nghdl/install_dir
- $ make
+ $ ../configure --with-wingui --enable-xspice --disable-debug --prefix=<absolute_path>/nghdl-simulator-source/install_dir --exec-prefix=<absolute_path>/nghdl-simulator-source/install_dir
+ $ make -j4
$ make install
```
> Note: MSYS + MinGW environment must be setup before building Ngspice. Refer this [documentation](Windows/MinGW+MSYS.md) for the same.
-10. Move the generated ghdl code model from `ngspice-nghdl/release/src/xspice/icm/ghdl.cm` to the `ngspice-nghdl/lib/ngspice/` directory.
+10. Move the generated ``ghdl`` and ``Ngveri`` code models from `nghdl-simulator-source/release/src/xspice/icm/ghdl.cm` and `nghdl-simulator-source/release/src/xspice/icm/Ngveri.cm` respectively to the `nghdl-simulator-source/lib/ngspice/` directory.
-11. Download Ngspice which is readily available to be used directly on Windows OS. Now, intelligently merge this downloaded version with the built version (from step 10) except the `ngspice-nghdl/bin` directory.
+11. Download Ngspice which is readily available to be used directly on Windows OS. Now, intelligently merge this downloaded version with the built version (from step 10).
-12. Extract the `ngspice-nghdl.7z` from `Windows/sources/` directory of `installers` branch of this repository. Make the directory structure of the merged version (from step 11) similar to that of this extacted older version.
+12. Extract the `nghdl-simulator.7z` from `Windows/sources/` directory of `installers` branch of this repository. Make the directory structure of the merged version (from step 11) similar to that of this extacted older version.
-13. Now, compress this new structured version of Ngspice to a `.7z` format and replace the existing older `ngspice-nghdl.7z` at `Windows/sources/` directory of `installers` branch of this repository.
+13. Now, compress this new structured version of Ngspice to a `.7z` format and replace the existing older `nghdl-simulator.7z` at `Windows/sources/` directory of `installers` branch of this repository.
diff --git a/Ubuntu/README.md b/Ubuntu/README.md
index 4a959c0..b0c9521 100644
--- a/Ubuntu/README.md
+++ b/Ubuntu/README.md
@@ -9,17 +9,19 @@ It contains the documentation to package NGHDL for Ubuntu OS.
1. Take the `master` branch containing the source code. Rename the folder to `nghdl`.
-2. Add GHDL source code `ghdl-<version>.tar.xz` from the `installers` branch to the `nghdl` folder.
+2. Add GHDL source code `ghdl-<version>.tar.xz` from the `installers` branch in the `nghdl` folder.
-3. Add the installer script `install-nghdl.sh` from the `installers` branch to the `nghdl` folder.
+3. Add Verilator source code `verilator-<version>.tar.xz` from the `installers` branch in the `nghdl` folder.
-4. Add the NGHDL executable (if available) in `nghdl/src` folder. Also, remove following files from this folder:
+4. Add the installer script `install-nghdl.sh` from the `installers` branch in the `nghdl` folder.
+
+5. Add the NGHDL executable (if available) in `nghdl/src` folder. Also, remove following files from this folder:
- `.git` folder
- all python files (Applicable only if eSim executable is used)
- GHDLside.md
- Workflow.md
- .gitignore
-2. Compress it to `.zip` format.
+6. Compress it directly to the `.zip` format.
-3. Place this compressed file in `eSim-<version>` folder.
+7. Place this compressed file in `eSim-<version>` folder.
diff --git a/Ubuntu/install-nghdl.sh b/Ubuntu/install-nghdl.sh
index 2dbb4e3..ab7bcb4 100755
--- a/Ubuntu/install-nghdl.sh
+++ b/Ubuntu/install-nghdl.sh
@@ -1,13 +1,13 @@
#!/bin/bash
-#===============================================================================
+#==========================================================
# FILE: install-nghdl.sh
#
# USAGE: ./install-nghdl.sh --install
# OR
# ./install-nghdl.sh --uninstall
#
-# DESCRIPTION: Installation script for Ngspice and GHDL simulators (NGHDL)
-#
+# DESCRIPTION: Installation script for Ngspice, GHDL
+# and Verilator simulators (NGHDL)
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
@@ -15,11 +15,13 @@
# AUTHOR: Fahim Khan, Rahul Paknikar, Sumanto Kar
# ORGANIZATION: eSim, FOSSEE group at IIT Bombay
# CREATED: Tuesday 02 December 2014 17:01
-# REVISION: Tuesday 11 November 2021 15:56
-#===============================================================================
+# REVISION: Tuesday 02 February 2022 01:35
+#==========================================================
-ngspice="ngspice-nghdl"
+nghdl="nghdl-simulator"
ghdl="ghdl-0.37"
+verilator="verilator-4.210"
+llvm_version="9"
config_dir="$HOME/.nghdl"
config_file="config.ini"
src_dir=`pwd`
@@ -48,8 +50,8 @@ function installDependency
echo "Installing GNAT..........................................."
sudo apt install -y gnat
- echo "Installing LLVM-8........................................."
- sudo apt install -y llvm-8
+ echo "Installing LLVM-${llvm_version}........................................"
+ sudo apt install -y llvm-${llvm_version} llvm-${llvm_version}-dev
echo "Installing Clang.........................................."
sudo apt-get install -y clang
@@ -70,6 +72,23 @@ function installDependency
sudo apt install -y libxaw7-dev
+ echo "Installing $verilator dependencies........................"
+ if [[ -n "$(which apt-get 2> /dev/null)" ]]
+ then
+ # Ubuntu
+ sudo apt-get install make autoconf g++ flex bison
+ else [[ -n "$(which yum 2> /dev/null)" ]]
+ # Ubuntu
+ sudo yum install make autoconf flex bison which -y
+ sudo yum groupinstall 'Development Tools' -y
+ fi
+
+}
+
+
+function installGHDL
+{
+
echo "Installing $ghdl LLVM................................."
tar -xJf $ghdl.tar.xz
echo "$ghdl successfully extracted"
@@ -78,59 +97,87 @@ function installDependency
echo "Configuring $ghdl build as per requirements"
chmod +x configure
# Other configure flags can be found at - https://github.com/ghdl/ghdl/blob/master/configure
- sudo ./configure --with-llvm-config=/usr/bin/llvm-config-8
+ ./configure --with-llvm-config=/usr/bin/llvm-config-${llvm_version}
echo "Building the install file for $ghdl LLVM"
- sudo make
+ make
sudo make install
- set +e # Temporary disable exit on error
- trap "" ERR # Do not trap on error of any command
+ # set +e # Temporary disable exit on error
+ # trap "" ERR # Do not trap on error of any command
- echo "Removing unused part of $ghdl LLVM"
- sudo rm -rf ../$ghdl
+ # echo "Removing unused part of $ghdl LLVM"
+ # sudo rm -rf ../$ghdl
- set -e # Re-enable exit on error
- trap error_exit ERR
+ # set -e # Re-enable exit on error
+ # trap error_exit ERR
echo "GHDL installed successfully"
+ cd ../
+
+}
+
+
+function installVerilator
+{
+ echo "Installing $verilator......................."
+ tar -xJf $verilator.tar.xz
+ echo "$verilator successfully extracted"
+ echo "Changing directory to $verilator installation"
+ cd $verilator
+ echo "Configuring $verilator build as per requirements"
+ chmod +x configure
+ ./configure
+ make -j$(nproc)
+ sudo make install
+ echo "Removing the unessential verilator files........"
+ rm -r docs
+ rm -r examples
+ rm -r include
+ rm -r test_regress
+ rm -r bin
+ ls -1 | grep -E -v 'config.status|configure.ac|Makefile.in|verilator.1|configure|Makefile|src|verilator.pc' | xargs rm -f
+ #sudo rm -v -r'!("config.status"|"configure.ac"|"Makefile.in"|"verilator.1"|"configure"|"Makefile"|"src"|"verilator.pc")'
+
+ echo "Verilator installed successfully"
+ cd ../
+
}
-function installNgspice
+function installNGHDL
{
- echo "Installing Ngspice........................................"
+ echo "Installing NGHDL........................................"
- # Extracting Ngspice to Home Directory
+ # Extracting NGHDL to Home Directory
cd $src_dir
- tar -xJf $ngspice.tar.xz -C $HOME
-
- echo "Ngspice extracted sucessfully to $HOME"
- # Change to ngspice-nghdl directory
- cd $HOME/$ngspice
+ tar -xJf $nghdl-source.tar.xz -C $HOME
+ mv $HOME/$nghdl-source $HOME/$nghdl
+
+ echo "NGHDL extracted sucessfully to $HOME"
+ # Change to nghdl directory
+ cd $HOME/$nghdl
# Make local install directory
mkdir -p install_dir
# Make release directory for build
mkdir -p release
# Change to release directory
cd release
- echo "Configuring Ngspice........."
+ echo "Configuring NGHDL..........."
sleep 2
chmod +x ../configure
- ../configure --enable-xspice --disable-debug --prefix=$HOME/$ngspice/install_dir/ --exec-prefix=$HOME/$ngspice/install_dir/
+ ../configure --enable-xspice --disable-debug --prefix=$HOME/$nghdl/install_dir/ --exec-prefix=$HOME/$nghdl/install_dir/
# Adding patch to Ngspice base code
- cp $src_dir/src/outitf.c $HOME/$ngspice/src/frontend
- cp $src_dir/src/verilated.o $HOME/$ngspice/release/src/xspice/icm/
+ # cp $src_dir/src/outitf.c $HOME/$nghdl/src/frontend
make -j$(nproc)
make install
# Make it executable
- sudo chmod 755 $HOME/$ngspice/install_dir/bin/ngspice
- sudo chmod 777 -R $HOME/$ngspice/
+ sudo chmod 755 $HOME/$nghdl/install_dir/bin/ngspice
set +e # Temporary disable exit on error
trap "" ERR # Do not trap on error of any command
@@ -138,7 +185,7 @@ function installNgspice
echo "Removing previously installed Ngspice (if any)"
sudo apt-get purge -y ngspice
- echo "Ngspice installed sucessfully"
+ echo "NGHDL installed sucessfully"
echo "Adding softlink for the installed Ngspice"
# Add symlink to the path
@@ -147,15 +194,15 @@ function installNgspice
set -e # Re-enable exit on error
trap error_exit ERR
- sudo ln -sf $HOME/$ngspice/install_dir/bin/ngspice /usr/bin/ngspice
- echo "Added softlink for Ngspice..."
+ sudo ln -sf $HOME/$nghdl/install_dir/bin/ngspice /usr/bin/ngspice
+ echo "Added softlink for Ngspice....."
}
function createConfigFile
{
-
+
# Creating config.ini file and adding configuration information
# Check if config file is present
if [ -d $config_dir ];then
@@ -188,7 +235,7 @@ function createSoftLink
fi
sudo ln -sf $src_dir/src/ngspice_ghdl.py nghdl
- echo "Added softlink for NGHDL..."
+ echo "Added softlink for NGHDL....."
cd $pwd
@@ -224,18 +271,32 @@ if [ $option == "--install" ];then
echo -e "\n\n\nERROR: Unable to install required packages. Please check your internet connection.\n\n"
exit 0
fi
- installNgspice
+ installGHDL
+ installVerilator
+ installNGHDL
createConfigFile
createSoftLink
elif [ $option == "--uninstall" ];then
- sudo rm -rf $HOME/ngspice-nghdl $HOME/.nghdl /usr/share/kicad/library/eSim_Nghdl.lib /usr/local/bin/nghdl /usr/bin/ngspice
+ sudo rm -rf $HOME/$nghdl $HOME/.nghdl /usr/share/kicad/library/eSim_Nghdl.lib /usr/local/bin/nghdl /usr/bin/ngspice
+
+ echo "Removing GHDL......................"
+ cd $ghdl/
+ sudo make uninstall
+ cd ../
+ sudo rm -rf $ghdl/
+ # sudo rm -rf /usr/local/bin/ghdl /usr/local/bin/ghdl1-llvm /usr/local/lib/ghdl /usr/local/lib/libghdlvpi.so /usr/local/include/vpi_user.h
+
+ echo "Removing Verilator................."
+ cd $verilator/
+ sudo make uninstall
+ cd ../
+ sudo rm -rf $verilator/
+
echo "Removing libxaw7-dev..............."
sudo apt purge -y libxaw7-dev
- echo "Removing GHDL......................"
- sudo rm -rf /usr/local/bin/ghdl /usr/local/bin/ghdl1-llvm /usr/local/lib/ghdl /usr/local/lib/libghdlvpi.so /usr/local/include/vpi_user.h
echo "Removing LLVM......................"
- sudo apt-get purge -y llvm-8
+ sudo apt-get purge -y llvm-${llvm_version} llvm-${llvm_version}-dev
echo "Removing GNAT......................"
sudo apt purge -y gnat
else
diff --git a/Ubuntu/verilator-4.210.tar.xz b/Ubuntu/verilator-4.210.tar.xz
new file mode 100644
index 0000000..4d3d4c1
--- /dev/null
+++ b/Ubuntu/verilator-4.210.tar.xz
Binary files differ
diff --git a/Windows/MinGW+MSYS.md b/Windows/MinGW+MSYS.md
index d2f682a..1cc0def 100644
--- a/Windows/MinGW+MSYS.md
+++ b/Windows/MinGW+MSYS.md
@@ -3,25 +3,36 @@
> MinGW provides the GCC compiler required to build the Ngspice executable.
-[Download MinGW (unmodified)](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z)\
-[Download MSYS (unmodified)](https://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/MSYS-20111123.zip/download)
+> [Download MSYS2 (unmodified)](https://www.msys2.org/). Following packages are found to be required for building Ngspice and Verilator:
+
+ - $ pacman -S --needed base-devel mingw-w64-x86_64-toolchain
+
+ When prompted for the options, Select the one corresponding to ``mingw-w64-x86_64-gcc``
+
+ - $ pacman -S --needed mingw-w64-x86_64-python mingw-w64-x86_64-make
+ - $ pacman -S --needed mingw-w64-x86_64-dlfcn autoconf2.71
+
**Reduced versions of MinGW and MSYS for NGHDL can be found in this repository under `sources/` folder.**
## Usage of MinGW + MSYS
-1. Add `/mingw64/bin/` and `/mingw64/msys/bin` to the path so that all the utilities are able to find each other.
+1. Add `/MSYS/usr/bin/` and `/MSYS/mingw64/bin` to the path so that all the utilities are able to find each other.
2. Open Windows command prompt at the location you want to use `MinGW + MSYS`.
3. Execute the command to launch `bash` provided by MSYS at this location.
```sh
- > pathtoMSYS/bin/bash.exe
+ > pathtoMSYS/usr/bin/bash.exe
```
- 4. This comand launches bash in the CMD window which can then be used as `BASH shell`, with commands similar to Linux.
-
-
+4. This comand launches bash in the CMD window which can then be used as `BASH shell`, with commands similar to Linux.
+5. Note that this reduced version is not sufficient for building Ngspice and Verilator from their source codes.
+
+
## Reduction of MinGW + MSYS
> Originally MinGW and MSYS are provided for a large variety of development scenarios which are not required by NGHDL, causing size overheads in the final distribution.
1. To remove unrequired parts of MSYS and MinGW, a trial and error based approach is to be followed.
-2. To start, both utilities should be reduced to the bare minimum required components which can be noted by studying the Ngspice configure file `(/ngspice/configure)`.
-The rest of the utilities are to added by accessing the errors in the logs provided during the configure-make-make install process.
+2. To start with, the packages listed above can work as the base for the reduction.
+
+3. Both utilities should be reduced to the bare minimum required components which can be noted by studying the Ngspice configure file `(/ngspice/configure)`.
+
+4. The rest of the utilities are to added by accessing the errors in the logs provided during the ``configure``-``make``-``make install`` process. Similar can be done for Verilator as well.
diff --git a/Windows/README.md b/Windows/README.md
index e39270e..dd84f6d 100644
--- a/Windows/README.md
+++ b/Windows/README.md
@@ -66,7 +66,7 @@ It contains all the documentation for making NGHDL executable (using PyInstaller
- .gitignore
- GHDLside.md
- Workflow.md
- - ngspice-nghdl.tar.xz (Move it outside the folder as it is required later on)
+ - nghdl-simulator-source.tar.xz (Move it outside the folder as it is required later on)
3. Place this **nghdl** folder containing `src` folder, `Example` folder, `LICENSE` file and `README.md` under folder named `eSim`.
@@ -76,14 +76,15 @@ It contains all the documentation for making NGHDL executable (using PyInstaller
- eSim/nghdl/LICENSE
- eSim/nghdl/README.md
-5. Compress the `eSim` folder from step 4 in 7z format (Make sure that there is folder named `eSim` inside this compressed file) and name it as `nghdl-src.7z`.
+5. Compress the `eSim` folder from step 4 in 7z format (Make sure that there is folder named `eSim` inside this compressed file) and name it as `nghdl.7z`.
(7z compression tool can be downloaded from - https://www.7-zip.org/download.html)
-6. Along with `nghdl-src.7z` from step 5, place the following 7z files at the installer folder for eSim:
+6. Along with `nghdl.7z` from step 5, place the following 7z files at the installer folder for eSim:
- ghdl.7z
+ - verilator.7z
- MSYS.7z
- mingw64.7z
- - ngspice-nghdl.7z
+ - nghdl-simulator.7z
> Note: These compressed files can be obtained under *Windows/sources/* folder of NGHDL's `installers` branch
diff --git a/Windows/nghdl-setup-script.nsi b/Windows/nghdl-setup-script.nsi
index a9807af..d5c56b1 100644
--- a/Windows/nghdl-setup-script.nsi
+++ b/Windows/nghdl-setup-script.nsi
@@ -77,71 +77,90 @@ Section "nghdl-loadsource"
SetOutPath $EXEDIR
File "ghdl.7z"
+ File "verilator.7z"
File "mingw64.7z"
File "MSYS.7z"
- File "nghdl-src.7z"
- File "ngspice-nghdl.7z"
+ File "nghdl.7z"
+ File "nghdl-simulator.7z"
SectionEnd
-Section "nghdl-src"
+Section "nghdl"
SetOutPath $INSTDIR
- Nsis7z::ExtractWithDetails "$EXEDIR\nghdl-src.7z" "Extracting NGHDL %s..."
+ Nsis7z::ExtractWithDetails "$EXEDIR\nghdl.7z" "Extracting NGHDL %s..."
EnVar::SetHKLM
DetailPrint "EnVar::SetHKLM"
EnVar::AddValue "Path" "$INSTDIR\eSim\nghdl\src"
Pop $0
DetailPrint "EnVar::AddValue returned=|$0|"
- Delete "$EXEDIR\nghdl-src.7z"
+ Delete "$EXEDIR\nghdl.7z"
SectionEnd
-Section "nghdl-mingw"
+Section "msys2"
SetOutPath $INSTDIR
- Nsis7z::ExtractWithDetails "$EXEDIR\mingw64.7z" "Extracting MinGW %s..."
+ Nsis7z::ExtractWithDetails "$EXEDIR\MSYS.7z" "Extracting MSYS2 %s..."
EnVar::SetHKLM
- EnVar::AddValue "Path" "$INSTDIR\mingw64\bin"
+ EnVar::AddValue "Path" "$INSTDIR\MSYS\usr\bin"
Pop $0
DetailPrint "EnVar::AddValue returned=|$0|"
- Delete "$EXEDIR\mingw64.7z"
+ Delete "$EXEDIR\MSYS.7z"
SectionEnd
-Section "nghdl-msys"
- SetOutPath $INSTDIR\mingw64
- Nsis7z::ExtractWithDetails "$EXEDIR\MSYS.7z" "Extracting MSYS %s..."
+Section "mingw64"
+ SetOutPath $INSTDIR\MSYS
+ Nsis7z::ExtractWithDetails "$EXEDIR\mingw64.7z" "Extracting MinGW %s..."
EnVar::SetHKLM
- EnVar::AddValue "Path" "$INSTDIR\mingw64\msys\bin"
+ EnVar::AddValue "Path" "$INSTDIR\MSYS\mingw64\bin"
Pop $0
DetailPrint "EnVar::AddValue returned=|$0|"
- Delete "$EXEDIR\MSYS.7z"
+ Delete "$EXEDIR\mingw64.7z"
SectionEnd
-Section "nghdl-GHDL"
- SetOutPath $INSTDIR\mingw64
+Section "ghdl"
+ SetOutPath $INSTDIR
Nsis7z::ExtractWithDetails "$EXEDIR\ghdl.7z" "Extracting GHDL %s..."
- EnVar::SetHKLM
- EnVar::AddValue "Path" "$INSTDIR\mingw64\GHDL\bin"
- Pop $0
- DetailPrint "EnVar::AddValue returned=|$0|"
+ ;EnVar::SetHKLM
+ ;EnVar::AddValue "Path" "$INSTDIR\mingw64\GHDL\bin"
+ ;Pop $0
+ ;DetailPrint "EnVar::AddValue returned=|$0|"
+ CopyFiles "$INSTDIR\GHDL\bin\*" "$INSTDIR\MSYS\mingw64\bin\"
+ CopyFiles "$INSTDIR\GHDL\include\*" "$INSTDIR\MSYS\mingw64\include\"
+ CopyFiles "$INSTDIR\GHDL\lib\*" "$INSTDIR\MSYS\mingw64\lib\"
+ RMDir /r "$INSTDIR\GHDL"
Delete "$EXEDIR\ghdl.7z"
SectionEnd
+Section "verilator"
+ SetOutPath $INSTDIR
+ Nsis7z::ExtractWithDetails "$EXEDIR\verilator.7z" "Extracting Verilator %s..."
+ CopyFiles "$INSTDIR\verilator\bin\*" "$INSTDIR\MSYS\mingw64\bin\"
+ CopyFiles "$INSTDIR\verilator\share\verilator\bin\*" "$INSTDIR\MSYS\mingw64\bin\"
+ CopyFiles "$INSTDIR\verilator\share\verilator\include\*" "$INSTDIR\MSYS\mingw64\include\"
+ CopyFiles "$INSTDIR\verilator\share\verilator\examples\*" "$INSTDIR\MSYS\mingw64\examples\"
+ CopyFiles "$INSTDIR\verilator\share\verilator\verilator-config.cmake" "$INSTDIR\MSYS\mingw64\"
+ CopyFiles "$INSTDIR\verilator\share\verilator\verilator-config-version.cmake" "$INSTDIR\MSYS\mingw64\"
+ CopyFiles "$INSTDIR\verilator\share\pkgconfig" "$INSTDIR\MSYS\mingw64\"
+ RMDir /r "$INSTDIR\verilator"
+ Delete "$EXEDIR\verilator.7z"
+SectionEnd
+
Section "envar-refresh"
ReadEnvStr $R0 "PATH"
- StrCpy $R0 "$R0;$INSTDIR\eSim\nghdl\src;$INSTDIR\mingw64\bin;$INSTDIR\mingw64\msys\bin;$INSTDIR\mingw64\GHDL\bin;"
+ StrCpy $R0 "$R0;$INSTDIR\eSim\nghdl\src;$INSTDIR\MSYS\mingw64\bin;$INSTDIR\MSYS\usr\bin;"
System::Call 'Kernel32::SetEnvironmentVariable(t, t) i("PATH", R0).r0'
SectionEnd
-Section "nghdl-installNgspice"
+Section "install-nghdl-simulator"
SetOutPath $INSTDIR
- Nsis7z::ExtractWithDetails "$EXEDIR\ngspice-nghdl.7z" "Extracting Ngspice %s..."
+ Nsis7z::ExtractWithDetails "$EXEDIR\nghdl-simulator.7z" "Extracting NGHDL Simulator %s..."
- ;CopyFiles $INSTDIR\eSim\nghdl\src\outitf.c $INSTDIR\ngspice-nghdl\src\frontend
+ ;CopyFiles $INSTDIR\eSim\nghdl\src\outitf.c $INSTDIR\nghdl-simulator\src\frontend
- CopyFiles $INSTDIR\mingw64\x86_64-w64-mingw32\lib\libws2_32.a $INSTDIR\eSim\nghdl\src\ghdlserver
+ CopyFiles "$INSTDIR\MSYS\mingw64\x86_64-w64-mingw32\lib\libws2_32.a" "$INSTDIR\eSim\nghdl\src\ghdlserver"
- SetOutPath $INSTDIR\ngspice-nghdl
- CreateDirectory $INSTDIR\ngspice-nghdl\release
- SetOutPath $INSTDIR\ngspice-nghdl\release
+ SetOutPath $INSTDIR\nghdl-simulator
+ CreateDirectory $INSTDIR\nghdl-simulator\release
+ SetOutPath $INSTDIR\nghdl-simulator\release
Var /GLOBAL shellpath
Var /GLOBAL shellpath1
@@ -153,20 +172,20 @@ Section "nghdl-installNgspice"
${StrRep} '$shellpath1' '$shellpath' '\' '/'
- ;FileOpen $0 "$INSTDIR\ngspice-nghdl\release\installngspice.sh" w
- ;FileWrite $0 `../configure --with-wingui --enable-xspice --disable-debug --prefix=$shellpath1/ngspice-nghdl/install_dir --exec-prefix=$shellpath1/ngspice-nghdl/install_dir &&$\n`
+ ;FileOpen $0 "$INSTDIR\nghdl-simulator\release\installngspice.sh" w
+ ;FileWrite $0 `../configure --with-wingui --enable-xspice --disable-debug --prefix=$shellpath1/nghdl-simulator/install_dir --exec-prefix=$shellpath1/nghdl-simulator/install_dir &&$\n`
;FileWrite $0 `make -j$cpucores &&$\n`
;FileWrite $0 `make install$\n`
;FileClose $0
;nsExec::ExecToLog "$INSTDIR\mingw64\msys\bin\bash.exe installngspice.sh"
- ;Delete $INSTDIR\ngspice-nghdl\release\installngspice.sh
- Delete "$EXEDIR\ngspice-nghdl.7z"
+ ;Delete $INSTDIR\nghdl-simulator\release\installngspice.sh
+ Delete "$EXEDIR\nghdl-simulator.7z"
SetOutPath $INSTDIR
EnVar::SetHKLM
- EnVar::AddValue "Path" "$INSTDIR\ngspice-nghdl\bin"
+ EnVar::AddValue "Path" "$INSTDIR\nghdl-simulator\bin"
Pop $0
DetailPrint "EnVar::AddValue returned=|$0|"
diff --git a/Windows/sources/MSYS.7z b/Windows/sources/MSYS.7z
index c113d5f..cdbe940 100644
--- a/Windows/sources/MSYS.7z
+++ b/Windows/sources/MSYS.7z
Binary files differ
diff --git a/Windows/sources/mingw64.7z b/Windows/sources/mingw64.7z
index 855f693..0ffca41 100644
--- a/Windows/sources/mingw64.7z
+++ b/Windows/sources/mingw64.7z
Binary files differ
diff --git a/Windows/sources/nghdl-simulator.7z b/Windows/sources/nghdl-simulator.7z
new file mode 100644
index 0000000..c4c6e6e
--- /dev/null
+++ b/Windows/sources/nghdl-simulator.7z
Binary files differ
diff --git a/Windows/sources/ngspice-nghdl.7z b/Windows/sources/ngspice-nghdl.7z
deleted file mode 100644
index b396af1..0000000
--- a/Windows/sources/ngspice-nghdl.7z
+++ /dev/null
Binary files differ
diff --git a/Windows/sources/verilator.7z b/Windows/sources/verilator.7z
new file mode 100644
index 0000000..bd9f5c5
--- /dev/null
+++ b/Windows/sources/verilator.7z
Binary files differ