summaryrefslogtreecommitdiff
path: root/src/crossbar_generator.h
diff options
context:
space:
mode:
authorYour Name <[email protected]>2026-07-17 16:15:44 -0700
committerYour Name <[email protected]>2026-07-17 16:15:44 -0700
commitc7e2e6e8edb1536135e4cb6d307d5817e73b3bae (patch)
treebe137b0afcb839be1ab258564d8a124bb166dd66 /src/crossbar_generator.h
parentcc587b9aa209137c68e888aed50a8ee18f5bfaee (diff)
SPICE crossbar generator in C
Diffstat (limited to 'src/crossbar_generator.h')
-rw-r--r--src/crossbar_generator.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/crossbar_generator.h b/src/crossbar_generator.h
new file mode 100644
index 0000000..b7ec072
--- /dev/null
+++ b/src/crossbar_generator.h
@@ -0,0 +1,38 @@
+#ifndef CROSSBAR_GENERATOR_H
+#define CROSSBAR_GENERATOR_H
+
+#include <stddef.h>
+
+typedef struct {
+ size_t rows;
+ size_t columns;
+
+ //array of row input voltages.
+ //length must equal rows (# of rows)
+ const double *input_voltages;
+
+ //array of initial resistances
+ //stored in row-major order
+ const double *initial_resistance;
+
+ //path to the memory component path
+ const char *model_path;
+
+ //name of subcircuit(specific model)
+ const char *subcircuit_name;
+
+ //resistance from each column to ground
+ double load_resistance;
+
+ //transient sim settings
+ double time_step;
+ double stop_time;
+
+ //1 = true | 0 = false
+ int print_state_nodes;
+} Crossbar_Config;
+
+int generate_crossbar(const char *output_filename,
+ const Crossbar_Config *config);
+
+#endif