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

Fault fails with wrong circt version #328

Open
phanrahan opened this issue Aug 7, 2023 · 1 comment
Open

Fault fails with wrong circt version #328

phanrahan opened this issue Aug 7, 2023 · 1 comment

Comments

@phanrahan
Copy link
Collaborator

Fault fails with wrong circt version.

def circt_opt_version() -> str:
        circt_home = _circt_home()
        circt_opt_binary = _circt_opt_binary(circt_home)
        ostream = io.TextIOWrapper(io.BytesIO())
        returncode = _run_subprocess(
            [circt_opt_binary, "--version"],
            stdin=io.BytesIO(),
            stdout=ostream.buffer,
        )
        ostream.seek(0)
        version = ostream.read()
        match = re.search(_CIRCT_VERSION_RE_PATTERN, version, re.MULTILINE)
        if match is None:
>           raise BadCirctOptVersionStringError(version)
E           magma.backend.mlir.mlir_to_verilog.BadCirctOptVersionStringError: LLVM (http://llvm.org/):
E             LLVM version 17.0.0git
E             DEBUG build with assertions.
E           CIRCT unknown git version

../../magma/magma/backend/mlir/mlir_to_verilog.py:123: BadCirctOptVersionStringError

Trying to disable the check as follows doesn't work.

tester.compile_and_run("verilator", disp_type="realtime",
                           magma_output="mlir-verilog",
                           check_circt_opt_version=False)
@rsetaluri
Copy link
Collaborator

I would upgrade magma, either through a global upgrade: python -m pip install -e --upgrade or magma-specific upgrade: python -m pip install magma-lang --upgrade. If you do python -m pip freeze | grep magma you should ideally see version >= 2.3.0.

For future reference, passing options to magma compilation is done through the magma_opts kwarg, so like:

tester.compile_and_run(..., magma_output="mlir-verilog", magma_opts={"check_circt_opt_version": False})

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