mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 13:57:18 +02:00
It is an error to select part of a scalar value.
In 1364-2005 it is an explicit error to take the select of a scalar or real value. We added the checks for real a while ago. This patch adds the functionality for scalar values. In the future we may want to push the scalar property to the run time.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#ifndef __PWire_H
|
||||
#define __PWire_H
|
||||
/*
|
||||
* Copyright (c) 1998-2007 Stephen Williams ([email protected])
|
||||
* Copyright (c) 1998-2009 Stephen Williams ([email protected])
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
@@ -70,11 +70,12 @@ class PWire : public LineInfo {
|
||||
void set_signed(bool flag);
|
||||
bool get_signed() const;
|
||||
bool get_isint() const;
|
||||
bool get_scalar() const;
|
||||
|
||||
bool set_data_type(ivl_variable_type_t dt);
|
||||
ivl_variable_type_t get_data_type() const;
|
||||
|
||||
void set_range(PExpr*msb, PExpr*lsb, PWSRType type);
|
||||
void set_range(PExpr*msb, PExpr*lsb, PWSRType type, bool is_scalar);
|
||||
|
||||
void set_memory_idx(PExpr*ldx, PExpr*rdx);
|
||||
|
||||
@@ -104,6 +105,7 @@ class PWire : public LineInfo {
|
||||
PExpr*net_msb_;
|
||||
PExpr*net_lsb_;
|
||||
bool net_set_;
|
||||
bool is_scalar_;
|
||||
unsigned error_cnt_;
|
||||
|
||||
// If this wire is actually a memory, these indices will give
|
||||
|
||||
Reference in New Issue
Block a user