NeuroSim Part 1

Getting started



About This Project

NeuroSim+ is an integrated simulation framework for benchmarking synaptic devices and array architectures in terms of the system-level learning accuracy and hardware performance metrics[1]. Firstly introduced by Prof. Yumeng Shi at GaTech, it has now iterated to its third version MLP_NeuroSim_V3.0. More information could be referred from the links below.

Running the Instance

As stated in its User Mannual

The tool is expected to run in Linux with required system dependencies installed. These include GCC, GNU make, GNU C libraries (glibc). We have tested the compatibility of the tool with a few different Linux environments, such as (1) Red Hat 5.11 (Tikanga), gcc v4.7.2, glibc 2.5, (2) Red Hat 7.3 (Maipo), gcc v4.8.5, glibc v2.1.7, (3) Ubuntu 16.04, gcc v5.4.0, glibc v2.23, and they are all workable.

Thus, a brand new virtual Ubuntu 16.04 running in VMWare Workstation 15.0 is established to help this model running.

However, during last trial, my 16GB memory for that virtual machine was used up and caused a major breakdown. Then I found that I was unable to access the Ubuntu with graphic but only command lines. I assume it was because I shut down the virtual machine compulsively without following the VMWare protocol and caused some protection mechanism. **So, it is highly unrecommend to run this model with small memory and highly unrecommend to shut down the virtual machines causally.**

Anyway, I found Ubuntu 16.04 is unbearably old and extremely unfriendly. So I set up a brand new Ubuntu 20.04 LTS to run this instance. Noting that you should make sure the internet connection between the system and VMWare is all right since the installation process needs internet to install VM-Tool which enables the copy-paste between your Windows and Ubuntu as well as the full-screen feature. To ensure this connectivity, be aware that the ‘network connection’ should be set as ‘Customized’ and set it to ‘VMnet8(NAT Mode)’ as shown below.

image-20210406135454097

Then press Ctrl+Alt+T to open the Terminal to do the common procedure for a brand new Ubuntu system

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install build-essential

Afterwards, install git, gcc, and g++ with

sudo apt-get install git

sudo apt-get install gcc

sudo apt-get install g++

Then follow the steps shown on MLP_NeuroSim_V3.0

git clone https://github.com/neurosim/MLP_NeuroSim_V3.0.git

Open that folder and extract the file MNIST_data.zip to it’s current directory

cd MLP_NeuroSim_V3.0/

unzip MNIST_data.zip

Make the files

make

Following the instructions in the user guide provided in User Manual, the terminal should output the information below.

image-20210406141006465

According to the User Manual, there are several params that could be adjusted. They are listed below. Please refer to Section 5.3 in User Manual to get further information about the param and its usage. Here is just a simple list of them.

Param Value(s) File
Device Type RealDevice
IdealDevice
MeasuredDevice
DIgitalNVM
SRAM
main.cpp
Nonlinear Weight Update NL_LTP
NL_LTD
cell.cpp
Limited Precision maxNumLevelLTP
minNumLevelLTP
cell.cpp
Device-to-device weight update variation sigmaDtoD cell.cpp
Cycle-to-cycle weight update variation sigmaCtoC cell.cpp
Dynamic range maxConductance
minConductance
cell.cpp
Conductance variation maxConductance
minConductance
cell.cpp
Read noise sigmaReadNoise cell.cpp
Others cmosAccess
resistanceAccess
FeFET
gateCapFeFET
NL
nonIdenticalPulse
VinitLTP
VstepLTP
VinitLTD
VstepLTD
PWinitLTP
PWstepLTP
PWinitLTD
PWstepLTD
cell.cpp

To give it a try, we just use the default values and default device (RealDevice).

make run

and see the outputs.

image-20210406155816790

Can see the accuracy from the last (125) epoch is 69.95%.

Also, the output log is stored in the MLP-NeuroSim_V3.0 Directory as a txt file for the reference.

___________________________________________________________________

This article might be updated in the future, please refer to the original site: https://shieldjy.github.io/post/NeuroSim-P1.html , to avoid misleading by false or out-dated information, and to have a better reading experience.

If you would like to follow my latest blog, please click RSS Subscribe

___________________________________________________________________

知识共享许可协议 This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

It is widely welcomed to copy and redistribute the material in any medium or format as well as remix, transform, and build upon the material, but make sure you have referred Jiayi (And include the url: https://shieldjy.github.io ).

However, You may not use the material for commercial purposes. If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.

If there is any problem, please contact me for further information. (lijiayi19971127@hotmail.com)