0

I have an issue with PyEDA. I have to do a 2-level-logic-minimization in PyEDA for a University project for "Low Level Synthesis" using Espresso minimization. I used this BLIF file as an input:

# Benchmark "ex" written by ABC on Thu Jun  4 14:03:01 2020
.model ex
.inputs a b c
.outputs F
.names a b c F
111 1           a & b & c
101 1           a & ~b & c
100 1           a & ~b & ~c
001 1           a & b & ~c
.end

I tried to initialize PyEDA in Python3. It started okay at first with the command from pyeda.inter import* , than I tried to run using the command X = ttvars('x', 3). Instead of initialising X it showed this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sobuhasy/.local/lib/python3.10/site-packages/pyeda/boolalg/bfarray.py", line 277, in ttvars
    return _vars(TruthTable, name, *dims)
  File "/home/sobuhasy/.local/lib/python3.10/site-packages/pyeda/boolalg/bfarray.py", line 976, in _vars
    return farray(objs, shape, ftype)
  File "/home/sobuhasy/.local/lib/python3.10/site-packages/pyeda/boolalg/bfarray.py", line 430, in __init__
    self._items, autoshape, autoftype = _itemize(objs)
  File "/home/sobuhasy/.local/lib/python3.10/site-packages/pyeda/boolalg/bfarray.py", line 1032, in _itemize
    if not isinstance(objs, collections.Sequence):
AttributeError: module 'collections' has no attribute 'Sequence'

After this error showed up I tried to initialize the table function from the BLIF file using f1 = truthtable(X, "01001101"). After trying it showed this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'X' is not defined

This even when I tried to define X. How can I solve this issue.

Tried to run the PyEDA Espresso minimizer from https://pyeda.readthedocs.io/en/latest/2llm.html#minimize-truth-tables

But instead of the promised result it showed the error described earlier.

SobuHasy
  • 9
  • 3

0 Answers0