write_lef_abstract [-help]  [-cutObsMinSpacing] [-extractBlockObs] [-extractBlockPGPinLayers ] [-noCutObs] [-obsSpacing ] [-specifyTopLayer ] [-stripePin [-PGPinLayers ]] [-extractWellLayerObs [-extractWellObsByRow ]] [ -5.6 | -5.7 | -5.8 ]

'Research > RRAM' 카테고리의 다른 글

Innovus Tools dc_shell reference site  (0) 2019.05.14
[Innovus] dbGet commands  (0) 2018.12.16

http://www.vlsiip.com/dc_shell/

'Research > RRAM' 카테고리의 다른 글

[Tool] Innovus lef file extract  (0) 2019.05.22
[Innovus] dbGet commands  (0) 2018.12.16


Get a list of unplaced cells: (Laurent Lefebure)
    dbGet [dbGet -p top.insts.pStatus unplaced].name

See what metal layers your block's IO pins are on: (Bob Dwyer)
    dbGet top.terms.pins.allShapes.layer.name

Get a list of NONDEFAULT rules in the design: (Gary Nunn)
    dbGet head.rules.name

Get the placement status of an instance: (Ali Aslani)
    dbGet [dbGetInstByName instName].pStatus

Get the points of a rectangular routing blockage: (Bob Dwyer)
    dbGet top.fplan.rBlkgs.shapes.rect

Get the points of a rectilinear routing blockage: (Jon Cooper)
    dbGet top.fplan.rBlkgs.shapes.poly

Get a list of all cell types used in the design: (Gary Nunn)
    dbGet -u top.insts.cell.name
    (The "-u" filters out duplicate objects.)

Get the size of block placement halos: (Kari Summers / Bob Dwyer)
    dbGet [dbGet -p2 top.insts.cell.subClass block*].pHaloTop
    dbGet [dbGet -p2 top.insts.cell.subClass block*].pHaloBot
    dbGet [dbGet -p2 top.insts.cell.subClass block*].pHaloLeft
    dbGet [dbGet -p2 top.insts.cell.subClass block*].pHaloRight

Get the size and top/bottom layers of block routing halos: (Bob Dwyer)
    dbGet [dbGet -p2 top.insts.cell.subClass block*].rHaloSideSize
    dbGet [dbGet -p2 top.insts.cell.subClass block*].rHaloBotLayer.name
    dbGet [dbGet -p2 top.insts.cell.subClass block*].rHaloTopLayer.name

Make sure all your tiehi/lo connections have tie cells (and are not connected to a rail instead): (Gary Nunn)
    dbGet top.insts.instTerms.isTieHi 1
    dbGet top.insts.instTerms.isTieLo 1
    (Should return "0x0" if all connections have tie cells.
     If "1"s are returned, use the following to find the terms that still need a tie cell:)
    dbGet [dbGet -p top.insts.instTerms.isTieHi 1].name
    dbGet [dbGet -p top.insts.instTerms.isTieLo 1].name

Change the routing status of a net (for example, from FIXED to ROUTED): (Gary Nunn)
    dbSet [dbGet -p top.nets.name netName].wires.status routed

Get the status of your design: (Siva Kumar)
    dbGet top.statusIoPlaced
    dbGet top.statusPlaced
    dbGet top.statusClockSynthesized
    dbGet top.statusRouted
    dbGet top.statusRCExtracted
    dbGet top.statusPowerAnalyzed

List all the FIXED instances in your design: (Bob Dwyer)
    dbGet [dbGet -p top.insts.pStatus fixed].name

Find out which layers are used in a net: (Bob Dwyer)
    dbGet [dbGet -p top.nets.name netName].wires.layer.name

Find all the instances of a certain cell type: (Laurent Lefebure)
    dbGet [dbGet -p2 top.insts.cell.name cellName].name

Get the size of a cell in the library, but not necessarily in the current design: (Rob Lipsey)
    dbGet [dbGetCellByName cellName].size

I'm sure there are many more useful dbGet/dbSet one-liners out there; let's hear yours! Please post in the comments some of the dbGet lines that you have come up with.

Related Resources:

'Research > RRAM' 카테고리의 다른 글

[Tool] Innovus lef file extract  (0) 2019.05.22
Innovus Tools dc_shell reference site  (0) 2019.05.14

Biophysical Neural Network Simulator


<Only Inference>


1. Simulation Run

>> ./home/dkim785/Tools/CUDA/INF_Neuron_Simulatior_HPC/Debug/Run the INF_Neuron_Simulator_HPC


2. Type '8'


3. Run the Matlab Code (/home/dkim785/Tools/CUDA/INF_Neuron_Simulator_HPC/Debug/mass_process_read_potential_2.m


4. Symulation Run and Type '7'


5. You can see the result.


<How to change the parameters?>


1. For the first try, I changed the 'Debug/device2_output_network.txt'.


2. Just copied it, and open.


3. Inside this file, you can see the parameters, and weights.


4. Order is (This neuron's number // 2 // LIF_b // LIF_th // LIF_reset // 20.000000 // LIF_c // LIF_a // -65.060000 // 0.000 // 0.000 ; From, Weight, From, Weight ...)


5. Change the parameters.


6. If it is not work, we should change the weights. (You should learning)


<Learning>


1. Run the INF_Neruon_Simulator_HPC


2. Type '4'


Yun's Matlab Simulator


< Yun's Code>


1. Check the parameters by run model_compare_tuned.m


2. Inside the model_compare_tuned.m code, there is

# STDP, wikipedia

#research #SNN #STDP


Spiking-timing-dependent plasticity(STDP) is biological process that adjusts the strength of connections between neurons in the brain. This process adjusts the connection strengths based on the relative timing of a particular neuron’s output and input spikes. If the input spike from Neuron A occur immediately before that neuron B’s output spike, then that particular input is made somewhat stronger the synapse between Neuron A and Neuron B. If the input spike occur after an output spike, then that particular input is made somewhat weaker. (Wikipedia)


With STDP, repeated presynaptic spike arrival a few milliseconds before postsynaptic spike leads in many synapse types to Long-Term Potentiation (LTP) of the synapses, whereas repeated spike arrival after postsynaptic spikes leads to Long-Term Depression (LTD) of the same synapse. The change of the synapse plotted as a function of the relative timing of pre- and postsynaptic action potentials is called the STDP function or learning window and varies between synapse types.

[image:6F56A2F7-212C-46AE-8AB7-4BB944050328-13930-000260942B8E46BB/STDP_learning_window.JPEG]

Figure 1: Spike-Timing Dependent Plasticity (schematic): The STDP function shows the change of synaptic connections as a function of the relative timing of pre- and postsynaptic spikes after 60 spike parings. Schematically redrawn after Bi and Poo (1998)


When weight increases, the amount of increase is related to the current weight.


<Experimental STDP Protocol>

The paring is repeated for 50-100 times at a fixed frequency (for example 10 Hz). (이것은 Neuron의 firing frequency가 0.5~1kHz쯤 된다는 것인가?) The weight of the synapse is measured as the amplitude (or initial slope) of the postsynaptic potential. 


<Basic STDP Model>

The weight change delta w_j of a synapse from a presynaptic neuron j depends on the relative timing between presynaptic spike arrivals and postsynaptic spikes. Let us name the presynaptic spike arrival times at synapse j by t_j^f where 1, 2, 3, … counts the presynaptic spikes. Similarly, t_i^n with n = 1, 2, 3, … labels the firing times of the postsynaptic neuron. The total weight change delta w_j induced by a stimulation protocol with pairs of pre-and postsynaptic spikes is then (Gerstner and al. 1996, Kempter et al. 1999)

[image:66CCECA4-C660-475A-A1D1-D9C463F5F5AB-13930-000261A3D76D62FE/FC770EDA-98FA-4DD0-B957-A02CFA95AFBC.png]


의문점) 그럼 만약에 postsynaptic spiking 전에 presynaptic spiking이 2번 있었으면 나중의 것으로 생각해서 계산하는 것인가? -> 다양한 버전이 존재한다. 전체를 모두 고려하는 all-to-all 혹은 제일 가까운 애만 고려하는 nearest 같은 것도 존재하고.


where W(x) denotes one of the STDP functions (also called learning window)

A popular choice for the STDP function W(x)

[image:8B313596-6CAB-463B-90BC-635900C43535-13930-000261BA7801BC5F/419F7E0C-D679-4451-9EE3-3D1EAC4D5D64.png]

Which has been used in fits to experimental data (Zhang et al. 1998) and models (e.g, Song et al. .2000). The parameters A_+ and A_- may depend on the current value of the synaptic weight w_j. The time constants are on the order of taw_+ = 10ms and tow_- = 10ms

Xueyuan에게 어떻게 SNN learning을 하는지 물어보고 받은 paper이다. Xueyuan의 paper와 함께 읽으면 될 듯 하다.


간단하게 synaptic plasticity learning에 대해서 말해보면, 사용한 synapse는 더 강화하고, 사용하지 않는 synapse는 약화시키는 것이다. (weight를 통해서) 이것을 time에만 연관시켜서 한 것을Simplified STDP Learning이라고 하는 듯 하다. 여기서는 Memristor의 conductance를 이용하여 구현하였다.

STDP를 어떻게 했는지 보면, 만약 어떤 Neuron에서 spike가 발생한다면, 그 neuron의 dendrite에 spike를 준 synapse들 중 spike를 준 synapse의 weight를 증가시키는 것이다. (일정 기간 내에 spike를 줬어야 한다) weight는conductance를 올리거나 내려버리는 것으로 조절한다. 체크는 여기서는 연속적인 Negative + Positive Pulse를 사용한다. Fig. 2.를 참조하면 됨.

Causality에 대해서도 알아야 하함. 그것은 위에서 보이듯이, Neuron A가 Neuron B에 spike를 준다고 하면, Neuron B가 spike 할 때, Neuron A가 영향을 줬는지가 causality이다. (Cause라는 단어에서 나옴)


Refer the next post '[SNN] How to learning and inference?'

'Research > Spiking Neural Network' 카테고리의 다른 글

[Manual] Yun&Xueyuan's Simulator  (0) 2018.12.02
STDP - Wikipedia  (0) 2018.10.25
[Paper Review] TrueNorth, 2015 - TCAD  (0) 2018.09.26

일단 현재 필요한것만 보기 위해서 앞에서 7페이지만 읽어봄.


Fig. 2.에서 보면, 어떻게 뉴런이 동작하는지에 대해서 나와있다.

1. 이전 Neuron에서 들어온 Spike들을 버퍼에 저장.
2. 1kHz의 Signal(Tick)이 오면 axon으로 spike를 넘긴다.
3. Dendrite와 연결된 axon들이 해당 neuron으로 spike를 넣어준다.
4. Spike를 받은 Neuron은 Membrane Potential을 update한다.
5. Membrane potential을 update한 뒤, leak value를 값에서 뺴준다.
6. Updated된 membrane potential이 threshold voltage를 넘기면 Spike를 생성하여 output으로 넘긴다.

jth neuron의 membrane potential의 계산 방법은,
이전 membrane potential + [i = 0~255까지,] (Spike 가 있으면 1, 없으면 0) x (jth dendrite와 ith axon이 연결 되어있는지 보면서, 연결 되어 있으면 1, 아니면 0) x (Neuron의 type과 jth dendrite에 따른 weight) - (jth dendrite의 leaking value)
이렇게 계산하게 된다.
=> 그냥 computation을 일일이 해주는 것인 듯.
=> 실제로는 pseudo random number을 넣어서 더 복잡하게 한다고 한다.
=> 모델 만들면서 각 neuron마다 다르게 넣어줄 수 있는 것은,

1. 각 neuron의 type과 그에 따른 weight. 근데 같은 type이라도 neuron마다 조금씩 차이가 날 수 있어야 한다. 그리고 한 뉴런에는 한개의 weight만 사용한다.

2. 각 뉴런의 leaking value.

=> leaking value와 weight를 그냥 leaking value 한 가지 parameter로 퉁 칠수 있을까?? 머리로는 없다고 생각이 들긴 함.


Asynchronous Design: Communication & Control. Control은 input이 있을때만 computation하도록 하는 것이다.
Synchronous Design: Computation. Asynchronous control signal에 의해서 각각의 core에서 synchronous working을 위한 clock pulse가 생성된다.

그리고 computation 끝날때 까지만 clock이 생성됨.


이 논문을 보면 결국 한 core에 neuron이라고 할 수 있을만한 것은 256개가 아니라 1개 뿐임. 사실 그것도 computation unit이다. 즉, 얘가 SRAM에서 각 Neuron의 parameter/weight/leakage value들을 한개씩 받아와서 계산하고 다시 SRAM으로 넘기고 하는 과정을 256번 반복하는 것이다. Fig. 6에 block이 Neuron block이라고 불리는 computation unit이다.


Chip간의 data 통신은 I/O때문에, multiple bus를 merge해서 single stream of spike로 만든다.




'Research' 카테고리의 다른 글

[MICRO, Introduction] On Architectural Support for Systems Security  (0) 2018.03.19

이번에는 batch file에 대해서 알아보기 위해 'run xdlrc_convert.bat' file 분석을 해보겠습니다.


setlocal

명령어로 local variation을 사용한다고 설정한다.


set /p ans=Run xdlrc_convert for all Virtex-5 devices? [y/n]

명령어는 ans라는 variable에 값을 받을 것인데, /p 옵션을 통해서 Run xdlrc_convert for all Virtex-5 devices? [y/n] 이라는 글도 같이 뜨도록 만들어 주는 것이다.


if not "%ans%"=="y" goto end

이것은 ans라는 variable에 y가 아니면 끝내는 명령어이다.


set V5DEVICES=xc5vfx30tff665

는 V5DEVICES라는 variable에 xc5vfx30tff665를 넣어주는 것이다.


set V5DEVICES=%V5DEVICES% xc5vfx70tff665

명령어는 위에서 V5DEVICES variable에 xc5vfx30tff665가 입력되었는데, 그 뒤에 xc5vfx70tff665도 붙여주는 것이다.

그럼 결과적으로 V5DEVICES variable 내부에는 'xc5vfx30tff665 xc5vfx70tff665'가 들어있게 된다.


아래에서도 계속해서 비슷하게 해서 V5DEVICES 내부에 'xc5vfx30tff665 xc5vfx70tff665 xc5vfx70tff1136' 이런식으로 들어가게 된다.


이 아래에는 이번에 새로 xdl 명령어를 추가하기 위해 추가한 

call C:\Xilinx\14.7\ISE_DS\settings64.bat

명령어를 입력해주게 되는데, 이것은 C:\Xilinx\14.7\ISE_DS\settings64.bat 파일을 실행시켜주는 것이다.


cd /D "%~dp0..\data"

명령어를 통해서 ~~\bil-master\data로 명령어를 실행시킬 path를 설정한다.

'~dp0'는 처음에 이 batch file을 실행시킬 때의 argument에 대한 것인데, 0번 째 argument로 현재 directory path를 들고 온 것이다. 그래서 ~dp0는 ~\bil-master\scripts\를 의미한다.


xdl -report -pips -all_cons %%i

명령어를 통해서 V5DEVICES에 넣어놓았던 xc5vfx30tff665 같은 특정 보드들을 하나씩 가져와서 해당 ISE 명령어를 돌린다.

이 결과로 ~\bil-master\data\에 .xdlrc file이 만들어진다.

(그런데 여기서 모든 보드를 위한 것들은 안만들어진다. 이유는 잘 모르겠는데 Webpack version이라 그런 것일 수도 있다는 생각을 했다. 일단 한개의 보드 용으로만 돌아가면 될 것이라 생각하여 지금은 넘어갔다)

(+. 옆에서 win10으로 했을 때는 동일하게 했는데 다른 보드도 성공했다.)


"%~dp0..\bin\win32\MSVC 2008\xdlrc_convert\Release\xdlrc_convert" %%i.xdlrc

위의 명령어는 번역하면 아래와 같다.

~\bil-master\bin\win32\MSVC 2008\xdlrc_convert\Release\xdlrc_convert.exe xc5vfx30tff665.xdlrc

여기서 xc5vfx30tff665.xdlrc는 예제이다. 이것은 for문이 돌아갈 때 마다 다음 보드명으로 바뀔 것이다. (xc5vfx30tff665.xdlrc 다음 xc5vfx70tff665.xdlrc 이런 식으로)

이 명령어의 결과로는 ~.xdlrc file을 이용하여 ~.dev file을 ~\bil-master\data에 만들어준다.

이것이 논문에서 봤던 ~.xdlrc file은 너무 커서 간략화시킨 file을 만들어준 것이다.


del %%i.xdlrc

이 명령어를 이용해서 ~.xdlrc file을 지워주었다. ~.xdlrc file은 너무 커서 ~.dev file을 생성하고 지워준다.

이번에는 BIL code를 구동하기 위해서 어떤 일들을 해야 하는지 알아보겠습니다.


일단 bil-master/scripts에 ‘copy cfgdbs.bat’ 부터 실행한다.


그 다음에 ‘run v5data_gen.bat’를 실행한다.


그리고 ‘run xdlrc_convert.bat’를 실행하려니 xdl명령어를 모른다는 문제가 생긴다.

(“‘xdl’ 은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다” 라고 나온다)

(그런데 결국 이것은 *.dev file을 만들려고 있는 것인데, 처음에 압축파일을 풀면 있기 때문에 안돌려도 된다.....)

그래서 ISE를 깔아야 하나 싶어서 ISE v14.7을 다운받았다.

내부에서는 Free Version인 Webpack을 선택하여 설치한다.

얘는 license가 필요없다.

근데 windows 환경은 얘를 설치만 해서는 xdl command가 뭔지 모른다.


그래서 windows command에서 xdl command를 알아들을 수 있도록 해주어야 한다. (ISE Tcl Console에서는 xdl command가 돌아가는 것을 확인했다.)

그래서 [Solved:  ‘xdl’ is not recognized as an internal or external… - Community Forums](https://forums.xilinx.com/t5/Implementation/xdl-is-not-recognized-as-an-internal-or-external-command/td-p/724809) 페이지를 확인하니, ‘setting64’라는 것을 xdl 전에 실행해야 한다고 나온다.

그래서 ‘run xdlrc_convert.bat’ 내부에서 xdl command 실행하기 전에

‘call C:\Xilinx\14.7\ISE_DS\settings64.bat’  명령어를 입력해놓았다.

이러니까 xdl command를 알아듣고 돌아갔다.


이 다음에는 v5cfgmap_gen을 실행한다.

그러면 \bil-master\data\에 *.map file들이 만들어진다.


그리고 run bitcorrelate.bat를 돌리면 잘 돌아가고 Configuration Database가 나오게 된다.

그러면 이제 논문의 Fig. 1에서 원하는 것들은 모두 돌아간 것이다.


이제 Configuration Database가 만들어졌으니 Fig. 2을 참조하여 계속해서 다른 프로그램을 돌리면 된다.

'Research > FPGA Security' 카테고리의 다른 글

[Analysis - BIL] Batch file (run xdlrc_convert.bat)  (0) 2018.04.06

+ Recent posts