Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions coreir/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions coreir/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion coreir/type.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def kind(self):
1: "BitIn",
2: "Array",
3: "Record",
4: "Named"
4: "Named",
5: "BitInOut"
}[kind]

def is_input(self):
Expand Down