4848 * Based on Verilog standard IEEE Std 1364-2001 Version C
4949 *
5050 * Supported features:
51- * - $var with 'wire' and 'reg ' types of scalar variables
51+ * - $var with 'wire', 'reg' and 'logic ' types of scalar variables
5252 * - $timescale definition for samplerate
5353 * - multiple character variable identifiers
5454 * - same identifer used for multiple signals (identical values)
@@ -689,7 +689,7 @@ static int parse_scope(struct context *inc, char *contents, gboolean is_up)
689689static int parse_header_var (struct context * inc , char * contents )
690690{
691691 char * type , * size_txt , * id , * ref , * idx ;
692- gboolean is_reg , is_wire , is_real , is_int ;
692+ gboolean is_reg , is_wire , is_logic , is_real , is_int ;
693693 gboolean is_str ;
694694 enum sr_channeltype ch_type ;
695695 size_t size , next_size ;
@@ -713,11 +713,12 @@ static int parse_header_var(struct context *inc, char *contents)
713713
714714 is_reg = g_strcmp0 (type , "reg" ) == 0 ;
715715 is_wire = g_strcmp0 (type , "wire" ) == 0 ;
716+ is_logic = g_strcmp0 (type , "logic" ) == 0 ;
716717 is_real = g_strcmp0 (type , "real" ) == 0 ;
717718 is_int = g_strcmp0 (type , "integer" ) == 0 ;
718719 is_str = g_strcmp0 (type , "string" ) == 0 ;
719720
720- if (is_reg || is_wire ) {
721+ if (is_reg || is_wire || is_logic ) {
721722 ch_type = SR_CHANNEL_LOGIC ;
722723 } else if (is_real || is_int ) {
723724 ch_type = SR_CHANNEL_ANALOG ;
0 commit comments