23#ifndef STDP_SYNAPSE_FACETSHW_HOM_IMPL_H
24#define STDP_SYNAPSE_FACETSHW_HOM_IMPL_H
39template <
typename target
identifierT >
46 , synapses_per_driver_( 50 )
48 , driver_readout_time_( 15.0 )
118template <
typename target
identifierT >
122 readout_cycle_duration_ = int( ( no_synapses_ - 1.0 ) / synapses_per_driver_ + 1.0 ) * driver_readout_time_;
125template <
typename target
identifierT >
149template <
typename target
identifierT >
159 weight_per_lut_entry_ = Wmax_ / ( lookuptable_0_.size() - 1 );
167 calc_readout_cycle_duration_();
172 calc_readout_cycle_duration_();
176 calc_readout_cycle_duration_();
184 if ( lookuptable_0_.size() != lookuptable_1_.size() )
186 throw BadProperty(
"Look-up table has not 2^4 entries!" );
190 for (
size_t i = 0; i < size_t( lookuptable_0_.size() ); ++i )
192 if ( lookuptable_0_[ i ] < 0 or lookuptable_0_[ i ] > 15 )
194 throw BadProperty(
"Look-up table entries must be integers in [0,15]" );
203 if ( lookuptable_1_.size() != lookuptable_0_.size() )
205 throw BadProperty(
"Look-up table has not 2^4 entries!" );
209 for (
size_t i = 0; i < size_t( lookuptable_1_.size() ); ++i )
211 if ( lookuptable_1_[ i ] < 0 or lookuptable_1_[ i ] > 15 )
213 throw BadProperty(
"Look-up table entries must be integers in [0,15]" );
222 if ( lookuptable_2_.size() != lookuptable_0_.size() )
224 throw BadProperty(
"Look-up table has not 2^4 entries!" );
228 for (
size_t i = 0; i < size_t( lookuptable_2_.size() ); ++i )
230 if ( lookuptable_2_[ i ] < 0 or lookuptable_2_[ i ] > 15 )
232 throw BadProperty(
"Look-up table entries must be integers in [0,15]" );
242 if ( configbit_0_.size() != 4 )
244 throw BadProperty(
"Wrong number of configuration bits (!=4)." );
252 if ( configbit_1_.size() != 4 )
254 throw BadProperty(
"Wrong number of configuration bits (!=4)." );
262 if ( reset_pattern_.size() != 6 )
264 throw BadProperty(
"Wrong number of reset bits (!=6)." );
273template <
typename target
identifierT >
278 , a_thresh_th_( 21.835 )
279 , a_thresh_tl_( 21.835 )
280 , init_flag_( false )
282 , next_readout_time_( 0.0 )
283 , discrete_weight_( 0 )
284 , t_lastspike_( 0.0 )
288template <
typename target
identifierT >
293 ConnectionBase::get_status( d );
312template <
typename target
identifierT >
317 ConnectionBase::set_status( d, cm );
Dictionary class for interface to Python and C++ API.
Definition dictionary.h:213
Exception to be thrown if a status parameter is incomplete or inconsistent.
Definition exceptions.h:680
Class containing the common properties for all connections of a certain type.
Definition common_synapse_properties.h:50
void get_status(Dictionary &d) const
Get all properties and put them into a dictionary.
Definition common_synapse_properties.cpp:47
void set_status(const Dictionary &d, ConnectorModel &cm)
Set properties from the values given in dictionary.
Definition common_synapse_properties.cpp:53
Definition connector_model.h:69
void calc_readout_cycle_duration_()
Calculate the readout cycle duration.
Definition stdp_facetshw_synapse_hom_impl.h:120
std::vector< long > configbit_0_
Definition stdp_facetshw_synapse_hom.h:213
std::vector< long > lookuptable_1_
Definition stdp_facetshw_synapse_hom.h:211
std::vector< long > lookuptable_2_
Definition stdp_facetshw_synapse_hom.h:212
double Wmax_
Definition stdp_facetshw_synapse_hom.h:201
double weight_per_lut_entry_
Definition stdp_facetshw_synapse_hom.h:202
std::vector< long > lookuptable_0_
Definition stdp_facetshw_synapse_hom.h:210
std::vector< long > configbit_1_
Definition stdp_facetshw_synapse_hom.h:214
STDPFACETSHWHomCommonProperties()
Default constructor.
Definition stdp_facetshw_synapse_hom_impl.h:40
std::vector< long > reset_pattern_
Definition stdp_facetshw_synapse_hom.h:215
void get_status(Dictionary &d) const
Get all properties and put them into a dictionary.
Definition stdp_facetshw_synapse_hom_impl.h:127
void set_status(const Dictionary &d, ConnectorModel &cm)
Set properties from the values given in dictionary.
Definition stdp_facetshw_synapse_hom_impl.h:151
stdp_facetshw_synapse_hom()
Default Constructor.
Definition stdp_facetshw_synapse_hom_impl.h:274
void get_status(Dictionary &d) const
Get all properties of this connection and put them into a dictionary.
Definition stdp_facetshw_synapse_hom_impl.h:290
void set_status(const Dictionary &d, ConnectorModel &cm)
Set properties of this connection from the values given in dictionary.
Definition stdp_facetshw_synapse_hom_impl.h:314
const std::string a_thresh_th("a_thresh_th")
const std::string no_synapses("no_synapses")
const std::string lookuptable_0("lookuptable_0")
const std::string reset_pattern("reset_pattern")
const std::string lookuptable_1("lookuptable_1")
const std::string driver_readout_time("driver_readout_time")
const std::string tau_minus_stdp("tau_minus_stdp")
const std::string next_readout_time("next_readout_time")
const std::string a_thresh_tl("a_thresh_tl")
const std::string configbit_0("configbit_0")
const std::string synapse_id("synapse_id")
const std::string synapses_per_driver("synapses_per_driver")
const std::string tau_plus("tau_plus")
const std::string weight("weight")
const std::string configbit_1("configbit_1")
const std::string init_flag("init_flag")
const std::string a_acausal("a_acausal")
const std::string lookuptable_2("lookuptable_2")
const std::string a_causal("a_causal")
const std::string weight_per_lut_entry("weight_per_lut_entry")
const std::string Wmax("Wmax")
const std::string readout_cycle_duration("readout_cycle_duration")
Namespace for the NEST simulation kernel.
Definition beta_normalization_factor.h:33