Skip to content

[FIRRTL] Assertion failure on grand central when running with -debug #8516

Open
@uenoku

Description

@uenoku
// -----// IR Dump After AssignOutputDirs (firrtl-assign-output-dirs) //----- //
firrtl.circuit "test" {
  firrtl.module @test(in %clock: !firrtl.clock, in %reset: !firrtl.uint<1>, out %io_out: !firrtl.uint<6>) {
    %c1_ui6 = firrtl.constant 1 : !firrtl.uint<6>
    %reg = firrtl.reg %clock {firrtl.random_init_start = 0 : ui64} : !firrtl.clock, !firrtl.uint<6>
    %0 = firrtl.add %reg, %c1_ui6 : (!firrtl.uint<6>, !firrtl.uint<6>) -> !firrtl.uint<7>
    %1 = firrtl.bits %0 5 to 0 : (!firrtl.uint<7>) -> !firrtl.uint<6>
    firrtl.matchingconnect %reg, %1 : !firrtl.uint<6>
    firrtl.matchingconnect %io_out, %reg : !firrtl.uint<6>
  }
}

[firtool]   -- Done in 0.000 sec
[firtool]   Running "firrtl-grand-central{companion-mode=bind}"
===- Running GrandCentral ---------------------------------------------------===
Extraction Info:
  <none>
DUT: PLEASE submit a bug report to https://github.com/llvm/circt and include the crash backtrace.
Stack dump:
0.      Program arguments: ./build/bin/firtool bar.mlir -debug -verbose-pass-executions -mlir-print-ir-after-all
 #0 0x0000000000816ed7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /scratch/hidetou/circt-synth/llvm/llvm/lib/Support/Unix/Signals.inc:804:13
 #1 0x0000000000814e10 llvm::sys::RunSignalHandlers() /scratch/hidetou/circt-synth/llvm/llvm/lib/Support/Signals.cpp:106:18
 #2 0x00000000008177ea SignalHandler(int, siginfo_t*, void*) /scratch/hidetou/circt-synth/llvm/llvm/lib/Support/Unix/Signals.inc:0:3
 #3 0x00007f727388fcf0 __restore_rt (/lib64/libpthread.so.0+0x12cf0)
 #4 0x0000000000d5a340 circt::firrtl::InstanceInfo::getDut() /scratch/hidetou/circt-synth/lib/Analysis/FIRRTLInstanceInfo.cpp:228:10
 #5 0x0000000000980504 (anonymous namespace)::GrandCentralPass::runOnOperation() /scratch/hidetou/circt-synth/lib/Dialect/FIRRTL/Transforms/GrandCentral.cpp:1894:3
 #6 0x00000000015e3119 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_7::operator()() const /scratch/hidetou/circt-synth/llvm/mlir/lib/Pass/Pass.cpp:0:17
 #7 0x00000000015e3119 void llvm::function_ref<void ()>::callback_fn<mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int)::$_7>(long) /scratch/hidetou/circt-synth/llvm/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:12
 #8 0x00000000015e3119 llvm::function_ref<void ()>::operator()() const /scratch/hidetou/circt-synth/llvm/llvm/include/llvm/ADT/STLFunctionalExtras.h:69:12
 #9 0x00000000015e3119 void mlir::MLIRContext::executeAction<mlir::PassExecutionAction, mlir::Pass&>(llvm::function_ref<void ()>, llvm::ArrayRef<mlir::IRUnit>, mlir::Pass&) /scratch/hidetou/circt-synth/llvm/mlir/include/mlir/IR/MLIRContext.h:280:7
#10 0x00000000015e3119 mlir::detail::OpToOpPassAdaptor::run(mlir::Pass*, mlir::Operation*, mlir::AnalysisManager, bool, unsigned int) /scratch/hidetou/circt-synth/llvm/mlir/lib/Pass/Pass.cpp:522:21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions