diff --git a/coreir/__init__.py b/coreir/__init__.py index 744d843..37824db 100644 --- a/coreir/__init__.py +++ b/coreir/__init__.py @@ -60,6 +60,9 @@ def define_types(name,input_types,output_type=None): libcoreir_c.COREPrintErrors.argtypes = [COREContext_p] +libcoreir_c.COREBitInOut.argtypes = [COREContext_p] +libcoreir_c.COREBitInOut.restype = COREType_p + libcoreir_c.COREBitIn.argtypes = [COREContext_p] libcoreir_c.COREBitIn.restype = COREType_p diff --git a/coreir/context.py b/coreir/context.py index 9fcf854..bb531bd 100644 --- a/coreir/context.py +++ b/coreir/context.py @@ -61,6 +61,9 @@ def G(self): def print_errors(self): libcoreir_c.COREPrintErrors(self.context) + def BitInOut(self): + return Type(libcoreir_c.COREBitInOut(self.context),self) + def BitIn(self): return Type(libcoreir_c.COREBitIn(self.context),self) diff --git a/coreir/type.py b/coreir/type.py index f778c3b..5c63a41 100644 --- a/coreir/type.py +++ b/coreir/type.py @@ -95,7 +95,8 @@ def kind(self): 1: "BitIn", 2: "Array", 3: "Record", - 4: "Named" + 4: "Named", + 5: "BitInOut" }[kind] def is_input(self):