summaryrefslogtreecommitdiff
path: root/src/crossbar_generator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crossbar_generator.h')
-rw-r--r--src/crossbar_generator.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/crossbar_generator.h b/src/crossbar_generator.h
index 8fc754b..b76179b 100644
--- a/src/crossbar_generator.h
+++ b/src/crossbar_generator.h
@@ -4,33 +4,38 @@
#include <stddef.h>
typedef struct {
- size_t rows; // number of neurons
- size_t columns; // number of outputs
+ /* Physical crossbar dimensions. */
+ size_t rows;
+ size_t columns;
- // array of row input voltages.
- // length must equal rows (# of rows)
+ /*
+ * Flat row-major input voltages. Offline generation reads
+ * input_series[sample * rows + row] for num_samples samples. Online
+ * generation uses external voltage sources and does not read the values.
+ */
const double *input_series;
size_t num_samples;
- // array of initial resistances
- // stored in row-major order
- // size must be rows * colums
+ /*
+ * Flat row-major initial resistances with rows * columns elements:
+ * initial_resistance[row * columns + column].
+ */
const double *initial_resistance;
- // path to the memory component path
+ /* Path to the SPICE model included by the generated netlist. */
const char *model_path;
- // name of subcircuit(specific model)
+ /* Name of the model's SPICE subcircuit. */
const char *subcircuit_name;
- // resistance from each column to ground
+ /* Resistance from each physical column to ground. */
double load_resistance;
- // transient sim settings
+ /* Transient-analysis sample interval and stop time. */
double time_step;
double stop_time;
- // 1 = true | 0 = false
+ /* Reserved for state-node output; currently must be 0 or 1. */
int print_state_nodes;
} Crossbar_Config;