Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression with latest magma release #131

Closed
leonardt opened this issue Feb 13, 2019 · 2 comments
Closed

Regression with latest magma release #131

leonardt opened this issue Feb 13, 2019 · 2 comments
Assignees

Comments

@leonardt
Copy link
Collaborator

leonardt commented Feb 13, 2019

Steps to reproduce

❯ cd mantle
❯ git checkout master
❯ pytest --target coreir tests/test_mantle -k test_ram
/Users/lenny/miniconda3/lib/python3.7/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
============================================================================== test session starts ==============================================================================
platform darwin -- Python 3.7.0, pytest-3.9.3, py-1.7.0, pluggy-0.8.0
rootdir: /Users/lenny/repos/mantle, inifile:
plugins: profiling-1.4.0, pep8-1.0.6, cov-2.6.0, codestyle-1.4.0
collected 155 items / 154 deselected

tests/test_mantle/test_common_ram.py F                                                                                                                                    [100%]

=================================================================================== FAILURES ====================================================================================
___________________________________________________________________________________ test_ram ____________________________________________________________________________________

    def test_ram():
        main = m.DefineCircuit("main", "rdata", m.Out(m.Bit), "CLKIN",
                               m.In(m.Clock))

        ram = mantle.RAM(4, 1)

        waddr = mantle.Counter(4, cout=False)
        wdata = mantle.Counter(1, cout=False)
        we = 1
        raddr = mantle.Counter(4, cout=False)

        ram(raddr, waddr, wdata, we, CLK=main.CLKIN)

        m.wire(ram.RDATA[0], main.rdata)
        m.EndDefine()
        if m.mantle_target == "coreir":
            output = "coreir"
        else:
            output = "verilog"
>       m.compile("build/test_common_ram", main, output)

tests/test_mantle/test_common_ram.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../magma/magma/compile.py:135: in compile
    __compile_to_coreir(main, file_name, opts)
../magma/magma/compile.py:50: in __compile_to_coreir
    backend.compile(main)
../magma/magma/backend/coreir_.py:424: in compile
    self.compile_dependencies(defn_or_declaration)
../magma/magma/backend/coreir_.py:413: in compile_dependencies
    self.modules[key.name] = self.compile_definition(key)
../magma/magma/backend/coreir_.py:312: in compile_definition
    self.compile_definition_to_module_definition(definition, module_definition)
../magma/magma/backend/coreir_.py:266: in compile_definition_to_module_definition
    coreir_instance = self.compile_instance(instance, module_definition)
../magma/magma/backend/coreir_.py:196: in compile_instance
    module = lib.modules[name]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <coreir.util.LazyDict object at 0x119fe2b00>, key = 'DFF_init0_has_ceTrue_has_resetFalse_has_async_resetFalse'

    def __getitem__(self, key):
        if not key in self:
>           raise KeyError("Could not find key: {}".format(key))
E           KeyError: 'Could not find key: DFF_init0_has_ceTrue_has_resetFalse_has_async_resetFalse'

../../miniconda3/lib/python3.7/site-packages/coreir/util.py:25: KeyError
=================================================================== 1 failed, 154 deselected in 4.79 seconds ====================================================================

I suspect this may related to uniquification, but I haven't had a chance to investigate yet.

@leonardt
Copy link
Collaborator Author

We had seen an error like this before when the tsortedgraph used by the instancegraph pass was not working correctly.

@leonardt
Copy link
Collaborator Author

leonardt commented Mar 8, 2019

Fixed!

@leonardt leonardt closed this as completed Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants