Project

General

Profile

Actions

Bug #8861

closed

VerilogIeeeTestCase.runTest_12_04_03_1: java.lang.IllegalStateException: BigInteger data is not convertible to Boolean.

Added by Sergey Smolov over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
05/07/2018
Due date:
% Done:

0%

Estimated time:
Detected in build:
master
Platform:
Published in build:

Description

The stack trace:

java.lang.IllegalStateException: BigInteger data is not convertible to Boolean.
    at ru.ispras.fortress.data.Data.checkConvertibleTo(Data.java:516)
    at ru.ispras.fortress.data.Data.getBoolean(Data.java:429)
    at ru.ispras.verilog.parser.elaborator.VerilogElaborator.generate(VerilogElaborator.java:394)
    at ru.ispras.verilog.parser.elaborator.VerilogElaborator.start(VerilogElaborator.java:192)
    at ru.ispras.verilog.parser.VerilogSyntaxBackends.start(VerilogSyntaxBackends.java:56)
    at ru.ispras.verilog.parser.VerilogTranslator.start(VerilogTranslator.java:163)
    at ru.ispras.verilog.parser.sample.VerilogPrinter.main(VerilogPrinter.java:45)
    at ru.ispras.verilog.parser.VerilogIeeeTestCase.runTest(VerilogIeeeTestCase.java:1813)
    at ru.ispras.verilog.parser.VerilogIeeeTestCase.runTest(VerilogIeeeTestCase.java:1799)
    at ru.ispras.verilog.parser.VerilogIeeeTestCase.runTest_12_04_03_1(VerilogIeeeTestCase.java:1094)

The target Verilog module:
// IEEE Std 1364-2005
//   12. Hierarchical structures
//     12.4 Generate constructs
//       12.4.3 External names for unnamed generate blocks
//         Each generate construct in a given scope is assigned a number. The number will be 1 for
//         the construct that appears textually first in that scope and will increase by 1 for each
//         subsequent generate construct in that scope. All unnamed generate blocks will be given
//         the name “genblk<n>” where <n> is the number assigned to its enclosing generate
//         construct. If such a name would conflict with an explicitly declared name, then
//         leading zeroes are added in front of the number until the name does not conflict.

module top;
  parameter genblk2 = 0;
  genvar i;

  // The following generate block is implicitly named genblk1

  if (genblk2) reg a; // top.genblk1.a
  else         reg b; // top.genblk1.b

  // The following generate block is implicitly named genblk02
  // as genblk2 is already a declared identifier

  if (genblk2) reg a; // top.genblk02.a
  else         reg b; // top.genblk02.b

  // The following generate block would have been named genblk3
  // but is explicitly named g1
  for (i = 0; i < 1; i = i + 1) begin : g1
    // block name
    // The following generate block is implicitly named genblk1
    // as the first nested scope inside of g1
    if (1) reg a; // top.g1[0].genblk1.a
  end

  // The following generate block is implicitly named genblk4 since
  // it belongs to the fourth generate construct in scope "top".
  // The previous generate block would have been
  // named genblk3 if it had not been explicitly named g1
  for (i = 0; i < 1; i = i + 1)
    // The following generate block is implicitly named genblk1
    // as the first nested generate block in genblk4
    if (1) reg a; // top.genblk4[0].genblk1.a
    // The following generate block is implicitly named genblk5
    if (1) reg a; // top.genblk5.a
endmodule

Actions #1

Updated by Alexander Kamkin over 6 years ago

  • Status changed from New to Resolved
Actions #2

Updated by Sergey Smolov over 6 years ago

  • Status changed from Resolved to Verified
Actions #3

Updated by Sergey Smolov over 6 years ago

  • Status changed from Verified to Closed
Actions

Also available in: Atom PDF