From 02158c7613495f1a02a2a8f108cd1c397656ce2b Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 28 Aug 2026 17:29:33 -0700 Subject: cleaned up --- src/crossbar_generator.h | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'src/crossbar_generator.h') 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 typedef struct { - size_t rows; // number of neurons - size_t columns; // number of outputs - - // array of row input voltages. - // length must equal rows (# of rows) + /* Physical crossbar dimensions. */ + size_t rows; + size_t columns; + + /* + * 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; -- cgit v1.2.3