Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  IPC::Locker
  Parallel::Forker
  Voneline
General Info
  Papers

Issue #1426

Updated by Wilson Snyder 8 months ago

Hi Wilson.

When declaring an enum as:

typedef enum logic[1:0] { ZERO=0, ONE, TWO, THREE } enumed_t; // Not working


GTKwave does not recognize/loads an enumed_t variable as an enum.


However, when replacing logic[2:0] by int, it works.


typedef enum int { ZERO=0, ONE, TWO, THREE } enumed_t; // OK!



Platform: msys2 (Mingw-w64 64 bit), windows 10

Verilator: Verilator 4.012 2019-03-23 rev UNKNOWN_REV

GTKwave: v3.3.100

Example:
<pre>
module example;
typedef enum logic[1:0] { ZERO=0, ONE, TWO, THREE } enumed_t;
enumed_t v_enumed;
always_ff @(posedge aclk)
begin: input_ctrl_p
if (!aresetn) begin
v_enumed <= ZERO;
end else begin
case(v_enumed)
ZERO: begin
v_enumed <= ONE;
end
ONE: begin
v_enumed <= TWO;
end
TWO: begin
v_enumed <= THREE;
end
THREE: begin
THREE <= ZERO;
end
endcase
end
end
endmodule
</pre>

Back