36 template<
typename target
identifierT>
46 synapses_per_driver_(50),
48 driver_readout_time_(15.0)
117 template<
typename target
identifierT>
120 readout_cycle_duration_ = int((no_synapses_ - 1.0) / synapses_per_driver_ + 1.0) * driver_readout_time_;
124 template<
typename target
identifierT>
129 def<double_t>(
d,
"tau_plus", tau_plus_);
130 def<double_t>(
d,
"tau_minus_stdp", tau_minus_);
131 def<double_t>(
d,
"Wmax", Wmax_);
132 def<double_t>(
d,
"weight_per_lut_entry", weight_per_lut_entry_);
134 def<long_t>(
d,
"no_synapses", no_synapses_);
135 def<long_t>(
d,
"synapses_per_driver", synapses_per_driver_);
136 def<double_t>(
d,
"driver_readout_time", driver_readout_time_);
137 def<double_t>(
d,
"readout_cycle_duration", readout_cycle_duration_);
139 (*d)[
"lookuptable_0"] =
IntVectorDatum(
new std::vector<long_t>(lookuptable_0_));
140 (*d)[
"lookuptable_1"] =
IntVectorDatum(
new std::vector<long_t>(lookuptable_1_));
141 (*d)[
"lookuptable_2"] =
IntVectorDatum(
new std::vector<long_t>(lookuptable_2_));
142 (*d)[
"configbit_0"] =
IntVectorDatum(
new std::vector<long_t>(configbit_0_));
143 (*d)[
"configbit_1"] =
IntVectorDatum(
new std::vector<long_t>(configbit_1_));
144 (*d)[
"reset_pattern"] =
IntVectorDatum(
new std::vector<long_t>(reset_pattern_));
147 template<
typename target
identifierT>
152 updateValue<double_t>(
d,
"tau_plus", tau_plus_);
153 updateValue<double_t>(
d,
"tau_minus_stdp", tau_minus_);
154 if(updateValue<double_t>(d,
"Wmax", Wmax_)){
155 weight_per_lut_entry_ = Wmax_ / (lookuptable_0_.size() - 1);
159 updateValue<double_t>(
d,
"weight_per_lut_entry", weight_per_lut_entry_);
160 updateValue<double_t>(
d,
"readout_cycle_duration", readout_cycle_duration_);
161 if(updateValue<long_t>(d,
"no_synapses", no_synapses_)){
162 calc_readout_cycle_duration_();
165 if(updateValue<long_t>(d,
"synapses_per_driver", synapses_per_driver_)){
166 calc_readout_cycle_duration_();
168 if(updateValue<double_t>(d,
"driver_readout_time", driver_readout_time_)){
169 calc_readout_cycle_duration_();
172 if(d->known(
"lookuptable_0")){
173 updateValue<std::vector<long_t> >(
d,
"lookuptable_0", lookuptable_0_);
176 if(lookuptable_0_.size() != lookuptable_1_.size()){
177 throw BadProperty(
"Look-up table has not 2^4 entries!");
181 for(
size_t i = 0; i < size_t(lookuptable_0_.size()); ++i){
182 if((lookuptable_0_[i] < 0) || (lookuptable_0_[i] > 15)){
183 throw BadProperty(
"Look-up table entries must be integers in [0,15]");
187 if(d->known(
"lookuptable_1")){
188 updateValue<std::vector<long_t> >(
d,
"lookuptable_1", lookuptable_1_);
191 if(lookuptable_1_.size() != lookuptable_0_.size()){
192 throw BadProperty(
"Look-up table has not 2^4 entries!");
196 for(
size_t i = 0; i < size_t(lookuptable_1_.size()); ++i){
197 if((lookuptable_1_[i] < 0) || (lookuptable_1_[i] > 15)){
198 throw BadProperty(
"Look-up table entries must be integers in [0,15]");
202 if(d->known(
"lookuptable_2")){
203 updateValue<std::vector<long_t> >(
d,
"lookuptable_2", lookuptable_2_);
206 if(lookuptable_2_.size() != lookuptable_0_.size()){
207 throw BadProperty(
"Look-up table has not 2^4 entries!");
211 for(
size_t i = 0; i < size_t(lookuptable_2_.size()); ++i){
212 if((lookuptable_2_[i] < 0) || (lookuptable_2_[i] > 15)){
213 throw BadProperty(
"Look-up table entries must be integers in [0,15]");
218 if(d->known(
"configbit_0")){
219 updateValue<std::vector<long_t> >(
d,
"configbit_0", configbit_0_);
222 if(configbit_0_.size() != 4){
223 throw BadProperty(
"Wrong number of configuration bits (!=4).");
226 if(d->known(
"configbit_1")){
227 updateValue<std::vector<long_t> >(
d,
"configbit_1", configbit_1_);
230 if(configbit_1_.size() != 4){
231 throw BadProperty(
"Wrong number of configuration bits (!=4).");
234 if(d->known(
"reset_pattern")){
235 updateValue<std::vector<long_t> >(
d,
"reset_pattern", reset_pattern_);
238 if(reset_pattern_.size() != 6){
239 throw BadProperty(
"Wrong number of reset bits (!=6).");
248 template<
typename target
identifierT>
253 a_thresh_th_(21.835),
254 a_thresh_tl_(21.835),
258 next_readout_time_(0.0),
262 template<
typename target
identifierT>
265 weight_(rhs.weight_),
266 a_causal_(rhs.a_causal_),
267 a_acausal_(rhs.a_acausal_),
268 a_thresh_th_(rhs.a_thresh_th_),
269 a_thresh_tl_(rhs.a_thresh_tl_),
270 init_flag_(rhs.init_flag_),
271 synapse_id_(rhs.synapse_id_),
272 next_readout_time_(rhs.next_readout_time_),
273 discrete_weight_(rhs.discrete_weight_)
276 template<
typename target
identifierT>
280 ConnectionBase::get_status(d);
284 def<double_t>(
d,
"a_causal", a_causal_);
285 def<double_t>(
d,
"a_acausal", a_acausal_);
286 def<double_t>(
d,
"a_thresh_th", a_thresh_th_);
287 def<double_t>(
d,
"a_thresh_tl", a_thresh_tl_);
289 def<bool>(
d,
"init_flag", init_flag_);
290 def<long_t>(
d,
"synapse_id", synapse_id_);
291 def<double_t>(
d,
"next_readout_time", next_readout_time_);
296 template<
typename target
identifierT>
300 ConnectionBase::set_status(d, cm);
303 updateValue<double_t>(
d,
"a_causal", a_causal_);
304 updateValue<double_t>(
d,
"a_acausal", a_acausal_);
305 updateValue<double_t>(
d,
"a_thresh_th", a_thresh_th_);
306 updateValue<double_t>(
d,
"a_thresh_tl", a_thresh_tl_);
308 updateValue<long_t>(
d,
"synapse_id", synapse_id_);
311 updateValue<bool>(
d,
"init_flag", init_flag_);
312 updateValue<double_t>(
d,
"next_readout_time", next_readout_time_);
void get_status(DictionaryDatum &d) const
Get all properties and put them into a dictionary.
Definition: stdp_connection_facetshw_hom_impl.h:125
void set_status(const DictionaryDatum &d, ConnectorModel &cm)
Set properties from the values given in dictionary.
Definition: common_synapse_properties.cpp:42
const Name d("d")
Specific to Izhikevich 2003.
Definition: nest_names.h:83
double_t weight_per_lut_entry_
Definition: stdp_connection_facetshw_hom.h:155
Class representing an STDP connection with homogeneous parameters, i.e.
Definition: stdp_connection_facetshw_hom.h:113
const Name weight("weight")
Connection parameters.
Definition: nest_names.h:344
std::vector< long_t > lookuptable_1_
Definition: stdp_connection_facetshw_hom.h:163
std::vector< long_t > configbit_1_
Definition: stdp_connection_facetshw_hom.h:166
std::vector< long_t > reset_pattern_
Definition: stdp_connection_facetshw_hom.h:167
void set_status(const DictionaryDatum &d, ConnectorModel &cm)
Set properties of this connection from the values given in dictionary.
Definition: stdp_connection_facetshw_hom_impl.h:297
void get_status(DictionaryDatum &d) const
Get all properties of this connection and put them into a dictionary.
Definition: stdp_connection_facetshw_hom_impl.h:277
void set_status(const DictionaryDatum &d, ConnectorModel &cm)
Set properties from the values given in dictionary.
Definition: stdp_connection_facetshw_hom_impl.h:148
double_t Wmax_
Definition: stdp_connection_facetshw_hom.h:154
Declarations for class Network.
Exception to be thrown if a status parameter is incomplete or inconsistent.
Definition: exceptions.h:420
std::vector< long_t > lookuptable_0_
Definition: stdp_connection_facetshw_hom.h:162
Class containing the common properties for all connections of a certain type.
Definition: common_synapse_properties.h:44
void get_status(DictionaryDatum &d) const
Get all properties and put them into a dictionary.
Definition: common_synapse_properties.cpp:40
std::vector< long_t > lookuptable_2_
Definition: stdp_connection_facetshw_hom.h:164
Base class for representing connections.
Definition: connection.h:85
STDPFACETSHWHomCommonProperties()
Default constructor.
Definition: stdp_connection_facetshw_hom_impl.h:37
STDPFACETSHWConnectionHom()
Default Constructor.
Definition: stdp_connection_facetshw_hom_impl.h:249
std::vector< long_t > configbit_0_
Definition: stdp_connection_facetshw_hom.h:165
Definition: connector_model.h:38
lockPTRDatum< std::vector< long >,&SLIInterpreter::IntVectortype > IntVectorDatum
Definition: arraydatum.h:82
void calc_readout_cycle_duration_()
Calculate the readout cycle duration.
Definition: stdp_connection_facetshw_hom_impl.h:118