# Last edited on 2021-01-06 09:10:00 by jstolfi SHELL := /bin/bash # Simulator: PROGDIR := ${HOME}/programs/c/NEUROMAT/nmsim_elem_net_simulate PROG := nmsim_elem_net_simulate # Creator: GEN_PROGDIR := ${HOME}/programs/c/NEUROMAT/nmsim_elem_net_create_test GEN_PROG := nmsim_elem_net_create_test all: compile delete create simulate plot NNE := 100 NNE1 := ${shell echo "${NNE}-1" | bc -lq} NNEx2 := ${shell echo "2*${NNE}" | bc -lq} # Tags of this run and of a comparison run. TAG=A CMP=A # Range of layer 0 input currents for full-scale test: SUBTAG := FU INP_MIN_0 := -2.0 INP_MAX_0 := 40.0 INP_DEV_0 := 0.0 RHOMAX_0 := 0.300 RHOMAX_1 := 1.000 # Range of layer 1 currents to plot: INP_MIN_1 := -10.0 INP_MAX_1 := +10.0 TAGSUB := ${TAG}_${SUBTAG} CMPSUB := ${CMP}_${SUBTAG} ifneq "/${TAG}" "/${CMP}" TAGSUBS := ${CMPSUB} ${TAGSUB} else TAGSUBS := ${TAGSUB} endif include ${TAG}.make # Trace/plot time ranges TTOT := 10000 TRACE_TMIN := 1800 TRACE_TMAX := 9800 PLOT_TMIN := 1925 PLOT_TMAX := 2075 NMSIM_FILE := data_nmsim_${TAG}.txt GEN_PREFIX := out/sim OUT_PREFIX := ${GEN_PREFIX}_${TAGSUB} INPUT_OPTS := ${shell make_input_options.sh ${NNE} ${TTOT} ${INP_MIN_0} ${INP_MAX_0} ${INP_DEV_0}} TRACE_OPTS := ${shell make_trace_options.sh ${NNE} ${TRACE_TMIN} ${TRACE_TMAX}} compile: cd ${PROGDIR} && make all cd ${GEN_PROGDIR} && make all delete: rm -fv ${NMSIM_FILE} create: ${NMSIM_FILE} ${NMSIM_FILE}: compile ${GEN_PROG} \ -netType PAIRS \ -netSize ${NNE} \ -phiType ${PHI} \ -V_tau ${V_tau} \ -M_R ${M_R} \ -M_tau ${M_tau} \ -W ${W} \ > ${NMSIM_FILE} simulate: compile ${NMSIM_FILE} -mkdir -p out -rm -f out/*.{txt,png} time ${PROG} \ -netFile ${NMSIM_FILE} \ -timeStep 1.0 \ -nSteps ${TTOT} \ ${INPUT_OPTS} \ ${TRACE_OPTS} \ -outPrefix ${OUT_PREFIX} plot: extract_syn_transfer.sh ${NNE} ${OUT_PREFIX} plot_inp_transfers.sh 1 ${GEN_PREFIX} ${TAGSUBS} plot_syn_transfers.sh 1 ${GEN_PREFIX} ${TAGSUBS} save_PAIRS_test.sh "${TAG}" "${CMP}" "${SUBTAG}" plot_traces.sh 1 0 ${NNE} \ ${OUT_PREFIX} \ ${PLOT_TMIN} ${PLOT_TMAX} \ ${INP_MIN_0} ${INP_MAX_0} \ ${RHOMAX_0} plot_traces.sh 1 ${NNE} ${NNEx2} \ ${OUT_PREFIX} \ ${PLOT_TMIN} ${PLOT_TMAX} \ ${INP_MIN_1} ${INP_MAX_1} \ ${RHOMAX_1}