Actions
Bug #8857
closedVerilogIeeeTestCase.runTest_12_02_02_2_1: java.lang.NullPointerException
Start date:
05/07/2018
Due date:
% Done:
0%
Estimated time:
Detected in build:
master
Platform:
Published in build:
Updated by Sergey Smolov over 6 years ago
- Subject changed from VerilogIeeeTestCase.runTest_05_02_02_2: java.lang.NullPointerException to VerilogIeeeTestCase.runTest_12_02_02_2_1: java.lang.NullPointerException
- Assignee set to Alexander Kamkin
- Target version set to 0.1
- Detected in build changed from svn to master
The stack trace:
java.lang.NullPointerException at ru.ispras.verilog.parser.elaborator.VerilogElaborator.defineParameter(VerilogElaborator.java:649) at ru.ispras.verilog.parser.elaborator.VerilogElaborator.expand(VerilogElaborator.java:296) at ru.ispras.verilog.parser.elaborator.VerilogElaborator.expand(VerilogElaborator.java:343) at ru.ispras.verilog.parser.elaborator.VerilogElaborator.start(VerilogElaborator.java:181) 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_02_02_2_1(VerilogIeeeTestCase.java:984)
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
// 12.2.2.2 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));
endmodule
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;
endmodule
Updated by Alexander Kamkin over 6 years ago
- Status changed from New to Resolved
Missing values in parameter overrides have been enabled.
Updated by Sergey Smolov over 6 years ago
- Status changed from Resolved to Verified
Updated by Sergey Smolov over 6 years ago
- Status changed from Verified to Closed
Actions