I got a problem using iverilog to produce .lxt files or using gtkwave to
view them. I am not sure what is happening.
I was using iverilog s20030924, and gtkwave v1.3.24. But yestarday after
discovering the problem upgraded to the latest iverilog 0.8. Did not help.
Below is a simple module and a script to build lxt and vvp dumps. vvp dump
looks normal, lxt is wrong.
Is there another lxt viewer to at least identify which program is broken?
Thanks,
Nikolay
//
//
`timescale 1 ns / 1 ns
module test;
reg clk, odd, mux_sel;
reg [15:0] data;
initial {clk, mux_sel, data, odd} = 0;
initial begin
`ifdef USE_LXT
$dumpfile ("test.lxt");
`else
$dumpfile ("test.vcd");
`endif
$dumpvars (0, test);
#150; $finish;
end
always clk = #5 ~clk;
always @(posedge clk) begin
if (odd) begin
mux_sel = 1'b1;
data = data + 1;
end else begin
mux_sel = 1'b0;
end
odd = ~odd;
end
reg [7:0] mux_o;
always @(mux_sel or data) begin
case (mux_sel)
1'b0: mux_o = data [15:8];
1'b1: mux_o = data [7:0];
endcase // case(mus_sel)
$display ("mux_o = %2x at time %t", mux_o, $time);
end
endmodule // test
#/!sh
#
# script to build test.vvp and test.lxt
#
iverilog -DUSE_LXT -Wimplicit ./test.v -o test.vvp
vvp test.vvp -lxt
iverilog -Wimplicit ./test.v -o test.vvp
vvp test.vvp