From 31c646ed553a02f56649638e55030434f5af3437 Mon Sep 17 00:00:00 2001
From: Kia <kia@special-circumstanc.es>
Date: Sat, 23 May 2020 17:14:37 -0600
Subject: [PATCH] add introspection port for parse tree

---
 combinatorial_LR_parser.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/combinatorial_LR_parser.py b/combinatorial_LR_parser.py
index 4cbf5d8..25ea3ef 100644
--- a/combinatorial_LR_parser.py
+++ b/combinatorial_LR_parser.py
@@ -555,13 +555,14 @@ class TreeSerializer(Elaboratable):
         self.memory_address_port         = Signal(self.mem_address_width)
         self.memory_write_enable         = Signal(1)
 
+
     def elaborate(self, platform):
         m = Module()
 
         start_of_record = Signal(self.mem_address_width) # start of next/yet-unwritten node record, advanced only
                                                          # after each reduce
 
-        mem = Memory(width=(self.item_width + 1), depth=64)
+        self.memory_introspection = mem = Memory(width=(self.item_width + 1), depth=64)
         m.submodules.parse_tree = wport = mem.write_port()
 
 
-- 
GitLab