summaryrefslogtreecommitdiffstats
path: root/tpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'tpu.h')
-rw-r--r--tpu.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/tpu.h b/tpu.h
index ad2d14c..1805d7c 100644
--- a/tpu.h
+++ b/tpu.h
@@ -8,7 +8,8 @@
#define TPU_MAP_BUCKETS 64
#define LABEL_MAP_BUCKETS 64
#define TPU_MAX_INST_CNT 15
-#define TPU_MAX_INST_LEN 18
+#define TPU_MAX_ROWS 15
+#define TPU_MAX_COLS 18
#define TIS_MAX_IO_PORTS 36
/* what tpu will attempt next (order important) */
@@ -42,13 +43,18 @@ union tpu_inst_op_val {
};
struct label_map_link {
- char *label;
int pc;
+ bool prefix;
struct label_map_link *next;
};
+struct label {
+ char *str;
+ bool prefix;
+};
+
struct label_map {
- char *labels[TPU_MAX_INST_CNT]; /* borrowed from label_map_links */
+ struct label labels[TPU_MAX_INST_CNT];
struct label_map_link *buckets[LABEL_MAP_BUCKETS];
};
@@ -98,7 +104,7 @@ struct tpu {
struct label_map label_map;
struct tpu_inst insts[TPU_MAX_INST_CNT];
- size_t inst_cnt, label_cnt;
+ size_t inst_cnt, rows;
};
struct tpu_map_link {
@@ -139,7 +145,7 @@ struct tis_stats {
void label_map_init(struct label_map *map);
void label_map_deinit(struct label_map *map);
-bool label_map_add(struct label_map *map, const char *name, int pc);
+bool label_map_add(struct label_map *map, const char *name, int pc, bool prefix);
int label_map_get(struct label_map *map, const char *name);
void tpu_port_init(struct tpu_port *port, struct tpu *tpu);