Bug #8857

VerilogIeeeTestCase.runTest_12_02_02_2_1: java.lang.NullPointerException

Added by Sergey Smolov almost 3 years ago. Updated over 2 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Detected in build:
Published in build:

Updated by Sergey Smolov almost 3 years ago

  • Detected in build changed from svn to master
  • Target version set to 0.1
  • Assignee set to Alexander Kamkin
  • Subject changed from VerilogIeeeTestCase.runTest_05_02_02_2: java.lang.NullPointerException to VerilogIeeeTestCase.runTest_12_02_02_2_1: java.lang.NullPointerException

The stack trace:

    at ru.ispras.verilog.parser.elaborator.VerilogElaborator.defineParameter(
    at ru.ispras.verilog.parser.elaborator.VerilogElaborator.expand(
    at ru.ispras.verilog.parser.elaborator.VerilogElaborator.expand(
    at ru.ispras.verilog.parser.elaborator.VerilogElaborator.start(
    at ru.ispras.verilog.parser.VerilogSyntaxBackends.start(
    at ru.ispras.verilog.parser.VerilogTranslator.start(
    at ru.ispras.verilog.parser.sample.VerilogPrinter.main(
    at ru.ispras.verilog.parser.VerilogIeeeTestCase.runTest(
    at ru.ispras.verilog.parser.VerilogIeeeTestCase.runTest(
    at ru.ispras.verilog.parser.VerilogIeeeTestCase.runTest_12_02_02_2_1(

The target Verilog module:

// IEEE Std 1364-2005
//   12. Hierarchical structures
//     12.2 Overriding module parameter values
//       12.2.2 Module instance parameter value assignment
// Parameter value assignment by name
//           Consider the following example, where both parameters of mod_a and only one parameter
//           of mod_c and mod_d are changed during instantiation.

module tb2;
  wire [9:0] out_a, out_d;
  wire [4:0] out_b, out_c;
  reg  [9:0] in_a, in_d;
  reg  [4:0] in_b, in_c;
  reg        clk;

  // testbench clock & stimulus generation code ...

  // Four instances of vdff with parameter value assignment by name

  // mod_a has new parameter values size=10 and delay=15
  // mod_b has default parameters (size=5, delay=1)
  // mod_c has one default size=5 and one new delay=12
  // mod_d has a new parameter value size=10.
  // delay retains its default value

  vdff #(.size(10),.delay(15)) mod_a (.out(out_a),.in(in_a),.clk(clk));
  vdff                         mod_b (.out(out_b),.in(in_b),.clk(clk));
  vdff #(.delay(12))           mod_c (.out(out_c),.in(in_c),.clk(clk));
  vdff #(.delay( ),.size(10) ) mod_d (.out(out_d),.in(in_d),.clk(clk));

module vdff (out, in, clk);
  parameter size=5, delay=1;
  output [size-1:0] out;
  input  [size-1:0] in;
  input             clk;
  reg    [size-1:0] out;

  always @( posedge clk)
    #delay out = in;


Updated by Alexander Kamkin over 2 years ago

  • Status changed from New to Resolved

Missing values in parameter overrides have been enabled.


Updated by Sergey Smolov over 2 years ago

  • Status changed from Resolved to Verified

Updated by Sergey Smolov over 2 years ago

  • Status changed from Verified to Closed

Also available in: Atom PDF