From f5b646ddaef888569d48fbe68be1639902a94481 Mon Sep 17 00:00:00 2001
From: Kia <kia@special-circumstanc.es>
Date: Mon, 26 Apr 2021 14:07:37 -0600
Subject: [PATCH] add code to create the records

---
 unoptimized_lr/simple_parser_buses.py | 30 ++++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 5 deletions(-)

diff --git a/unoptimized_lr/simple_parser_buses.py b/unoptimized_lr/simple_parser_buses.py
index baab911..5a734ad 100644
--- a/unoptimized_lr/simple_parser_buses.py
+++ b/unoptimized_lr/simple_parser_buses.py
@@ -47,7 +47,7 @@ class ParametrizationConstants():
         self.W_serialized_parse_tree = max(W_Nonterminal, W_max_RHS, 1 + W_Terminal, 1+ W_parsetree_index)
 
 
-class LR_automaton_internal(Layout):
+class LR_automaton_internal_layout(Layout):
     def __init__(self, *, parameters):
         interfaces = [
             # TABLES
@@ -63,7 +63,11 @@ class LR_automaton_internal(Layout):
         super().__init__(interfaces)
 
 
-class InputStream(Layout):
+class LR_automaton_internal(Record):
+    def __init__(self, *, parameters):
+        super().__init__(LR_automaton_internal_layout(parameters=parameters))
+
+class InputStream_layout(Layout):
     def __init__(self, *, parameters):
         input_width = parameters.W_terminal
         super().__init__([
@@ -78,8 +82,12 @@ class InputStream(Layout):
 
         ])
 
+class InputStream(Record):
+    def __init__(self, *, parameters):
+        super().__init__(InputStream_layout(parameters=parameters))
 
-class Sideband(Layout):
+
+class Sideband_layout(Layout):
     def __init__(self, *, parameters):
         super().__init__([
             # INPUTS
@@ -92,8 +100,12 @@ class Sideband(Layout):
             ("parser_fault",         1), # TO DEST
         ])
 
+class Sideband(Record):
+    def __init__(self, *, parameters):
+        super().__init__(Sideband_layout(parameters=parameters))
+
 
-class Serializer(Layout):
+class Serializer_layout(Layout):
     def __init__(self, *, parameters):
         super().__init__([
             # INPUTS
@@ -111,7 +123,12 @@ class Serializer(Layout):
 
         ])
 
-class LR_automaton_external(Layout):
+class Serializer(Record):
+    def __init__(self, *, parameters):
+        super().__init__(Serializer_layout(parameters=parameters))
+
+
+class LR_automaton_external_layout(Layout):
     def __init__(self, *, parameters):
         interfaces = [
             # INPUT
@@ -124,6 +141,9 @@ class LR_automaton_external(Layout):
             interfaces.append(("serialization_bus", Serializer(parameters=parameters)))
         super().__init__(interfaces)
 
+class LR_automaton_external(Record):
+    def __init__(self, *, parameters):
+        super().__init__(LR_automaton_external_layout(parameters=parameters))
 
 
 class StackLayout(Layout):
-- 
GitLab