diff options
-rw-r--r-- | Ngspice_Version_Change.md | 22 | ||||
-rwxr-xr-x | Ubuntu/install-nghdl.sh | 43 | ||||
-rw-r--r-- | Windows/README.md | 8 |
3 files changed, 36 insertions, 37 deletions
diff --git a/Ngspice_Version_Change.md b/Ngspice_Version_Change.md index 1662269..ad29b63 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,7 +22,7 @@ 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) @@ -40,7 +40,7 @@ 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 ``` @@ -49,7 +49,7 @@ @WINGUI_TRUE@am__append_19 = -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 ``` @@ -57,7 +57,7 @@ ```make @XSPICEINIT@ codemodel @pkglibdir@/ghdl.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 ``` @@ -68,7 +68,7 @@ 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` - > 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 +79,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. -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/install-nghdl.sh b/Ubuntu/install-nghdl.sh index f9a8968..ab7bcb4 100755 --- a/Ubuntu/install-nghdl.sh +++ b/Ubuntu/install-nghdl.sh @@ -18,7 +18,7 @@ # REVISION: Tuesday 02 February 2022 01:35 #========================================================== -ngspice="ngspice-nghdl" +nghdl="nghdl-simulator" ghdl="ghdl-0.37" verilator="verilator-4.210" llvm_version="9" @@ -145,40 +145,39 @@ function installVerilator } -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 @@ -186,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 @@ -195,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 @@ -236,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 @@ -274,12 +273,12 @@ if [ $option == "--install" ];then fi installGHDL installVerilator - installNgspice + 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/ diff --git a/Windows/README.md b/Windows/README.md index e39270e..3743d37 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,14 @@ 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
- 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
|