Minor cppcheck updates in vvp and switch vvp to use override for virtual functions

This commit is contained in:
Cary R 2025-07-21 23:30:57 -07:00
parent 8bd9cb14e7
commit db82380cec
45 changed files with 756 additions and 742 deletions

View File

@ -116,6 +116,7 @@ cppcheck: $(O:.o=.cc) draw_tt.c
-UYYPARSE_PARAM -UYYPRINT -Ushort -Usize_t -Uyyoverflow \
-UYYTYPE_INT8 -UYYTYPE_INT16 -UYYTYPE_UINT8 -UYYTYPE_UINT16 \
-UYYSTYPE -UINFINITY -U__SIZE_TYPE__ -Ufree \
-U__PTRDIFF_TYPE__ \
--relative-paths=$(srcdir) $(INCLUDE_PATH) $^
Makefile: $(srcdir)/Makefile.in

View File

@ -1,7 +1,7 @@
#ifndef IVL_arith_H
#define IVL_arith_H
/*
* Copyright (c) 2001-2021 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -38,7 +38,7 @@ class vvp_arith_ : public vvp_net_fun_t {
explicit vvp_arith_(unsigned wid);
void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx);
unsigned base, unsigned vwid, vvp_context_t ctx) override;
protected:
void dispatch_operand_(vvp_net_ptr_t ptr, const vvp_vector4_t&bit);
@ -58,12 +58,12 @@ class vvp_arith_abs : public vvp_net_fun_t {
~vvp_arith_abs();
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_real(vvp_net_ptr_t ptr, double bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx);
unsigned base, unsigned vwid, vvp_context_t ctx) override;
private:
};
@ -74,7 +74,7 @@ class vvp_arith_cast_int : public vvp_net_fun_t {
~vvp_arith_cast_int();
void recv_real(vvp_net_ptr_t ptr, double bit,
vvp_context_t);
vvp_context_t) override;
private:
unsigned wid_;
@ -86,10 +86,10 @@ class vvp_arith_cast_real : public vvp_net_fun_t {
~vvp_arith_cast_real();
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx);
unsigned base, unsigned vwid, vvp_context_t ctx) override;
private:
bool signed_;
@ -101,12 +101,12 @@ class vvp_arith_cast_vec2 : public vvp_net_fun_t {
~vvp_arith_cast_vec2();
void recv_real(vvp_net_ptr_t ptr, double bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx);
unsigned base, unsigned vwid, vvp_context_t ctx) override;
private:
unsigned wid_;
@ -118,7 +118,7 @@ class vvp_arith_div : public vvp_arith_ {
explicit vvp_arith_div(unsigned wid, bool signed_flag);
~vvp_arith_div();
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
private:
void wide4_(vvp_net_ptr_t ptr);
bool signed_flag_;
@ -130,7 +130,7 @@ class vvp_arith_mod : public vvp_arith_ {
explicit vvp_arith_mod(unsigned wid, bool signed_flag);
~vvp_arith_mod();
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
private:
void wide_(vvp_net_ptr_t ptr);
bool signed_flag_;
@ -147,7 +147,7 @@ class vvp_cmp_eeq : public vvp_arith_ {
public:
explicit vvp_cmp_eeq(unsigned wid);
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
@ -156,7 +156,7 @@ class vvp_cmp_nee : public vvp_arith_ {
public:
explicit vvp_cmp_nee(unsigned wid);
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
@ -165,7 +165,7 @@ class vvp_cmp_eq : public vvp_arith_ {
public:
explicit vvp_cmp_eq(unsigned wid);
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
@ -174,7 +174,7 @@ class vvp_cmp_eqx : public vvp_arith_ {
public:
explicit vvp_cmp_eqx(unsigned wid);
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
@ -183,7 +183,7 @@ class vvp_cmp_eqz : public vvp_arith_ {
public:
explicit vvp_cmp_eqz(unsigned wid);
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
@ -192,7 +192,7 @@ class vvp_cmp_ne : public vvp_arith_ {
public:
explicit vvp_cmp_ne(unsigned wid);
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
@ -201,7 +201,7 @@ class vvp_cmp_weq : public vvp_arith_ {
public:
explicit vvp_cmp_weq(unsigned wid);
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
@ -210,7 +210,7 @@ class vvp_cmp_wne : public vvp_arith_ {
public:
explicit vvp_cmp_wne(unsigned wid);
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
@ -238,7 +238,7 @@ class vvp_cmp_ge : public vvp_cmp_gtge_base_ {
explicit vvp_cmp_ge(unsigned wid, bool signed_flag);
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
@ -248,7 +248,7 @@ class vvp_cmp_gt : public vvp_cmp_gtge_base_ {
explicit vvp_cmp_gt(unsigned wid, bool signed_flag);
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
/*
@ -262,7 +262,7 @@ class vvp_arith_mult : public vvp_arith_ {
explicit vvp_arith_mult(unsigned wid);
~vvp_arith_mult();
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
private:
void wide_(vvp_net_ptr_t ptr);
};
@ -273,7 +273,7 @@ class vvp_arith_pow : public vvp_arith_ {
explicit vvp_arith_pow(unsigned wid, bool signed_flag);
~vvp_arith_pow();
void recv_vec4(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
private:
bool signed_flag_;
};
@ -284,7 +284,7 @@ class vvp_arith_sub : public vvp_arith_ {
explicit vvp_arith_sub(unsigned wid);
~vvp_arith_sub();
virtual void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
@ -294,7 +294,7 @@ class vvp_arith_sum : public vvp_arith_ {
explicit vvp_arith_sum(unsigned wid);
~vvp_arith_sum();
virtual void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
@ -304,7 +304,7 @@ class vvp_shiftl : public vvp_arith_ {
explicit vvp_shiftl(unsigned wid);
~vvp_shiftl();
virtual void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
};
class vvp_shiftr : public vvp_arith_ {
@ -313,7 +313,7 @@ class vvp_shiftr : public vvp_arith_ {
explicit vvp_shiftr(unsigned wid, bool signed_flag);
~vvp_shiftr();
virtual void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
private:
bool signed_flag_;
@ -344,7 +344,7 @@ class vvp_arith_sum_real : public vvp_arith_real_ {
explicit vvp_arith_sum_real();
~vvp_arith_sum_real();
void recv_real(vvp_net_ptr_t ptr, double bit,
vvp_context_t);
vvp_context_t) override;
};
class vvp_arith_div_real : public vvp_arith_real_ {
@ -353,7 +353,7 @@ class vvp_arith_div_real : public vvp_arith_real_ {
explicit vvp_arith_div_real();
~vvp_arith_div_real();
void recv_real(vvp_net_ptr_t ptr, double bit,
vvp_context_t);
vvp_context_t) override;
};
class vvp_arith_mod_real : public vvp_arith_real_ {
@ -362,7 +362,7 @@ class vvp_arith_mod_real : public vvp_arith_real_ {
explicit vvp_arith_mod_real();
~vvp_arith_mod_real();
void recv_real(vvp_net_ptr_t ptr, double bit,
vvp_context_t);
vvp_context_t) override;
};
class vvp_arith_mult_real : public vvp_arith_real_ {
@ -371,7 +371,7 @@ class vvp_arith_mult_real : public vvp_arith_real_ {
explicit vvp_arith_mult_real();
~vvp_arith_mult_real();
void recv_real(vvp_net_ptr_t ptr, double bit,
vvp_context_t);
vvp_context_t) override;
};
class vvp_arith_pow_real : public vvp_arith_real_ {
@ -380,7 +380,7 @@ class vvp_arith_pow_real : public vvp_arith_real_ {
explicit vvp_arith_pow_real();
~vvp_arith_pow_real();
void recv_real(vvp_net_ptr_t ptr, double bit,
vvp_context_t);
vvp_context_t) override;
};
class vvp_arith_sub_real : public vvp_arith_real_ {
@ -389,7 +389,7 @@ class vvp_arith_sub_real : public vvp_arith_real_ {
explicit vvp_arith_sub_real();
~vvp_arith_sub_real();
void recv_real(vvp_net_ptr_t ptr, double bit,
vvp_context_t);
vvp_context_t) override;
};
class vvp_cmp_eq_real : public vvp_arith_real_ {
@ -397,7 +397,7 @@ class vvp_cmp_eq_real : public vvp_arith_real_ {
public:
explicit vvp_cmp_eq_real();
void recv_real(vvp_net_ptr_t ptr, const double bit,
vvp_context_t);
vvp_context_t) override;
};
class vvp_cmp_ne_real : public vvp_arith_real_ {
@ -405,7 +405,7 @@ class vvp_cmp_ne_real : public vvp_arith_real_ {
public:
explicit vvp_cmp_ne_real();
void recv_real(vvp_net_ptr_t ptr, const double bit,
vvp_context_t);
vvp_context_t) override;
};
class vvp_cmp_ge_real : public vvp_arith_real_ {
@ -413,7 +413,7 @@ class vvp_cmp_ge_real : public vvp_arith_real_ {
public:
explicit vvp_cmp_ge_real();
void recv_real(vvp_net_ptr_t ptr, const double bit,
vvp_context_t);
vvp_context_t) override;
};
class vvp_cmp_gt_real : public vvp_arith_real_ {
@ -421,7 +421,7 @@ class vvp_cmp_gt_real : public vvp_arith_real_ {
public:
explicit vvp_cmp_gt_real();
void recv_real(vvp_net_ptr_t ptr, const double bit,
vvp_context_t);
vvp_context_t) override;
};
#endif /* IVL_arith_H */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007-2024 Stephen Williams (steve@icarus.com)
* Copyright (c) 2007-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -60,12 +60,12 @@ vvp_array_t array_find(const char*label)
}
struct __vpiArrayVthrA : public __vpiHandle {
int get_type_code(void) const { return vpiMemoryWord; }
int vpi_get(int code);
char* vpi_get_str(int code);
void vpi_get_value(p_vpi_value val);
vpiHandle vpi_put_value(p_vpi_value val, int flags);
vpiHandle vpi_handle(int code);
int get_type_code(void) const override { return vpiMemoryWord; }
int vpi_get(int code) override;
char* vpi_get_str(int code) override;
void vpi_get_value(p_vpi_value val) override;
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
vpiHandle vpi_handle(int code) override;
struct __vpiArray*array;
// If this is set, then use it to get the index value.
@ -97,11 +97,11 @@ struct __vpiArrayVthrA : public __vpiHandle {
struct __vpiArrayVthrAPV : public __vpiHandle {
int get_type_code(void) const { return vpiPartSelect; }
int vpi_get(int code);
char* vpi_get_str(int code);
void vpi_get_value(p_vpi_value val);
vpiHandle vpi_handle(int code);
int get_type_code(void) const override { return vpiPartSelect; }
int vpi_get(int code) override;
char* vpi_get_str(int code) override;
void vpi_get_value(p_vpi_value val) override;
vpiHandle vpi_handle(int code) override;
struct __vpiArray*array;
unsigned word_sel;
@ -1065,10 +1065,10 @@ class vvp_fun_arrayport_sa : public vvp_fun_arrayport {
explicit vvp_fun_arrayport_sa(vvp_array_t mem, vvp_net_t*net, long addr);
~vvp_fun_arrayport_sa();
void check_word_change(unsigned long addr);
void check_word_change(unsigned long addr) override;
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
private:
};
@ -1129,16 +1129,16 @@ class vvp_fun_arrayport_aa : public vvp_fun_arrayport, public automatic_hooks_s
explicit vvp_fun_arrayport_aa(__vpiScope*context_scope, vvp_array_t mem, vvp_net_t*net, long addr);
~vvp_fun_arrayport_aa();
void alloc_instance(vvp_context_t context);
void reset_instance(vvp_context_t context);
void alloc_instance(vvp_context_t context) override;
void reset_instance(vvp_context_t context) override;
#ifdef CHECK_WITH_VALGRIND
void free_instance(vvp_context_t context);
void free_instance(vvp_context_t context) override;
#endif
void check_word_change(unsigned long addr);
void check_word_change(unsigned long addr) override;
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
private:
void check_word_change_(unsigned long addr, vvp_context_t context);
@ -1373,7 +1373,7 @@ class array_resolv_list_t : public resolv_list_s {
}
vvp_array_t*array;
bool resolve(bool mes);
bool resolve(bool mes) override;
private:
};
@ -1398,7 +1398,7 @@ class array_port_resolv_list_t : public resolv_list_s {
vvp_net_t*ptr;
bool use_addr;
long addr;
bool resolve(bool mes);
bool resolve(bool mes) override;
private:
};
@ -1445,7 +1445,7 @@ class array_word_part_callback : public array_word_value_callback {
explicit array_word_part_callback(p_cb_data data);
~array_word_part_callback();
bool test_value_callback_ready(void);
bool test_value_callback_ready(void) override;
private:
char*value_bits_;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014 Stephen Williams (steve@icarus.com)
* Copyright (c) 2014-2025 Stephen Williams (steve@icarus.com)
* Copyright (c) 2014 CERN
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
@ -25,23 +25,23 @@
#include "vpi_priv.h"
struct __vpiArrayIterator : public __vpiHandle {
int get_type_code(void) const
int get_type_code(void) const override
{ return vpiIterator; }
vpiHandle vpi_index(int idx);
free_object_fun_t free_object_fun(void);
vpiHandle vpi_index(int idx) override;
free_object_fun_t free_object_fun(void) override;
struct __vpiArrayBase*array;
unsigned next;
};
struct __vpiArrayIndex : public __vpiHandle {
int get_type_code(void) const
int get_type_code(void) const override
{ return vpiIterator; }
vpiHandle vpi_iterate(int code);
vpiHandle vpi_index(int idx);
free_object_fun_t free_object_fun(void);
vpiHandle vpi_iterate(int code) override;
vpiHandle vpi_index(int idx) override;
free_object_fun_t free_object_fun(void) override;
__vpiDecConst *index;
unsigned done;

View File

@ -38,11 +38,11 @@ class vvp_fun_bufif : public vvp_net_fun_t {
unsigned str0, unsigned str1);
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx);
unsigned base, unsigned vwid, vvp_context_t ctx) override;
void recv_real(vvp_net_ptr_t port, double real,
vvp_context_t ctx);
vvp_context_t ctx) override;
private:
vvp_vector4_t bit_;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2019 Stephen Williams (steve@icarus.com)
* Copyright (c) 2012-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -127,18 +127,18 @@ template <class T> class property_atom : public class_property_t {
inline explicit property_atom(void) { }
~property_atom() { }
size_t instance_size() const { return sizeof(T); }
size_t instance_size() const override { return sizeof(T); }
public:
void construct(char*buf) const
void construct(char*buf) const override
{ T*tmp = reinterpret_cast<T*> (buf+offset_);
*tmp = 0;
}
void set_vec4(char*buf, const vvp_vector4_t&val);
void get_vec4(char*buf, vvp_vector4_t&val);
void set_vec4(char*buf, const vvp_vector4_t&val) override;
void get_vec4(char*buf, vvp_vector4_t&val) override;
void copy(char*dst, char*src);
void copy(char*dst, char*src) override;
};
class property_bit : public class_property_t {
@ -146,21 +146,21 @@ class property_bit : public class_property_t {
explicit inline property_bit(size_t wid): wid_(wid) { }
~property_bit() { }
size_t instance_size() const { return sizeof(vvp_vector2_t); }
size_t instance_size() const override { return sizeof(vvp_vector2_t); }
public:
void construct(char*buf) const
void construct(char*buf) const override
{ new (buf+offset_) vvp_vector2_t (0, wid_); }
void destruct(char*buf) const
void destruct(char*buf) const override
{ vvp_vector2_t*tmp = reinterpret_cast<vvp_vector2_t*>(buf+offset_);
tmp->~vvp_vector2_t();
}
void set_vec4(char*buf, const vvp_vector4_t&val);
void get_vec4(char*buf, vvp_vector4_t&val);
void set_vec4(char*buf, const vvp_vector4_t&val) override;
void get_vec4(char*buf, vvp_vector4_t&val) override;
void copy(char*dst, char*src);
void copy(char*dst, char*src) override;
private:
size_t wid_;
@ -171,21 +171,21 @@ class property_logic : public class_property_t {
explicit inline property_logic(size_t wid): wid_(wid) { }
~property_logic() { }
size_t instance_size() const { return sizeof(vvp_vector4_t); }
size_t instance_size() const override { return sizeof(vvp_vector4_t); }
public:
void construct(char*buf) const
void construct(char*buf) const override
{ new (buf+offset_) vvp_vector4_t (wid_); }
void destruct(char*buf) const
void destruct(char*buf) const override
{ vvp_vector4_t*tmp = reinterpret_cast<vvp_vector4_t*>(buf+offset_);
tmp->~vvp_vector4_t();
}
void set_vec4(char*buf, const vvp_vector4_t&val);
void get_vec4(char*buf, vvp_vector4_t&val);
void set_vec4(char*buf, const vvp_vector4_t&val) override;
void get_vec4(char*buf, vvp_vector4_t&val) override;
void copy(char*dst, char*src);
void copy(char*dst, char*src) override;
private:
size_t wid_;
@ -196,18 +196,18 @@ template <class T> class property_real : public class_property_t {
inline explicit property_real(void) { }
~property_real() { }
size_t instance_size() const { return sizeof(T); }
size_t instance_size() const override { return sizeof(T); }
public:
void construct(char*buf) const
void construct(char*buf) const override
{ T*tmp = reinterpret_cast<T*> (buf+offset_);
*tmp = 0.0;
}
void set_real(char*buf, double val);
double get_real(char*buf);
void set_real(char*buf, double val) override;
double get_real(char*buf) override;
void copy(char*dst, char*src);
void copy(char*dst, char*src) override;
};
class property_string : public class_property_t {
@ -215,21 +215,21 @@ class property_string : public class_property_t {
inline explicit property_string(void) { }
~property_string() { }
size_t instance_size() const { return sizeof(std::string); }
size_t instance_size() const override { return sizeof(std::string); }
public:
void construct(char*buf) const
void construct(char*buf) const override
{ /* string*tmp = */ new (buf+offset_) string; }
void destruct(char*buf) const
void destruct(char*buf) const override
{ string*tmp = reinterpret_cast<string*> (buf+offset_);
tmp->~string();
}
void set_string(char*buf, const string&);
string get_string(char*buf);
void set_string(char*buf, const string&) override;
string get_string(char*buf) override;
void copy(char*dst, char*src);
void copy(char*dst, char*src) override;
};
class property_object : public class_property_t {
@ -237,17 +237,17 @@ class property_object : public class_property_t {
inline explicit property_object(uint64_t as): array_size_(as==0? 1 : as) { }
~property_object() { }
size_t instance_size() const { return array_size_ * sizeof(vvp_object_t); }
size_t instance_size() const override { return array_size_ * sizeof(vvp_object_t); }
public:
void construct(char*buf) const;
void construct(char*buf) const override;
void destruct(char*buf) const;
void destruct(char*buf) const override;
void set_object(char*buf, const vvp_object_t&, uint64_t);
void get_object(char*buf, vvp_object_t&, uint64_t);
void set_object(char*buf, const vvp_object_t&, uint64_t) override;
void get_object(char*buf, vvp_object_t&, uint64_t) override;
void copy(char*dst, char*src);
void copy(char*dst, char*src) override;
private:
size_t array_size_;

View File

@ -1,7 +1,7 @@
#ifndef IVL_class_type_H
#define IVL_class_type_H
/*
* Copyright (c) 2012-2014 Stephen Williams (steve@icarus.com)
* Copyright (c) 2012-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -72,7 +72,7 @@ class class_type : public __vpiHandle {
void copy_property(inst_t dst, size_t idx, inst_t src) const;
public: // VPI related methods
int get_type_code(void) const;
int get_type_code(void) const override;
private:
std::string class_name_;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001-2024 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -508,7 +508,7 @@ struct vvp_net_resolv_list_s: public resolv_list_s {
explicit vvp_net_resolv_list_s(char*l) : resolv_list_s(l) { }
// port to be driven by the located node.
vvp_net_ptr_t port;
virtual bool resolve(bool mes);
virtual bool resolve(bool mes) override;
};
bool vvp_net_resolv_list_s::resolve(bool mes)
@ -546,7 +546,7 @@ struct functor_gen_resolv_list_s: public resolv_list_s {
ref = 0;
}
vvp_net_t**ref;
virtual bool resolve(bool mes);
virtual bool resolve(bool mes) override;
};
bool functor_gen_resolv_list_s::resolve(bool mes)
@ -582,7 +582,7 @@ struct vpi_handle_resolv_list_s: public resolv_list_s {
explicit vpi_handle_resolv_list_s(char*lab) : resolv_list_s(lab) {
handle = NULL;
}
virtual bool resolve(bool mes);
virtual bool resolve(bool mes) override;
vpiHandle *handle;
};
@ -690,7 +690,7 @@ struct code_label_resolv_list_s: public resolv_list_s {
}
struct vvp_code_s *code;
bool cptr2_flag;
virtual bool resolve(bool mes);
virtual bool resolve(bool mes) override;
};
bool code_label_resolv_list_s::resolve(bool mes)
@ -725,7 +725,7 @@ struct code_array_resolv_list_s: public resolv_list_s {
code = NULL;
}
struct vvp_code_s *code;
virtual bool resolve(bool mes);
virtual bool resolve(bool mes) override;
};
bool code_array_resolv_list_s::resolve(bool mes)

View File

@ -1,7 +1,7 @@
#ifndef IVL_concat_H
#define IVL_concat_H
/*
* Copyright (c) 2004-2024 Stephen Williams (steve@icarus.com)
* Copyright (c) 2004-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -89,7 +89,7 @@ class vvp_fun_repeat : public vvp_net_fun_t {
~vvp_fun_repeat();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned int base, unsigned int vwid,
vvp_context_t context) final;

View File

@ -8,7 +8,7 @@ unusedFunction:vpi_priv.cc:193
// vpi_compare_objects()
unusedFunction:vpi_priv.cc:209
// vpi_control()
unusedFunction:vpi_priv.cc:1628
unusedFunction:vpi_priv.cc:1913
// vpi_flush()
unusedFunction:vpi_priv.cc:1519
// vpi_fopen()
@ -42,6 +42,18 @@ unusedFunction:vpi_tasks.cc:990
// vpi_remove_cb()
unusedFunction:vpi_callback.cc:601
// vpi_sim_control()
unusedFunction:vpi_priv.cc:1620
unusedFunction:vpi_priv.cc:1904
// vpi_vprintf()
unusedFunction:vpi_priv.cc:1505
// The following are used in the embedded version of iverilog.
// vvp_init()
unusedFunction:lib_main.cc:275
// vvp_run()
unusedFunction:lib_main.cc:339
// vvp_set_quiet_flag()
unusedFunction:lib_main.cc:71
// vvp_set_stop_is_finish()
unusedFunction:lib_main.cc:62
// vvp_set_verbose_flag()
unusedFunction:lib_main.cc:76

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2024 Stephen Williams <steve@icarus.com>
* Copyright (c) 2005-2025 Stephen Williams <steve@icarus.com>
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -542,7 +542,7 @@ void vvp_fun_modpath::add_modpath_src(vvp_fun_modpath_src*that, bool ifnone)
}
static vvp_time64_t delay_from_edge(vvp_bit4_t a, vvp_bit4_t b,
vvp_time64_t array[12])
vvp_time64_t const array[12])
{
typedef delay_edge_t bit4_table4[4];
static const bit4_table4 edge_table[4] = {
@ -680,7 +680,7 @@ void vvp_fun_modpath::run_run()
net_->send_vec4(cur_vec4_, 0);
}
vvp_fun_modpath_src::vvp_fun_modpath_src(vvp_time64_t del[12])
vvp_fun_modpath_src::vvp_fun_modpath_src(vvp_time64_t const del[12])
{
for (unsigned idx = 0 ; idx < 12 ; idx += 1)
delay_[idx] = del[idx];

View File

@ -1,7 +1,7 @@
#ifndef IVL_delay_H
#define IVL_delay_H
/*
* Copyright 2005-2016 Stephen Williams
* Copyright 2005-2025 Stephen Williams
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -93,18 +93,18 @@ class vvp_fun_delay : public vvp_net_fun_t, private vvp_gen_event_s {
~vvp_fun_delay();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit);
vvp_context_t) override;
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) override;
void recv_real(vvp_net_ptr_t port, double bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx);
unsigned base, unsigned vwid, vvp_context_t ctx) override;
void recv_vec8_pv(vvp_net_ptr_t ptr, const vvp_vector8_t&bit,
unsigned base, unsigned vwid);
unsigned base, unsigned vwid) override;
private:
virtual void run_run();
virtual void run_run() override;
void run_run_vec4_(struct vvp_fun_delay::event_*cur);
@ -172,10 +172,10 @@ class vvp_fun_modpath : public vvp_net_fun_t, private vvp_gen_event_s {
void add_modpath_src(vvp_fun_modpath_src*that, bool ifnone);
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
private:
virtual void run_run();
virtual void run_run() override;
private:
vvp_net_t*net_;
@ -195,13 +195,13 @@ class vvp_fun_modpath_src : public vvp_net_fun_t {
friend class vvp_fun_modpath;
public:
explicit vvp_fun_modpath_src(vvp_time64_t d[12]);
explicit vvp_fun_modpath_src(vvp_time64_t const del[12]);
protected:
~vvp_fun_modpath_src();
public:
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
virtual bool test_vec4(const vvp_vector4_t&bit);
void get_delay12(vvp_time64_t out[12]) const;
@ -226,7 +226,7 @@ class vvp_fun_modpath_edge : public vvp_fun_modpath_src {
public:
vvp_fun_modpath_edge(vvp_time64_t del[12], bool pos, bool neg);
bool test_vec4(const vvp_vector4_t&bit);
bool test_vec4(const vvp_vector4_t&bit) override;
private:
vvp_bit4_t old_value_;
@ -246,13 +246,13 @@ class vvp_fun_intermodpath : public vvp_net_fun_t, private vvp_gen_event_s {
~vvp_fun_intermodpath();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void get_delay12(vvp_time64_t out[12]) const;
void put_delay12(const vvp_time64_t in[12]);
private:
virtual void run_run();
void run_run() override;
private:
vvp_net_t*net_;

View File

@ -1,7 +1,7 @@
#ifndef IVL_dff_H
#define IVL_dff_H
/*
* Copyright (c) 2005-2016 Stephen Williams (steve@icarus.com)
* Copyright (c) 2005-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -42,10 +42,10 @@ class vvp_dff : public vvp_net_fun_t {
~vvp_dff();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx);
unsigned base, unsigned vwid, vvp_context_t ctx) override;
private:
virtual void recv_async(vvp_net_ptr_t port);
@ -68,7 +68,7 @@ class vvp_dff_aclr : public vvp_dff {
explicit vvp_dff_aclr(unsigned width, bool negedge);
private:
void recv_async(vvp_net_ptr_t port);
void recv_async(vvp_net_ptr_t port) override;
};
/*
@ -80,7 +80,7 @@ class vvp_dff_aset : public vvp_dff {
explicit vvp_dff_aset(unsigned width, bool negedge);
private:
void recv_async(vvp_net_ptr_t port);
void recv_async(vvp_net_ptr_t port) override;
};
/*
@ -93,7 +93,7 @@ class vvp_dff_asc : public vvp_dff {
explicit vvp_dff_asc(unsigned width, bool negedge, char*asc_value);
private:
void recv_async(vvp_net_ptr_t port);
void recv_async(vvp_net_ptr_t port) override;
vvp_vector4_t asc_value_;
};

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010-2021 Stephen Williams (steve@icarus.com)
* Copyright (c) 2010-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -29,10 +29,10 @@ using namespace std;
struct enumconst_s : public __vpiHandle {
enumconst_s();
int get_type_code(void) const;
int vpi_get(int code);
char* vpi_get_str(int code);
void vpi_get_value(p_vpi_value val);
int get_type_code(void) const override;
int vpi_get(int code) override;
char* vpi_get_str(int code) override;
void vpi_get_value(p_vpi_value val) override;
const char*name;
vvp_vector2_t val2;
@ -41,9 +41,9 @@ struct enumconst_s : public __vpiHandle {
struct __vpiEnumTypespec : public __vpiHandle {
__vpiEnumTypespec();
int get_type_code(void) const;
int vpi_get(int code);
vpiHandle vpi_iterate(int code);
int get_type_code(void) const override;
int vpi_get(int code) override;
vpiHandle vpi_iterate(int code) override;
std::vector<enumconst_s> names;
int base_type_code;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2004-2021 Stephen Williams (steve@icarus.com)
* Copyright (c) 2004-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -372,11 +372,11 @@ class anyedge_vec4_value : public anyedge_value {
anyedge_vec4_value() {};
virtual ~anyedge_vec4_value() {};
void reset() { old_bits.set_to_x(); }
void reset() override { old_bits.set_to_x(); }
void set(const vvp_vector4_t&bit) { old_bits = bit; };
void duplicate(anyedge_value*&dup);
void duplicate(anyedge_value*&dup) override;
bool recv_vec4(const vvp_vector4_t&bit);
@ -404,11 +404,11 @@ class anyedge_real_value : public anyedge_value {
anyedge_real_value() : old_bits(0.0) {};
virtual ~anyedge_real_value() {};
void reset() { old_bits = 0.0; }
void reset() override { old_bits = 0.0; }
void set(double bit) { old_bits = bit; };
void duplicate(anyedge_value*&dup);
void duplicate(anyedge_value*&dup) override;
bool recv_real(double bit);
@ -433,11 +433,11 @@ class anyedge_string_value : public anyedge_value {
anyedge_string_value() {};
virtual ~anyedge_string_value() {};
void reset() { old_bits.clear(); }
void reset() override { old_bits.clear(); }
void set(const std::string&bit) { old_bits = bit; };
void duplicate(anyedge_value*&dup);
void duplicate(anyedge_value*&dup) override;
bool recv_string(const std::string&bit);

View File

@ -1,7 +1,7 @@
#ifndef IVL_event_H
#define IVL_event_H
/*
* Copyright (c) 2004-2021 Stephen Williams (steve@icarus.com)
* Copyright (c) 2004-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -43,7 +43,7 @@ class evctl_real : public evctl {
explicit evctl_real(class __vpiHandle*handle, double value,
unsigned long ecount);
virtual ~evctl_real() {}
void run_run();
void run_run() override;
private:
class __vpiHandle*handle_;
@ -56,7 +56,7 @@ class evctl_vector : public evctl {
explicit evctl_vector(vvp_net_ptr_t ptr, const vvp_vector4_t&value,
unsigned off, unsigned wid, unsigned long ecount);
virtual ~evctl_vector() {}
void run_run();
void run_run() override;
private:
vvp_net_ptr_t ptr_;
@ -72,7 +72,7 @@ class evctl_array : public evctl {
const vvp_vector4_t&value, unsigned off,
unsigned long ecount);
virtual ~evctl_array() {}
virtual void run_run();
virtual void run_run() override;
private:
vvp_array_t mem_;
@ -87,7 +87,7 @@ class evctl_array_r : public evctl {
explicit evctl_array_r(vvp_array_t memory, unsigned index,
double value, unsigned long ecount);
virtual ~evctl_array_r() {}
virtual void run_run();
virtual void run_run() override;
private:
vvp_array_t mem_;
@ -180,12 +180,12 @@ class vvp_fun_edge_sa : public vvp_fun_edge {
explicit vvp_fun_edge_sa(edge_t e);
virtual ~vvp_fun_edge_sa();
vthread_t add_waiting_thread(vthread_t thread);
vthread_t add_waiting_thread(vthread_t thread) override;
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t context);
unsigned base, unsigned vwid, vvp_context_t context) override;
private:
vthread_t threads_;
@ -200,16 +200,16 @@ class vvp_fun_edge_aa : public vvp_fun_edge, public automatic_hooks_s {
explicit vvp_fun_edge_aa(edge_t e);
virtual ~vvp_fun_edge_aa();
void alloc_instance(vvp_context_t context);
void reset_instance(vvp_context_t context);
void alloc_instance(vvp_context_t context) override;
void reset_instance(vvp_context_t context) override;
#ifdef CHECK_WITH_VALGRIND
void free_instance(vvp_context_t context);
void free_instance(vvp_context_t context) override;
#endif
vthread_t add_waiting_thread(vthread_t thread);
vthread_t add_waiting_thread(vthread_t thread) override;
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
private:
__vpiScope*context_scope_;
@ -251,20 +251,20 @@ class vvp_fun_anyedge_sa : public vvp_fun_anyedge {
explicit vvp_fun_anyedge_sa();
virtual ~vvp_fun_anyedge_sa();
vthread_t add_waiting_thread(vthread_t thread);
vthread_t add_waiting_thread(vthread_t thread) override;
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t context);
unsigned base, unsigned vwid, vvp_context_t context) override;
void recv_real(vvp_net_ptr_t port, double bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_string(vvp_net_ptr_t port, const std::string&bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_object(vvp_net_ptr_t port, vvp_object_t bit,
vvp_context_t context);
vvp_context_t context) override;
private:
vthread_t threads_;
@ -279,22 +279,22 @@ class vvp_fun_anyedge_aa : public vvp_fun_anyedge, public automatic_hooks_s {
explicit vvp_fun_anyedge_aa();
virtual ~vvp_fun_anyedge_aa();
void alloc_instance(vvp_context_t context);
void reset_instance(vvp_context_t context);
void alloc_instance(vvp_context_t context) override;
void reset_instance(vvp_context_t context) override;
#ifdef CHECK_WITH_VALGRIND
void free_instance(vvp_context_t context);
void free_instance(vvp_context_t context) override;
#endif
vthread_t add_waiting_thread(vthread_t thread);
vthread_t add_waiting_thread(vthread_t thread) override;
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_real(vvp_net_ptr_t port, double bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_string(vvp_net_ptr_t port, const std::string&bit,
vvp_context_t context);
vvp_context_t context) override;
private:
__vpiScope*context_scope_;
@ -326,10 +326,10 @@ class vvp_fun_event_or_sa : public vvp_fun_event_or {
explicit vvp_fun_event_or_sa(vvp_net_t*base_net);
~vvp_fun_event_or_sa();
vthread_t add_waiting_thread(vthread_t thread);
vthread_t add_waiting_thread(vthread_t thread) override;
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
private:
vthread_t threads_;
@ -344,16 +344,16 @@ class vvp_fun_event_or_aa : public vvp_fun_event_or, public automatic_hooks_s {
explicit vvp_fun_event_or_aa(vvp_net_t*base_net);
~vvp_fun_event_or_aa();
void alloc_instance(vvp_context_t context);
void reset_instance(vvp_context_t context);
void alloc_instance(vvp_context_t context) override;
void reset_instance(vvp_context_t context) override;
#ifdef CHECK_WITH_VALGRIND
void free_instance(vvp_context_t context);
void free_instance(vvp_context_t context) override;
#endif
vthread_t add_waiting_thread(vthread_t thread);
vthread_t add_waiting_thread(vthread_t thread) override;
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
private:
__vpiScope*context_scope_;
@ -384,10 +384,10 @@ class vvp_named_event_sa : public vvp_named_event {
explicit vvp_named_event_sa(class __vpiHandle*eh);
~vvp_named_event_sa();
vthread_t add_waiting_thread(vthread_t thread);
vthread_t add_waiting_thread(vthread_t thread) override;
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
private:
vthread_t threads_;
@ -402,16 +402,16 @@ class vvp_named_event_aa : public vvp_named_event, public automatic_hooks_s {
explicit vvp_named_event_aa(class __vpiHandle*eh);
~vvp_named_event_aa();
void alloc_instance(vvp_context_t context);
void reset_instance(vvp_context_t context);
void alloc_instance(vvp_context_t context) override;
void reset_instance(vvp_context_t context) override;
#ifdef CHECK_WITH_VALGRIND
void free_instance(vvp_context_t context);
void free_instance(vvp_context_t context) override;
#endif
vthread_t add_waiting_thread(vthread_t thread);
vthread_t add_waiting_thread(vthread_t thread) override;
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
private:
unsigned context_idx_;

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2011-2021 Cary R. (cygcary@yahoo.com)
* Copyright (C) 2011-2025 Cary R. (cygcary@yahoo.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -22,9 +22,9 @@
class __vpiFileLine : public __vpiHandle {
public:
explicit __vpiFileLine(const char*desc_, long file_idx_, long lineno_);
int get_type_code(void) const;
int vpi_get(int code);
char* vpi_get_str(int code);
int get_type_code(void) const override;
int vpi_get(int code) override;
char* vpi_get_str(int code) override;
const char* get_description() const { return description; };
unsigned get_file_idx() const { return file_idx; };

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008-2024 Stephen Williams (steve@icarus.com)
* Copyright (c) 2008-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -30,9 +30,9 @@ using namespace std;
class vvp_island_tran : public vvp_island {
public:
void run_island();
void run_island() override;
void count_drivers(vvp_island_port*port, unsigned bit_idx,
unsigned counts[3]);
unsigned counts[3]) override;
};
enum tran_state_t {

View File

@ -1,7 +1,7 @@
#ifndef IVL_latch_H
#define IVL_latch_H
/*
* Copyright (c) 2016 Martin Whitaker (icarus@martin-whitaker.me.uk)
* Copyright (c) 2016-2025 Martin Whitaker (icarus@martin-whitaker.me.uk)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -35,10 +35,10 @@ class vvp_latch : public vvp_net_fun_t {
~vvp_latch();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx);
unsigned base, unsigned vwid, vvp_context_t ctx) override;
private:
vvp_bit4_t en_;

View File

@ -341,6 +341,7 @@ int vvp_run(const char *design_path)
struct rusage cycles[3];
int ret_cd;
(void) COPYRIGHT;
if (vvp_used++ != 1) {
if (vvp_used == 1)
fprintf(stderr, "vvp_init() has not been called\n");

View File

@ -33,11 +33,11 @@ class vvp_fun_boolean_ : public vvp_net_fun_t, protected vvp_gen_event_s {
~vvp_fun_boolean_();
void recv_vec4(vvp_net_ptr_t p, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t p, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t);
unsigned base, unsigned vwid, vvp_context_t) override;
void recv_real(vvp_net_ptr_t p, double real,
vvp_context_t);
vvp_context_t) override;
protected:
vvp_vector4_t input_[4];
@ -51,7 +51,7 @@ class vvp_fun_and : public vvp_fun_boolean_ {
~vvp_fun_and();
private:
void run_run();
void run_run() override;
bool invert_;
};
@ -62,7 +62,7 @@ class vvp_fun_equiv : public vvp_fun_boolean_ {
~vvp_fun_equiv();
private:
void run_run();
void run_run() override;
};
class vvp_fun_impl : public vvp_fun_boolean_ {
@ -72,7 +72,7 @@ class vvp_fun_impl : public vvp_fun_boolean_ {
~vvp_fun_impl();
private:
void run_run();
void run_run() override;
};
/*
@ -85,11 +85,11 @@ class vvp_fun_buf_not_ : public vvp_net_fun_t, protected vvp_gen_event_s {
~vvp_fun_buf_not_();
void recv_vec4(vvp_net_ptr_t p, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t p, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t);
unsigned base, unsigned vwid, vvp_context_t) override;
void recv_real(vvp_net_ptr_t p, double real,
vvp_context_t ctx);
vvp_context_t ctx) override;
protected:
vvp_vector4_t input_;
@ -109,7 +109,7 @@ class vvp_fun_buf: public vvp_fun_buf_not_ {
virtual ~vvp_fun_buf();
private:
void run_run();
void run_run() override;
};
/*
@ -123,12 +123,12 @@ class vvp_fun_bufz: public vvp_net_fun_t {
virtual ~vvp_fun_bufz();
void recv_vec4(vvp_net_ptr_t p, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t p, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t);
unsigned base, unsigned vwid, vvp_context_t) override;
//void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit);
void recv_real(vvp_net_ptr_t p, double bit,
vvp_context_t);
vvp_context_t) override;
private:
};
@ -140,7 +140,7 @@ class vvp_fun_bufz: public vvp_net_fun_t {
class vvp_fun_buft: public vvp_fun_bufz {
public:
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit);
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) override;
private:
};
@ -164,12 +164,12 @@ class vvp_fun_muxz : public vvp_net_fun_t, private vvp_gen_event_s {
virtual ~vvp_fun_muxz();
void recv_vec4(vvp_net_ptr_t p, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t p, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t);
unsigned base, unsigned vwid, vvp_context_t) override;
private:
void run_run();
void run_run() override;
private:
vvp_vector4_t a_;
@ -186,12 +186,12 @@ class vvp_fun_muxr : public vvp_net_fun_t, private vvp_gen_event_s {
virtual ~vvp_fun_muxr();
void recv_vec4(vvp_net_ptr_t p, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_real(vvp_net_ptr_t p, double bit,
vvp_context_t);
vvp_context_t) override;
private:
void run_run();
void run_run() override;
private:
double a_;
@ -207,7 +207,7 @@ class vvp_fun_not: public vvp_fun_buf_not_ {
virtual ~vvp_fun_not();
private:
void run_run();
void run_run() override;
};
class vvp_fun_or : public vvp_fun_boolean_ {
@ -217,7 +217,7 @@ class vvp_fun_or : public vvp_fun_boolean_ {
~vvp_fun_or();
private:
void run_run();
void run_run() override;
bool invert_;
};
@ -228,7 +228,7 @@ class vvp_fun_xor : public vvp_fun_boolean_ {
~vvp_fun_xor();
private:
void run_run();
void run_run() override;
bool invert_;
};

View File

@ -48,14 +48,14 @@ class vvp_fun_pmos_ : public vvp_net_fun_t {
public:
explicit vvp_fun_pmos_(bool enable_invert, bool resistive);
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx);
void recv_vec8_pv(vvp_net_ptr_t ptr, const vvp_vector8_t&bit,
unsigned base, unsigned vwid);
void recv_real(vvp_net_ptr_t port, double real,
vvp_context_t ctx);
virtual void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t) override;
virtual void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx) override;
virtual void recv_vec8_pv(vvp_net_ptr_t ptr, const vvp_vector8_t&bit,
unsigned base, unsigned vwid) override;
virtual void recv_real(vvp_net_ptr_t port, double real,
vvp_context_t ctx) override;
protected:
void generate_output_(vvp_net_ptr_t port);
@ -70,7 +70,7 @@ class vvp_fun_pmos : public vvp_fun_pmos_ {
public:
explicit vvp_fun_pmos(bool enable_invert);
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit);
virtual void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) override;
};
/*
@ -83,7 +83,7 @@ class vvp_fun_rpmos : public vvp_fun_pmos_ {
public:
explicit vvp_fun_rpmos(bool enable_invert);
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit);
virtual void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) override;
};
/*
@ -111,14 +111,14 @@ class vvp_fun_cmos_ : public vvp_net_fun_t {
public:
explicit vvp_fun_cmos_(bool resistive);
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx);
void recv_vec8_pv(vvp_net_ptr_t ptr, const vvp_vector8_t&bit,
unsigned base, unsigned vwid);
void recv_real(vvp_net_ptr_t port, double real,
vvp_context_t);
virtual void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t) override;
virtual void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx) override;
virtual void recv_vec8_pv(vvp_net_ptr_t ptr, const vvp_vector8_t&bit,
unsigned base, unsigned vwid) override;
virtual void recv_real(vvp_net_ptr_t port, double real,
vvp_context_t) override;
protected:
void generate_output_(vvp_net_ptr_t port);
@ -133,14 +133,14 @@ class vvp_fun_cmos : public vvp_fun_cmos_ {
public:
explicit vvp_fun_cmos();
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit);
virtual void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) override;
};
class vvp_fun_rcmos : public vvp_fun_cmos_ {
public:
explicit vvp_fun_rcmos();
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit);
virtual void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) override;
};
#endif /* IVL_npmos_H */

View File

@ -1,7 +1,7 @@
#ifndef IVL_part_H
#define IVL_part_H
/*
* Copyright (c) 2005-2014 Stephen Williams (steve@icarus.com)
* Copyright (c) 2005-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -53,13 +53,13 @@ class vvp_fun_part_sa : public vvp_fun_part, public vvp_gen_event_s {
public:
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t);
unsigned base, unsigned vwid, vvp_context_t) override;
private:
void run_run();
void run_run() override;
private:
vvp_vector4_t val_;
@ -76,17 +76,17 @@ class vvp_fun_part_aa : public vvp_fun_part, public automatic_hooks_s {
~vvp_fun_part_aa();
public:
void alloc_instance(vvp_context_t context);
void reset_instance(vvp_context_t context);
void alloc_instance(vvp_context_t context) override;
void reset_instance(vvp_context_t context) override;
#ifdef CHECK_WITH_VALGRIND
void free_instance(vvp_context_t context);
void free_instance(vvp_context_t context) override;
#endif
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t context);
unsigned base, unsigned vwid, vvp_context_t context) override;
private:
__vpiScope*context_scope_;
@ -108,12 +108,12 @@ class vvp_fun_part_pv : public vvp_net_fun_t {
public:
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t);
unsigned base, unsigned vwid, vvp_context_t) override;
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit);
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) override;
private:
unsigned base_;
@ -152,10 +152,10 @@ class vvp_fun_part_var_sa : public vvp_fun_part_var {
public:
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t);
unsigned base, unsigned vwid, vvp_context_t) override;
private:
int base_;
@ -174,17 +174,17 @@ class vvp_fun_part_var_aa : public vvp_fun_part_var, public automatic_hooks_s {
~vvp_fun_part_var_aa();
public:
void alloc_instance(vvp_context_t context);
void reset_instance(vvp_context_t context);
void alloc_instance(vvp_context_t context) override;
void reset_instance(vvp_context_t context) override;
#ifdef CHECK_WITH_VALGRIND
void free_instance(vvp_context_t context);
void free_instance(vvp_context_t context) override;
#endif
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t context);
unsigned base, unsigned vwid, vvp_context_t context) override;
private:
__vpiScope*context_scope_;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2016 Stephen Williams (steve@icarus.com)
* Copyright (c) 2005-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -38,9 +38,9 @@ class vvp_reduce_base : public vvp_net_fun_t {
virtual ~vvp_reduce_base();
void recv_vec4(vvp_net_ptr_t prt, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t context);
unsigned base, unsigned vwid, vvp_context_t context) override;
virtual vvp_bit4_t calculate_result() const =0;
@ -84,7 +84,7 @@ class vvp_reduce_and : public vvp_reduce_base {
public:
vvp_reduce_and();
~vvp_reduce_and();
vvp_bit4_t calculate_result() const;
vvp_bit4_t calculate_result() const override;
};
vvp_reduce_and::vvp_reduce_and()
@ -110,7 +110,7 @@ class vvp_reduce_or : public vvp_reduce_base {
public:
vvp_reduce_or();
~vvp_reduce_or();
vvp_bit4_t calculate_result() const;
vvp_bit4_t calculate_result() const override;
};
vvp_reduce_or::vvp_reduce_or()
@ -136,7 +136,7 @@ class vvp_reduce_xor : public vvp_reduce_base {
public:
vvp_reduce_xor();
~vvp_reduce_xor();
vvp_bit4_t calculate_result() const;
vvp_bit4_t calculate_result() const override;
};
vvp_reduce_xor::vvp_reduce_xor()
@ -162,7 +162,7 @@ class vvp_reduce_nand : public vvp_reduce_base {
public:
vvp_reduce_nand();
~vvp_reduce_nand();
vvp_bit4_t calculate_result() const;
vvp_bit4_t calculate_result() const override;
};
vvp_reduce_nand::vvp_reduce_nand()
@ -188,7 +188,7 @@ class vvp_reduce_nor : public vvp_reduce_base {
public:
vvp_reduce_nor();
~vvp_reduce_nor();
vvp_bit4_t calculate_result() const;
vvp_bit4_t calculate_result() const override;
};
vvp_reduce_nor::vvp_reduce_nor()
@ -214,7 +214,7 @@ class vvp_reduce_xnor : public vvp_reduce_base {
public:
vvp_reduce_xnor();
~vvp_reduce_xnor();
vvp_bit4_t calculate_result() const;
vvp_bit4_t calculate_result() const override;
};
vvp_reduce_xnor::vvp_reduce_xnor()

View File

@ -1,7 +1,7 @@
#ifndef IVL_resolv_H
#define IVL_resolv_H
/*
* Copyright (c) 2001-2014 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -37,18 +37,18 @@ class resolv_core : public vvp_net_fun_t {
virtual ~resolv_core();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t)
vvp_context_t) override
{ recv_vec4_(port.port(), bit); }
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit)
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) override
{ recv_vec8_(port.port(), bit); }
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t)
unsigned base, unsigned vwid, vvp_context_t) override
{ recv_vec4_pv_(port.port(), bit, base, vwid); }
void recv_vec8_pv(vvp_net_ptr_t port, const vvp_vector8_t&bit,
unsigned base, unsigned vwid)
unsigned base, unsigned vwid) override
{ recv_vec8_pv_(port.port(), bit, base, vwid); }
virtual void count_drivers(unsigned bit_idx, unsigned counts[3]) =0;
@ -75,19 +75,19 @@ class resolv_extend : public vvp_net_fun_t {
~resolv_extend();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t)
vvp_context_t) override
{ core_->recv_vec4_(port_base_ + port.port(), bit); }
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit)
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) override
{ core_->recv_vec8_(port_base_ + port.port(), bit); }
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t)
unsigned base, unsigned vwid, vvp_context_t) override
{ core_->recv_vec4_pv_(port_base_ + port.port(), bit,
base, vwid); }
void recv_vec8_pv(vvp_net_ptr_t port, const vvp_vector8_t&bit,
unsigned base, unsigned vwid)
unsigned base, unsigned vwid) override
{ core_->recv_vec8_pv_(port_base_ + port.port(), bit,
base, vwid); }
@ -115,11 +115,11 @@ class resolv_tri : public resolv_core {
vvp_scalar_t hiz_value);
~resolv_tri();
void count_drivers(unsigned bit_idx, unsigned counts[3]);
void count_drivers(unsigned bit_idx, unsigned counts[3]) override;
private:
void recv_vec4_(unsigned port, const vvp_vector4_t&bit);
void recv_vec8_(unsigned port, const vvp_vector8_t&bit);
void recv_vec4_(unsigned port, const vvp_vector4_t&bit) override;
void recv_vec8_(unsigned port, const vvp_vector8_t&bit) override;
private:
// The puller value to be used when a bit is not driven.
@ -143,14 +143,14 @@ class resolv_wired_logic : public resolv_core {
explicit resolv_wired_logic(unsigned nports, vvp_net_t*net);
virtual ~resolv_wired_logic();
void count_drivers(unsigned bit_idx, unsigned counts[3]);
void count_drivers(unsigned bit_idx, unsigned counts[3]) override;
protected:
virtual vvp_vector4_t wired_logic_math_(vvp_vector4_t&a, vvp_vector4_t&b) =0;
private:
void recv_vec4_(unsigned port, const vvp_vector4_t&bit);
void recv_vec8_(unsigned port, const vvp_vector8_t&bit);
void recv_vec4_(unsigned port, const vvp_vector4_t&bit) override;
void recv_vec8_(unsigned port, const vvp_vector8_t&bit) override;
private:
// The array of input values.
@ -164,7 +164,7 @@ class resolv_triand : public resolv_wired_logic {
~resolv_triand();
private:
virtual vvp_vector4_t wired_logic_math_(vvp_vector4_t&a, vvp_vector4_t&b);
virtual vvp_vector4_t wired_logic_math_(vvp_vector4_t&a, vvp_vector4_t&b) override;
};
class resolv_trior : public resolv_wired_logic {
@ -174,7 +174,7 @@ class resolv_trior : public resolv_wired_logic {
~resolv_trior();
private:
virtual vvp_vector4_t wired_logic_math_(vvp_vector4_t&a, vvp_vector4_t&b);
virtual vvp_vector4_t wired_logic_math_(vvp_vector4_t&a, vvp_vector4_t&b) override;
};
#endif /* IVL_resolv_H */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001-2021 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -116,8 +116,8 @@ void vvp_gen_event_s::single_step_display(void)
*/
struct vthread_event_s : public event_s {
vthread_t thr;
void run_run(void);
void single_step_display(void);
void run_run(void) override;
void single_step_display(void) override;
static void* operator new(size_t);
static void operator delete(void*);
@ -153,8 +153,8 @@ void vthread_event_s::operator delete(void*dptr)
struct del_thr_event_s : public event_s {
vthread_t thr;
void run_run(void);
void single_step_display(void);
void run_run(void) override;
void single_step_display(void) override;
};
void del_thr_event_s::run_run(void)
@ -184,8 +184,8 @@ struct assign_vector4_event_s : public event_s {
unsigned base;
/* Width of the destination vector. */
unsigned vwid;
void run_run(void);
void single_step_display(void);
void run_run(void) override;
void single_step_display(void) override;
static void* operator new(size_t);
static void operator delete(void*);
@ -225,8 +225,8 @@ unsigned long count_assign4_pool(void) { return assign4_heap.pool; }
struct assign_vector8_event_s : public event_s {
vvp_net_ptr_t ptr;
vvp_vector8_t val;
void run_run(void);
void single_step_display(void);
void run_run(void) override;
void single_step_display(void) override;
static void* operator new(size_t);
static void operator delete(void*);
@ -262,8 +262,8 @@ unsigned long count_assign8_pool() { return assign8_heap.pool; }
struct assign_real_event_s : public event_s {
vvp_net_ptr_t ptr;
double val;
void run_run(void);
void single_step_display(void);
void run_run(void) override;
void single_step_display(void) override;
static void* operator new(size_t);
static void operator delete(void*);
@ -301,7 +301,7 @@ struct assign_array_word_s : public event_s {
unsigned adr;
vvp_vector4_t val;
unsigned off;
void run_run(void);
void run_run(void) override;
static void* operator new(size_t);
static void operator delete(void*);
@ -345,8 +345,8 @@ struct force_vector4_event_s : public event_s {
/* Width of the destination vector. */
unsigned vwid;
void run_run(void);
void single_step_display(void);
void run_run(void) override;
void single_step_display(void) override;
static void* operator new(size_t);
static void operator delete(void*);
@ -421,8 +421,8 @@ struct propagate_vector4_event_s : public event_s {
/* value to propagate */
vvp_vector4_t val;
/* Action */
void run_run(void);
void single_step_display(void);
void run_run(void) override;
void single_step_display(void) override;
};
void propagate_vector4_event_s::run_run(void)
@ -445,8 +445,8 @@ struct propagate_real_event_s : public event_s {
/* value to propagate */
double val;
/* Action */
void run_run(void);
void single_step_display(void);
void run_run(void) override;
void single_step_display(void) override;
};
void propagate_real_event_s::run_run(void)
@ -463,7 +463,7 @@ struct assign_array_r_word_s : public event_s {
vvp_array_t mem;
unsigned adr;
double val;
void run_run(void);
void run_run(void) override;
static void* operator new(size_t);
static void operator delete(void*);
@ -493,8 +493,8 @@ unsigned long count_assign_arword_pool(void) { return array_r_w_heap.pool; }
struct generic_event_s : public event_s {
vvp_gen_event_t obj;
bool delete_obj_when_done;
void run_run(void);
void single_step_display(void);
void run_run(void) override;
void single_step_display(void) override;
static void* operator new(size_t);
static void operator delete(void*);

View File

@ -1,7 +1,7 @@
#ifndef IVL_sfunc_H
#define IVL_sfunc_H
/*
* Copyright (c) 2006-2014 Stephen Williams (steve@icarus.com)
* Copyright (c) 2006-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -28,13 +28,13 @@ class sfunc_core : public vvp_wide_fun_core, protected vvp_gen_event_s {
~sfunc_core();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
private:
void recv_vec4_from_inputs(unsigned port);
void recv_real_from_inputs(unsigned port);
void recv_vec4_from_inputs(unsigned port) override;
void recv_real_from_inputs(unsigned port) override;
void run_run();
void run_run() override;
private:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Stephen Williams (steve@icarus.com)
* Copyright (c) 2016-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -30,10 +30,10 @@ class vvp_fun_substitute : public vvp_net_fun_t {
vvp_fun_substitute(unsigned wid, unsigned soff, unsigned swid);
~vvp_fun_substitute();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit, vvp_context_t);
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit, vvp_context_t) override;
void recv_vec4_pv(vvp_net_ptr_t ptr, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t ctx);
unsigned base, unsigned vwid, vvp_context_t ctx) override;
private:
unsigned wid_;

View File

@ -1,7 +1,7 @@
#ifndef IVL_udp_H
#define IVL_udp_H
/*
* Copyright (c) 2005-2021 Stephen Williams (steve@icarus.com)
* Copyright (c) 2005-2025 Stephen Williams (steve@icarus.com)
*
* (This is a rewrite of code that was ...
* Copyright (c) 2001 Stephan Boettcher <stephan@nevis.columbia.edu>)
@ -124,7 +124,7 @@ class vvp_udp_comb_s : public vvp_udp_s {
vvp_bit4_t calculate_output(const udp_levels_table&cur,
const udp_levels_table&prev,
vvp_bit4_t cur_out);
vvp_bit4_t cur_out) override;
private:
// Level sensitive rows of the device.
@ -187,7 +187,7 @@ class vvp_udp_seq_s : public vvp_udp_s {
vvp_bit4_t calculate_output(const udp_levels_table&cur,
const udp_levels_table&prev,
vvp_bit4_t cur_out);
vvp_bit4_t cur_out) override;
private:
vvp_bit4_t test_levels_(const udp_levels_table&cur);
@ -228,10 +228,10 @@ class vvp_udp_fun_core : public vvp_wide_fun_core, private vvp_gen_event_s {
vvp_udp_fun_core(vvp_net_t*net, vvp_udp_s*def);
~vvp_udp_fun_core();
void recv_vec4_from_inputs(unsigned);
void recv_vec4_from_inputs(unsigned) override;
private:
void run_run();
void run_run() override;
vvp_udp_s*def_;
vvp_bit4_t cur_out_;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002-2021 Stephen Williams (steve@icarus.com)
* Copyright (c) 2002-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -47,7 +47,7 @@ class ufunc_real : public ufunc_core {
char*scope_label);
~ufunc_real();
void finish_thread();
void finish_thread() override;
};
class ufunc_vec4 : public ufunc_core {
@ -59,7 +59,7 @@ class ufunc_vec4 : public ufunc_core {
char*scope_label);
~ufunc_vec4();
void finish_thread();
void finish_thread() override;
};
ufunc_core::ufunc_core(unsigned owid, vvp_net_t*ptr,

View File

@ -1,7 +1,7 @@
#ifndef IVL_ufunc_H
#define IVL_ufunc_H
/*
* Copyright (c) 2002-2014 Stephen Williams (steve@icarus.com)
* Copyright (c) 2002-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -66,15 +66,15 @@ class ufunc_core : public vvp_wide_fun_core {
virtual void finish_thread() =0;
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
protected:
void finish_thread_real_();
void finish_thread_vec4_();
private:
void recv_vec4_from_inputs(unsigned port);
void recv_real_from_inputs(unsigned port);
void recv_vec4_from_inputs(unsigned port) override;
void recv_real_from_inputs(unsigned port) override;
void invoke_thread_(void);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001-2024 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -176,7 +176,7 @@ struct sync_cb : public vvp_gen_event_s {
~sync_cb () { }
virtual void run_run();
virtual void run_run() override;
};
inline __vpiCallback::__vpiCallback()
@ -233,7 +233,7 @@ class value_part_callback : public value_callback {
explicit value_part_callback(p_cb_data data);
~value_part_callback();
bool test_value_callback_ready(void);
bool test_value_callback_ready(void) override;
private:
char*value_bits_;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001-2024 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -33,9 +33,9 @@ class __vpiStringConst : public __vpiHandle {
public:
explicit __vpiStringConst(char*val);
~__vpiStringConst();
int get_type_code(void) const;
int vpi_get(int code);
void vpi_get_value(p_vpi_value val);
int get_type_code(void) const override;
int vpi_get(int code) override;
void vpi_get_value(p_vpi_value val) override;
private:
void process_string_();
@ -272,10 +272,10 @@ class __vpiStringParam : public __vpiStringConst {
public:
__vpiStringParam(char*txt, char*name);
~__vpiStringParam();
int get_type_code(void) const;
int vpi_get(int code);
char*vpi_get_str(int code);
vpiHandle vpi_handle(int code);
int get_type_code(void) const override;
int vpi_get(int code) override;
char*vpi_get_str(int code) override;
vpiHandle vpi_handle(int code) override;
__vpiScope* scope;
bool local_flag;
@ -466,10 +466,10 @@ vvp_vector4_t vector4_from_text(const char*bits, unsigned wid)
struct __vpiBinaryParam : public __vpiBinaryConst {
__vpiBinaryParam(const vvp_vector4_t&b, char*name);
~__vpiBinaryParam();
int get_type_code(void) const;
int vpi_get(int code);
char*vpi_get_str(int code);
vpiHandle vpi_handle(int code);
int get_type_code(void) const override;
int vpi_get(int code) override;
char*vpi_get_str(int code) override;
vpiHandle vpi_handle(int code) override;
__vpiScope*scope;
unsigned file_idx;
@ -693,10 +693,10 @@ vpiHandle vpip_make_real_const(double value)
struct __vpiRealParam : public __vpiRealConst {
__vpiRealParam(double val, char*name);
~__vpiRealParam();
int get_type_code(void) const;
int vpi_get(int code);
char*vpi_get_str(int code);
vpiHandle vpi_handle(int code);
int get_type_code(void) const override;
int vpi_get(int code) override;
char*vpi_get_str(int code) override;
vpiHandle vpi_handle(int code) override;
__vpiScope* scope;
bool local_flag;

View File

@ -1048,7 +1048,7 @@ struct vpip_put_value_event : vvp_gen_event_s {
vpiHandle handle;
s_vpi_value value;
int flags;
virtual void run_run();
virtual void run_run() override;
~vpip_put_value_event() { }
};

View File

@ -1,7 +1,7 @@
#ifndef IVL_vpi_priv_H
#define IVL_vpi_priv_H
/*
* Copyright (c) 2001-2024 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
* Copyright (c) 2016 CERN Michele Castellana (michele.castellana@cern.ch)
*
* This source code is free software; you can redistribute it
@ -156,8 +156,8 @@ class __vpiHandle {
*/
struct __vpiIterator : public __vpiHandle {
__vpiIterator();
int get_type_code(void) const;
free_object_fun_t free_object_fun(void);
int get_type_code(void) const override;
free_object_fun_t free_object_fun(void) override;
vpiHandle *args;
unsigned nargs;
@ -175,9 +175,9 @@ class __vpiDecConst : public __vpiHandle {
# if __cplusplus >= 201103L
__vpiDecConst& operator = (const __vpiDecConst&that) = default;
# endif
int get_type_code(void) const;
int vpi_get(int code);
void vpi_get_value(p_vpi_value val);
int get_type_code(void) const override;
int vpi_get(int code) override;
void vpi_get_value(p_vpi_value val) override;
public:
inline int get_value() const { return value; }
@ -195,7 +195,7 @@ class __vpiDecConst : public __vpiHandle {
struct __vpiCallback : public __vpiHandle {
__vpiCallback();
~__vpiCallback();
int get_type_code(void) const;
int get_type_code(void) const override;
// Used for listing callbacks.
struct __vpiCallback*next;
@ -220,31 +220,31 @@ extern void callback_execute(struct __vpiCallback*cur);
struct __vpiSystemTime : public __vpiHandle {
__vpiSystemTime();
int get_type_code(void) const;
int vpi_get(int code);
char*vpi_get_str(int code);
void vpi_get_value(p_vpi_value val);
vpiHandle vpi_handle(int code);
int get_type_code(void) const override;
int vpi_get(int code) override;
char*vpi_get_str(int code) override;
void vpi_get_value(p_vpi_value val) override;
vpiHandle vpi_handle(int code) override;
__vpiScope*scope;
};
struct __vpiScopedTime : public __vpiSystemTime {
__vpiScopedTime();
char*vpi_get_str(int code);
void vpi_get_value(p_vpi_value val);
char*vpi_get_str(int code) override;
void vpi_get_value(p_vpi_value val) override;
};
struct __vpiScopedSTime : public __vpiSystemTime {
__vpiScopedSTime();
int vpi_get(int code);
char*vpi_get_str(int code);
void vpi_get_value(p_vpi_value val);
int vpi_get(int code) override;
char*vpi_get_str(int code) override;
void vpi_get_value(p_vpi_value val) override;
};
struct __vpiScopedRealtime : public __vpiSystemTime {
__vpiScopedRealtime();
int vpi_get(int code);
char*vpi_get_str(int code);
void vpi_get_value(p_vpi_value val);
int vpi_get(int code) override;
char*vpi_get_str(int code) override;
void vpi_get_value(p_vpi_value val) override;
};
/*
@ -255,10 +255,10 @@ struct __vpiScopedRealtime : public __vpiSystemTime {
class __vpiScope : public __vpiHandle {
public:
int vpi_get(int code);
char* vpi_get_str(int code);
vpiHandle vpi_handle(int code);
vpiHandle vpi_iterate(int code);
int vpi_get(int code) override;
char* vpi_get_str(int code) override;
vpiHandle vpi_handle(int code) override;
vpiHandle vpi_iterate(int code) override;
public:
// Return the BASE name of the scope. This does not include
@ -314,8 +314,8 @@ class vpiScopeFunction : public __vpiScope {
: __vpiScope(nam,tnam, auto_flag), func_type_(func_type), func_wid_(func_wid), func_init_val_(func_init_val)
{ }
int get_type_code(void) const { return vpiFunction; }
int vpi_get(int code)
int get_type_code(void) const override { return vpiFunction; }
int vpi_get(int code) override
{
switch (code) {
case vpiFuncType:
@ -351,13 +351,13 @@ extern void vpip_make_root_iterator(class __vpiHandle**&table,
* a declared name and declaration indices.
*/
struct __vpiSignal : public __vpiHandle {
int vpi_get(int code);
char* vpi_get_str(int code);
void vpi_get_value(p_vpi_value val);
vpiHandle vpi_put_value(p_vpi_value val, int flags);
vpiHandle vpi_handle(int code);
vpiHandle vpi_iterate(int code);
vpiHandle vpi_index(int idx);
int vpi_get(int code) override;
char* vpi_get_str(int code) override;
void vpi_get_value(p_vpi_value val) override;
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
vpiHandle vpi_handle(int code) override;
vpiHandle vpi_iterate(int code) override;
vpiHandle vpi_index(int idx) override;
public:
unsigned width() const;
@ -444,17 +444,17 @@ class vpiPortInfo : public __vpiHandle {
char* buffer );
~vpiPortInfo();
int get_type_code(void) const { return vpiPort; }
int get_type_code(void) const override { return vpiPort; }
int get_direction(void) { return direction_; }
unsigned get_index(void) { return index_; }
int get_width(void) { return width_; }
void add_port_bit(vpiPortBitInfo* port_bit) { port_bits_.push_back(port_bit); }
int vpi_get(int code);
char* vpi_get_str(int code);
vpiHandle vpi_handle(int code);
int vpi_get(int code) override;
char* vpi_get_str(int code) override;
vpiHandle vpi_handle(int code) override;
vvp_net_t* get_port(void) const { return ref_; }
vpiHandle vpi_iterate(int code);
vpiHandle vpi_iterate(int code) override;
std::vector<vpiPortBitInfo*> port_bits_;
@ -473,11 +473,11 @@ class vpiPortBitInfo : public __vpiHandle {
unsigned bit);
~vpiPortBitInfo();
int get_type_code(void) const { return vpiPortBit; }
int get_type_code(void) const override { return vpiPortBit; }
unsigned get_bit(void) const { return bit_; }
int vpi_get(int code);
vpiHandle vpi_handle(int code);
int vpi_get(int code) override;
vpiHandle vpi_handle(int code) override;
private:
vpiPortInfo *parent_;
@ -490,12 +490,12 @@ class vpiPortBitInfo : public __vpiHandle {
*/
struct __vpiPV : public __vpiHandle {
__vpiPV();
int get_type_code(void) const;
int vpi_get(int code);
char* vpi_get_str(int code);
void vpi_get_value(p_vpi_value val);
vpiHandle vpi_put_value(p_vpi_value val, int flags);
vpiHandle vpi_handle(int code);
int get_type_code(void) const override;
int vpi_get(int code) override;
char* vpi_get_str(int code) override;
void vpi_get_value(p_vpi_value val) override;
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
vpiHandle vpi_handle(int code) override;
vpiHandle parent;
vvp_net_t*net;
@ -509,9 +509,9 @@ extern vpiHandle vpip_make_PV(char*name, vpiHandle handle, int width);
struct __vpiModPathTerm : public __vpiHandle {
__vpiModPathTerm();
int get_type_code(void) const;
int vpi_get(int code);
vpiHandle vpi_handle(int code);
int get_type_code(void) const override;
int vpi_get(int code) override;
vpiHandle vpi_handle(int code) override;
vpiHandle expr;
/* The value returned by vpi_get(vpiEdge, ...); */
@ -520,16 +520,16 @@ struct __vpiModPathTerm : public __vpiHandle {
struct __vpiModPathSrc : public __vpiHandle {
__vpiModPathSrc();
int get_type_code(void) const;
int vpi_get(int code);
void vpi_get_value(p_vpi_value val);
vpiHandle vpi_put_value(p_vpi_value val, int flags);
vpiHandle vpi_handle(int code);
vpiHandle vpi_iterate(int code);
vpiHandle vpi_index(int idx);
void vpi_get_delays(p_vpi_delay del);
void vpi_put_delays(p_vpi_delay del);
free_object_fun_t free_object_fun(void);
int get_type_code(void) const override;
int vpi_get(int code) override;
void vpi_get_value(p_vpi_value val) override;
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
vpiHandle vpi_handle(int code) override;
vpiHandle vpi_iterate(int code) override;
vpiHandle vpi_index(int idx) override;
void vpi_get_delays(p_vpi_delay del) override;
void vpi_put_delays(p_vpi_delay del) override;
free_object_fun_t free_object_fun(void) override;
struct __vpiModPath *dest;
int type;
@ -582,15 +582,15 @@ extern struct __vpiModPath* vpip_make_modpath(vvp_net_t *net) ;
struct __vpiInterModPath : public __vpiHandle {
__vpiInterModPath();
int get_type_code(void) const;
int vpi_get(int code);
void vpi_get_value(p_vpi_value val);
vpiHandle vpi_put_value(p_vpi_value val, int flags);
vpiHandle vpi_handle(int code);
vpiHandle vpi_iterate(int code);
void vpi_get_delays(p_vpi_delay del);
void vpi_put_delays(p_vpi_delay del);
free_object_fun_t free_object_fun(void);
int get_type_code(void) const override;
int vpi_get(int code) override;
void vpi_get_value(p_vpi_value val) override;
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
vpiHandle vpi_handle(int code) override;
vpiHandle vpi_iterate(int code) override;
void vpi_get_delays(p_vpi_delay del) override;
void vpi_put_delays(p_vpi_delay del) override;
free_object_fun_t free_object_fun(void) override;
__vpiScope *scope ;
@ -620,12 +620,12 @@ class __vpiNamedEvent : public __vpiHandle {
public:
__vpiNamedEvent(__vpiScope*scope, const char*name);
~__vpiNamedEvent();
int get_type_code(void) const;
int get_type_code(void) const override;
__vpiScope*get_scope(void) const { return scope_; }
int vpi_get(int code);
char* vpi_get_str(int code);
vpiHandle vpi_put_value(p_vpi_value val, int flags);
vpiHandle vpi_handle(int code);
int vpi_get(int code) override;
char* vpi_get_str(int code) override;
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
vpiHandle vpi_handle(int code) override;
inline void add_vpi_callback(__vpiCallback*cb)
{ cb->next = callbacks_;
@ -662,13 +662,13 @@ extern bool is_net_array(vpiHandle obj);
*/
struct __vpiRealVar : public __vpiHandle {
__vpiRealVar();
int get_type_code(void) const;
int vpi_get(int code);
char* vpi_get_str(int code);
void vpi_get_value(p_vpi_value val);
vpiHandle vpi_put_value(p_vpi_value val, int flags);
vpiHandle vpi_handle(int code);
vpiHandle vpi_iterate(int code);
int get_type_code(void) const override;
int vpi_get(int code) override;
char* vpi_get_str(int code) override;
void vpi_get_value(p_vpi_value val) override;
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
vpiHandle vpi_handle(int code) override;
vpiHandle vpi_iterate(int code) override;
union { // The scope or parent array that contains me.
vpiHandle parent;
@ -712,10 +712,10 @@ class __vpiStringVar : public __vpiBaseVar {
public:
__vpiStringVar(__vpiScope*scope, const char*name, vvp_net_t*net);
int get_type_code(void) const;
int vpi_get(int code);
void vpi_get_value(p_vpi_value val);
vpiHandle vpi_put_value(p_vpi_value val, int flags);
int get_type_code(void) const override;
int vpi_get(int code) override;
void vpi_get_value(p_vpi_value val) override;
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
};
extern vpiHandle vpip_make_string_var(const char*name, vvp_net_t*net);
@ -772,24 +772,24 @@ struct __vpiArrayBase {
* vector4 array works.
*/
struct __vpiArray : public __vpiArrayBase, public __vpiHandle {
int get_type_code(void) const { return vpiMemory; }
unsigned get_size() const { return array_count; }
vpiHandle get_left_range() { assert(nets == 0); return &msb; }
vpiHandle get_right_range() { assert(nets == 0); return &lsb; }
__vpiScope*get_scope() const { return scope; }
int get_type_code(void) const override { return vpiMemory; }
unsigned get_size() const override { return array_count; }
vpiHandle get_left_range() override { assert(nets == 0); return &msb; }
vpiHandle get_right_range() override { assert(nets == 0); return &lsb; }
__vpiScope*get_scope() const override { return scope; }
int get_word_size() const;
char*get_word_str(struct __vpiArrayWord*word, int code);
void get_word_value(struct __vpiArrayWord*word, p_vpi_value vp);
void put_word_value(struct __vpiArrayWord*word, p_vpi_value vp, int flags);
int get_word_size() const override;
char*get_word_str(struct __vpiArrayWord*word, int code) override;
void get_word_value(struct __vpiArrayWord*word, p_vpi_value vp) override;
void put_word_value(struct __vpiArrayWord*word, p_vpi_value vp, int flags) override;
vpiHandle get_iter_index(struct __vpiArrayIterator*iter, int idx);
vpiHandle get_iter_index(struct __vpiArrayIterator*iter, int idx) override;
int vpi_get(int code);
char* vpi_get_str(int code);
vpiHandle vpi_handle(int code);
inline vpiHandle vpi_iterate(int code) { return vpi_array_base_iterate(code); }
vpiHandle vpi_index(int idx);
int vpi_get(int code) override;
char* vpi_get_str(int code) override;
vpiHandle vpi_handle(int code) override;
inline vpiHandle vpi_iterate(int code) override { return vpi_array_base_iterate(code); }
vpiHandle vpi_index(int idx) override;
void set_word(unsigned idx, unsigned off, const vvp_vector4_t&val);
void set_word(unsigned idx, double val);
@ -836,26 +836,26 @@ class __vpiDarrayVar : public __vpiBaseVar, public __vpiArrayBase {
public:
__vpiDarrayVar(__vpiScope*scope, const char*name, vvp_net_t*net);
int get_type_code() const { return vpiArrayVar; }
unsigned get_size() const;
vpiHandle get_left_range();
vpiHandle get_right_range();
__vpiScope*get_scope() const { return scope_; }
int get_type_code() const override { return vpiArrayVar; }
unsigned get_size() const override;
vpiHandle get_left_range() override;
vpiHandle get_right_range() override;
__vpiScope*get_scope() const override { return scope_; }
int get_word_size() const;
char*get_word_str(struct __vpiArrayWord*word, int code);
void get_word_value(struct __vpiArrayWord*word, p_vpi_value vp);
void put_word_value(struct __vpiArrayWord*word, p_vpi_value vp, int flags);
int get_word_size() const override;
char*get_word_str(struct __vpiArrayWord*word, int code) override;
void get_word_value(struct __vpiArrayWord*word, p_vpi_value vp) override;
void put_word_value(struct __vpiArrayWord*word, p_vpi_value vp, int flags) override;
vpiHandle get_iter_index(struct __vpiArrayIterator*iter, int idx);
inline vpiHandle vpi_iterate(int code) { return vpi_array_base_iterate(code); }
vpiHandle get_iter_index(struct __vpiArrayIterator*iter, int idx) override;
inline vpiHandle vpi_iterate(int code) override { return vpi_array_base_iterate(code); }
int vpi_get(int code);
char* vpi_get_str(int code);
vpiHandle vpi_handle(int code);
vpiHandle vpi_index(int index);
int vpi_get(int code) override;
char* vpi_get_str(int code) override;
vpiHandle vpi_handle(int code) override;
vpiHandle vpi_index(int index) override;
void vpi_get_value(p_vpi_value val);
void vpi_get_value(p_vpi_value val) override;
protected:
vvp_darray*get_vvp_darray() const;
@ -869,9 +869,9 @@ class __vpiQueueVar : public __vpiBaseVar {
public:
__vpiQueueVar(__vpiScope*scope, const char*name, vvp_net_t*net);
int get_type_code(void) const;
int vpi_get(int code);
void vpi_get_value(p_vpi_value val);
int get_type_code(void) const override;
int vpi_get(int code) override;
void vpi_get_value(p_vpi_value val) override;
};
extern vpiHandle vpip_make_queue_var(const char*name, vvp_net_t*net);
@ -881,9 +881,9 @@ class __vpiCobjectVar : public __vpiBaseVar {
public:
__vpiCobjectVar(__vpiScope*scope, const char*name, vvp_net_t*net);
int get_type_code(void) const;
int vpi_get(int code);
void vpi_get_value(p_vpi_value val);
int get_type_code(void) const override;
int vpi_get(int code) override;
void vpi_get_value(p_vpi_value val) override;
};
extern vpiHandle vpip_make_cobject_var(const char*name, vvp_net_t*net);
@ -908,7 +908,7 @@ extern vpiHandle vpip_make_cobject_var(const char*name, vvp_net_t*net);
*/
struct __vpiUserSystf : public __vpiHandle {
__vpiUserSystf();
int get_type_code(void) const;
int get_type_code(void) const override;
s_vpi_systf_data info;
bool is_user_defn;
@ -962,9 +962,9 @@ vpiHandle vpip_make_string_param(char*name, char*value, bool local_flag,
struct __vpiBinaryConst : public __vpiHandle {
__vpiBinaryConst();
int get_type_code(void) const;
int vpi_get(int code);
void vpi_get_value(p_vpi_value val);
int get_type_code(void) const override;
int vpi_get(int code) override;
void vpi_get_value(p_vpi_value val) override;
vvp_vector4_t bits;
/* TRUE if this constant is signed. */
@ -981,9 +981,9 @@ vpiHandle vpip_make_binary_param(char*name, const vvp_vector4_t&bits,
class __vpiRealConst : public __vpiHandle {
public:
explicit __vpiRealConst(double);
int get_type_code(void) const;
int vpi_get(int code);
void vpi_get_value(p_vpi_value val);
int get_type_code(void) const override;
int vpi_get(int code) override;
void vpi_get_value(p_vpi_value val) override;
double value;
};
@ -995,9 +995,9 @@ vpiHandle vpip_make_real_param(char*name, double value, bool local_flag,
class __vpiNullConst : public __vpiHandle {
public:
explicit __vpiNullConst();
int get_type_code(void) const;
int vpi_get(int code);
void vpi_get_value(p_vpi_value val);
int get_type_code(void) const override;
int vpi_get(int code) override;
void vpi_get_value(p_vpi_value val) override;
};
vpiHandle vpip_make_null_const();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001-2023 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -399,63 +399,63 @@ class vpiScopeModule : public __vpiScope {
public:
inline vpiScopeModule(const char*nam, const char*tnam)
: __vpiScope(nam,tnam,false) { }
int get_type_code(void) const { return vpiModule; }
int get_type_code(void) const override { return vpiModule; }
};
struct vpiScopePackage : public __vpiScope {
inline vpiScopePackage(const char*nam, const char*tnam)
: __vpiScope(nam,tnam) { }
int get_type_code(void) const { return vpiPackage; }
int get_type_code(void) const override { return vpiPackage; }
};
struct vpiScopeTask : public __vpiScope {
inline vpiScopeTask(const char*nam, const char*tnam)
: __vpiScope(nam,tnam) { }
int get_type_code(void) const { return vpiTask; }
int get_type_code(void) const override { return vpiTask; }
};
struct vpiScopeTaskAuto : public __vpiScope {
inline vpiScopeTaskAuto(const char*nam, const char*tnam)
: __vpiScope(nam,tnam,true) { }
int get_type_code(void) const { return vpiTask; }
int get_type_code(void) const override { return vpiTask; }
};
struct vpiScopeBegin : public __vpiScope {
inline vpiScopeBegin(const char*nam, const char*tnam)
: __vpiScope(nam,tnam,false) { }
int get_type_code(void) const { return vpiNamedBegin; }
int get_type_code(void) const override { return vpiNamedBegin; }
};
class vpiScopeBeginAuto : public __vpiScope {
public:
inline vpiScopeBeginAuto(const char*nam, const char*tnam)
: __vpiScope(nam,tnam,true) { }
int get_type_code(void) const { return vpiNamedBegin; }
int get_type_code(void) const override { return vpiNamedBegin; }
};
struct vpiScopeGenerate : public __vpiScope {
inline vpiScopeGenerate(const char*nam, const char*tnam)
: __vpiScope(nam,tnam) { }
int get_type_code(void) const { return vpiGenScope; }
int get_type_code(void) const override { return vpiGenScope; }
};
struct vpiScopeFork : public __vpiScope {
inline vpiScopeFork(const char*nam, const char*tnam)
: __vpiScope(nam,tnam,false) { }
int get_type_code(void) const { return vpiNamedFork; }
int get_type_code(void) const override { return vpiNamedFork; }
};
class vpiScopeForkAuto : public __vpiScope {
public:
inline vpiScopeForkAuto(const char*nam, const char*tnam)
: __vpiScope(nam,tnam,true) { }
int get_type_code(void) const { return vpiNamedFork; }
int get_type_code(void) const override { return vpiNamedFork; }
};
struct vpiScopeClass : public __vpiScope {
inline vpiScopeClass(const char*nam, const char*tnam)
: __vpiScope(nam,tnam) { }
int get_type_code(void) const { return vpiClassTypespec; }
int get_type_code(void) const override { return vpiClassTypespec; }
};
/*

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001-2024 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -1069,42 +1069,42 @@ vpiHandle __vpiSignal::vpi_index(int idx)
struct signal_reg : public __vpiSignal {
inline signal_reg() { }
int get_type_code(void) const { return vpiReg; }
int get_type_code(void) const override { return vpiReg; }
};
struct signal_integer : public __vpiSignal {
inline signal_integer() { }
int get_type_code(void) const { return vpiIntegerVar; }
int get_type_code(void) const override { return vpiIntegerVar; }
};
struct signal_net : public __vpiSignal {
inline signal_net() { }
int get_type_code(void) const { return vpiNet; }
int get_type_code(void) const override { return vpiNet; }
};
struct signal_byte : public __vpiSignal {
inline signal_byte() { }
int get_type_code(void) const { return vpiByteVar; }
int get_type_code(void) const override { return vpiByteVar; }
};
struct signal_bitvar : public __vpiSignal {
inline signal_bitvar() { }
int get_type_code(void) const { return vpiBitVar; }
int get_type_code(void) const override { return vpiBitVar; }
};
struct signal_shortint : public __vpiSignal {
inline signal_shortint() { }
int get_type_code(void) const { return vpiShortIntVar; }
int get_type_code(void) const override { return vpiShortIntVar; }
};
struct signal_int : public __vpiSignal {
inline signal_int() { }
int get_type_code(void) const { return vpiIntVar; }
int get_type_code(void) const override { return vpiIntVar; }
};
struct signal_longint : public __vpiSignal {
inline signal_longint() { }
int get_type_code(void) const { return vpiLongIntVar; }
int get_type_code(void) const override { return vpiLongIntVar; }
};

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001-2020 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -144,21 +144,21 @@ static vpiHandle systask_iter(int, vpiHandle ref)
struct systask_def : public __vpiSysTaskCall {
virtual ~systask_def() {};
virtual int get_type_code(void) const { return vpiSysTaskCall; }
virtual int vpi_get(int code) { return systask_get(code, this); }
virtual char*vpi_get_str(int code) { return systask_get_str(code, this); }
virtual vpiHandle vpi_handle(int code) { return systask_handle(code, this); }
virtual vpiHandle vpi_iterate(int code){ return systask_iter(code, this); }
virtual int get_type_code(void) const override { return vpiSysTaskCall; }
virtual int vpi_get(int code) override { return systask_get(code, this); }
virtual char*vpi_get_str(int code) override { return systask_get_str(code, this); }
virtual vpiHandle vpi_handle(int code) override { return systask_handle(code, this); }
virtual vpiHandle vpi_iterate(int code) override { return systask_iter(code, this); }
};
struct sysfunc_def : public systask_def {
virtual ~sysfunc_def() {};
virtual int get_type_code(void) const { return vpiSysFuncCall; }
virtual int vpi_get(int code) { return sysfunc_get(code, this); }
virtual int get_type_code(void) const override { return vpiSysFuncCall; }
virtual int vpi_get(int code) override { return sysfunc_get(code, this); }
};
struct sysfunc_real : public sysfunc_def {
vpiHandle vpi_put_value(p_vpi_value val, int flags);
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
inline double return_value() const { return return_value_; }
private:
@ -183,8 +183,8 @@ vpiHandle sysfunc_real::vpi_put_value(p_vpi_value vp, int)
}
struct sysfunc_str : public sysfunc_def {
int vpi_get(int code);
vpiHandle vpi_put_value(p_vpi_value val, int flags);
int vpi_get(int code) override;
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
inline const std::string& return_value() const { return return_value_; };
private:
@ -227,8 +227,8 @@ vpiHandle sysfunc_str::vpi_put_value(p_vpi_value vp, int)
class sysfunc_vec4 : public sysfunc_def {
public:
explicit inline sysfunc_vec4(unsigned wid): return_value_(wid, BIT4_X) { }
int vpi_get(int code);
vpiHandle vpi_put_value(p_vpi_value val, int flags);
int vpi_get(int code) override;
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
inline const vvp_vector4_t& return_value() const { return return_value_; }
private:
@ -395,8 +395,8 @@ vpiHandle sysfunc_vec4::vpi_put_value(p_vpi_value vp, int)
struct sysfunc_4net : public sysfunc_def {
explicit inline sysfunc_4net(unsigned wid) : vwid_(wid) { }
int vpi_get(int code);
vpiHandle vpi_put_value(p_vpi_value val, int flags);
int vpi_get(int code) override;
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
private:
unsigned vwid_;
@ -521,7 +521,7 @@ vpiHandle sysfunc_4net::vpi_put_value(p_vpi_value vp, int)
}
struct sysfunc_rnet : public sysfunc_def {
vpiHandle vpi_put_value(p_vpi_value val, int flags);
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
};
vpiHandle sysfunc_rnet::vpi_put_value(p_vpi_value vp, int)
@ -547,7 +547,7 @@ vpiHandle sysfunc_rnet::vpi_put_value(p_vpi_value vp, int)
}
struct sysfunc_no : public sysfunc_def {
vpiHandle vpi_put_value(p_vpi_value val, int flags);
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
};
vpiHandle sysfunc_no::vpi_put_value(p_vpi_value, int)
@ -604,9 +604,9 @@ void def_table_delete(void)
class __vpiSystfIterator : public __vpiHandle {
public:
explicit __vpiSystfIterator(unsigned idx);
int get_type_code(void) const;
vpiHandle vpi_index(int idx);
free_object_fun_t free_object_fun(void);
int get_type_code(void) const override;
vpiHandle vpi_index(int idx) override;
free_object_fun_t free_object_fun(void) override;
unsigned next;
};

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001-2024 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001-2025 Stephen Williams (steve@icarus.com)
* Copyright (c) 2001 Stephan Boettcher <stephan@nevis.columbia.edu>
*
* This source code is free software; you can redistribute it
@ -55,9 +55,9 @@ extern const char oct_digits[64];
class __vpiVThrWord : public __vpiHandle {
public:
explicit __vpiVThrWord(unsigned base);
int get_type_code(void) const;
int vpi_get(int code);
void vpi_get_value(p_vpi_value val);
int get_type_code(void) const override;
int vpi_get(int code) override;
void vpi_get_value(p_vpi_value val) override;
int get_subtype() const { return subtype; };
unsigned get_index() const { return index; };
@ -226,9 +226,9 @@ static void thread_word_delete_real(vpiHandle item)
class __vpiVThrStrStack : public __vpiHandle {
public:
explicit __vpiVThrStrStack(unsigned depth);
int get_type_code(void) const;
int vpi_get(int code);
void vpi_get_value(p_vpi_value val);
int get_type_code(void) const override;
int vpi_get(int code) override;
void vpi_get_value(p_vpi_value val) override;
private:
unsigned depth_;
};
@ -288,11 +288,11 @@ void __vpiVThrStrStack::vpi_get_value(p_vpi_value vp)
class __vpiVThrVec4Stack : public __vpiHandle {
public:
__vpiVThrVec4Stack(unsigned depth, bool signed_flag, unsigned wid);
int get_type_code(void) const;
int vpi_get(int code);
char*vpi_get_str(int code);
void vpi_get_value(p_vpi_value val);
vpiHandle vpi_put_value(p_vpi_value val, int flags);
int get_type_code(void) const override;
int vpi_get(int code) override;
char*vpi_get_str(int code) override;
void vpi_get_value(p_vpi_value val) override;
vpiHandle vpi_put_value(p_vpi_value val, int flags) override;
private:
void vpi_get_value_string_(p_vpi_value vp, const vvp_vector4_t&val);
void vpi_get_value_binstr_(p_vpi_value vp, const vvp_vector4_t&val);

View File

@ -1,7 +1,7 @@
#ifndef IVL_vvp_cobject_H
#define IVL_vvp_cobject_H
/*
* Copyright (c) 2012-2014 Stephen Williams (steve@icarus.com)
* Copyright (c) 2012-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -44,7 +44,7 @@ class vvp_cobject : public vvp_object {
void set_object(size_t pid, const vvp_object_t&val, size_t idx);
void get_object(size_t pid, vvp_object_t&val, size_t idx);
void shallow_copy(const vvp_object*that);
void shallow_copy(const vvp_object*that) override;
private:
const class_type* defn_;

View File

@ -1,7 +1,7 @@
#ifndef IVL_vvp_darray_H
#define IVL_vvp_darray_H
/*
* Copyright (c) 2012-2021 Stephen Williams (steve@icarus.com)
* Copyright (c) 2012-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -54,12 +54,12 @@ template <class TYPE> class vvp_darray_atom : public vvp_darray {
explicit inline vvp_darray_atom(size_t siz) : array_(siz) { }
~vvp_darray_atom();
size_t get_size(void) const;
void set_word(unsigned adr, const vvp_vector4_t&value);
void get_word(unsigned adr, vvp_vector4_t&value);
void shallow_copy(const vvp_object*obj);
vvp_object* duplicate(void) const;
vvp_vector4_t get_bitstream(bool as_vec4);
size_t get_size(void) const override;
void set_word(unsigned adr, const vvp_vector4_t&value) override;
void get_word(unsigned adr, vvp_vector4_t&value) override;
void shallow_copy(const vvp_object*obj) override;
vvp_object* duplicate(void) const override;
vvp_vector4_t get_bitstream(bool as_vec4) override;
private:
std::vector<TYPE> array_;
@ -72,12 +72,12 @@ class vvp_darray_vec4 : public vvp_darray {
array_(siz), word_wid_(word_wid) { }
~vvp_darray_vec4();
size_t get_size(void) const;
void set_word(unsigned adr, const vvp_vector4_t&value);
void get_word(unsigned adr, vvp_vector4_t&value);
void shallow_copy(const vvp_object*obj);
vvp_object* duplicate(void) const;
vvp_vector4_t get_bitstream(bool as_vec4);
size_t get_size(void) const override;
void set_word(unsigned adr, const vvp_vector4_t&value) override;
void get_word(unsigned adr, vvp_vector4_t&value) override;
void shallow_copy(const vvp_object*obj) override;
vvp_object* duplicate(void) const override;
vvp_vector4_t get_bitstream(bool as_vec4) override;
private:
std::vector<vvp_vector4_t> array_;
@ -91,11 +91,11 @@ class vvp_darray_vec2 : public vvp_darray {
array_(siz), word_wid_(word_wid) { }
~vvp_darray_vec2();
size_t get_size(void) const;
void set_word(unsigned adr, const vvp_vector4_t&value);
void get_word(unsigned adr, vvp_vector4_t&value);
void shallow_copy(const vvp_object*obj);
vvp_vector4_t get_bitstream(bool as_vec4);
size_t get_size(void) const override;
void set_word(unsigned adr, const vvp_vector4_t&value) override;
void get_word(unsigned adr, vvp_vector4_t&value) override;
void shallow_copy(const vvp_object*obj) override;
vvp_vector4_t get_bitstream(bool as_vec4) override;
private:
std::vector<vvp_vector2_t> array_;
@ -108,12 +108,12 @@ class vvp_darray_real : public vvp_darray {
explicit inline vvp_darray_real(size_t siz) : array_(siz) { }
~vvp_darray_real();
size_t get_size(void) const;
void set_word(unsigned adr, double value);
void get_word(unsigned adr, double&value);
void shallow_copy(const vvp_object*obj);
vvp_object* duplicate(void) const;
vvp_vector4_t get_bitstream(bool as_vec4);
size_t get_size(void) const override;
void set_word(unsigned adr, double value) override;
void get_word(unsigned adr, double&value) override;
void shallow_copy(const vvp_object*obj) override;
vvp_object* duplicate(void) const override;
vvp_vector4_t get_bitstream(bool as_vec4) override;
private:
std::vector<double> array_;
@ -125,11 +125,11 @@ class vvp_darray_string : public vvp_darray {
explicit inline vvp_darray_string(size_t siz) : array_(siz) { }
~vvp_darray_string();
size_t get_size(void) const;
void set_word(unsigned adr, const std::string&value);
void get_word(unsigned adr, std::string&value);
void shallow_copy(const vvp_object*obj);
vvp_object* duplicate(void) const;
size_t get_size(void) const override;
void set_word(unsigned adr, const std::string&value) override;
void get_word(unsigned adr, std::string&value) override;
void shallow_copy(const vvp_object*obj) override;
vvp_object* duplicate(void) const override;
private:
std::vector<std::string> array_;
@ -141,10 +141,10 @@ class vvp_darray_object : public vvp_darray {
explicit inline vvp_darray_object(size_t siz) : array_(siz) { }
~vvp_darray_object();
size_t get_size(void) const;
void set_word(unsigned adr, const vvp_object_t&value);
void get_word(unsigned adr, vvp_object_t&value);
void shallow_copy(const vvp_object*obj);
size_t get_size(void) const override;
void set_word(unsigned adr, const vvp_object_t&value) override;
void get_word(unsigned adr, vvp_object_t&value) override;
void shallow_copy(const vvp_object*obj) override;
//virtual vvp_object* duplicate(void) const;
private:
@ -157,7 +157,7 @@ class vvp_queue : public vvp_darray {
inline vvp_queue(void) { }
~vvp_queue();
virtual size_t get_size(void) const =0;
virtual size_t get_size(void) const override =0;
virtual void copy_elems(vvp_object_t src, unsigned max_size);
virtual void set_word_max(unsigned adr, const vvp_vector4_t&value, unsigned max_size);
@ -186,18 +186,18 @@ class vvp_queue_real : public vvp_queue {
public:
~vvp_queue_real();
size_t get_size(void) const { return queue.size(); };
void copy_elems(vvp_object_t src, unsigned max_size);
void set_word_max(unsigned adr, double value, unsigned max_size);
void set_word(unsigned adr, double value);
void get_word(unsigned adr, double&value);
void insert(unsigned idx, double value, unsigned max_size);
void push_back(double value, unsigned max_size);
void push_front(double value, unsigned max_size);
void pop_back(void) { queue.pop_back(); };
void pop_front(void) { queue.pop_front(); };
void erase(unsigned idx);
void erase_tail(unsigned idx);
size_t get_size(void) const override { return queue.size(); };
void copy_elems(vvp_object_t src, unsigned max_size) override;
void set_word_max(unsigned adr, double value, unsigned max_size) override;
void set_word(unsigned adr, double value) override;
void get_word(unsigned adr, double&value) override;
void insert(unsigned idx, double value, unsigned max_size) override;
void push_back(double value, unsigned max_size) override;
void push_front(double value, unsigned max_size) override;
void pop_back(void) override { queue.pop_back(); };
void pop_front(void) override { queue.pop_front(); };
void erase(unsigned idx) override;
void erase_tail(unsigned idx) override;
private:
std::deque<double> queue;
@ -208,18 +208,18 @@ class vvp_queue_string : public vvp_queue {
public:
~vvp_queue_string();
size_t get_size(void) const { return queue.size(); };
void copy_elems(vvp_object_t src, unsigned max_size);
void set_word_max(unsigned adr, const std::string&value, unsigned max_size);
void set_word(unsigned adr, const std::string&value);
void get_word(unsigned adr, std::string&value);
void insert(unsigned idx, const std::string&value, unsigned max_size);
void push_back(const std::string&value, unsigned max_size);
void push_front(const std::string&value, unsigned max_size);
void pop_back(void) { queue.pop_back(); };
void pop_front(void) { queue.pop_front(); };
void erase(unsigned idx);
void erase_tail(unsigned idx);
size_t get_size(void) const override { return queue.size(); };
void copy_elems(vvp_object_t src, unsigned max_size) override;
void set_word_max(unsigned adr, const std::string&value, unsigned max_size) override;
void set_word(unsigned adr, const std::string&value) override;
void get_word(unsigned adr, std::string&value) override;
void insert(unsigned idx, const std::string&value, unsigned max_size) override;
void push_back(const std::string&value, unsigned max_size) override;
void push_front(const std::string&value, unsigned max_size) override;
void pop_back(void) override { queue.pop_back(); };
void pop_front(void) override { queue.pop_front(); };
void erase(unsigned idx) override;
void erase_tail(unsigned idx) override;
private:
std::deque<std::string> queue;
@ -230,18 +230,18 @@ class vvp_queue_vec4 : public vvp_queue {
public:
~vvp_queue_vec4();
size_t get_size(void) const { return queue.size(); };
void copy_elems(vvp_object_t src, unsigned max_size);
void set_word_max(unsigned adr, const vvp_vector4_t&value, unsigned max_size);
void set_word(unsigned adr, const vvp_vector4_t&value);
void get_word(unsigned adr, vvp_vector4_t&value);
void insert(unsigned idx, const vvp_vector4_t&value, unsigned max_size);
void push_back(const vvp_vector4_t&value, unsigned max_size);
void push_front(const vvp_vector4_t&value, unsigned max_size);
void pop_back(void) { queue.pop_back(); };
void pop_front(void) { queue.pop_front(); };
void erase(unsigned idx);
void erase_tail(unsigned idx);
size_t get_size(void) const override { return queue.size(); };
void copy_elems(vvp_object_t src, unsigned max_size) override;
void set_word_max(unsigned adr, const vvp_vector4_t&value, unsigned max_size) override;
void set_word(unsigned adr, const vvp_vector4_t&value) override;
void get_word(unsigned adr, vvp_vector4_t&value) override;
void insert(unsigned idx, const vvp_vector4_t&value, unsigned max_size) override;
void push_back(const vvp_vector4_t&value, unsigned max_size) override;
void push_front(const vvp_vector4_t&value, unsigned max_size) override;
void pop_back(void) override { queue.pop_back(); };
void pop_front(void) override { queue.pop_front(); };
void erase(unsigned idx) override;
void erase_tail(unsigned idx) override;
private:
std::deque<vvp_vector4_t> queue;

View File

@ -1,7 +1,7 @@
#ifndef IVL_vvp_island_H
#define IVL_vvp_island_H
/*
* Copyright (c) 2008-2015 Stephen Williams (steve@icarus.com)
* Copyright (c) 2008-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -98,7 +98,7 @@ class vvp_island : private vvp_gen_event_s {
void compile_cleanup(void);
private:
void run_run();
void run_run() override;
bool flagged_;
private:
@ -127,19 +127,19 @@ class vvp_island_port : public vvp_net_fun_t {
public: // Implement vvp_net_fun_t methods
virtual void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
vvp_context_t) override;
virtual void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t);
virtual void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit);
unsigned base, unsigned vwid, vvp_context_t) override;
virtual void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) override;
virtual void recv_vec8_pv(vvp_net_ptr_t p, const vvp_vector8_t&bit,
unsigned base, unsigned vwid);
unsigned base, unsigned vwid) override;
// This is painful, but necessary. If the island is connected
// to a forced net, we need to rerun the calculations whenever
// a force/release happens to the net. If run_now is true, we
// rerun immediately, otherwise we schedule it for the end of
// the current time slot.
virtual void force_flag(bool run_now);
virtual void force_flag(bool run_now) override;
public:
vvp_vector8_t invalue;

View File

@ -629,8 +629,8 @@ class vvp_vector4array_sa : public vvp_vector4array_t {
vvp_vector4array_sa(unsigned width, unsigned words);
~vvp_vector4array_sa();
vvp_vector4_t get_word(unsigned idx) const;
void set_word(unsigned idx, const vvp_vector4_t&that);
vvp_vector4_t get_word(unsigned idx) const override;
void set_word(unsigned idx, const vvp_vector4_t&that) override;
private:
v4cell* array_;
@ -645,14 +645,14 @@ class vvp_vector4array_aa : public vvp_vector4array_t, public automatic_hooks_s
vvp_vector4array_aa(unsigned width, unsigned words);
~vvp_vector4array_aa();
void alloc_instance(vvp_context_t context);
void reset_instance(vvp_context_t context);
void alloc_instance(vvp_context_t context) override;
void reset_instance(vvp_context_t context) override;
#ifdef CHECK_WITH_VALGRIND
void free_instance(vvp_context_t context);
void free_instance(vvp_context_t context) override;
#endif
vvp_vector4_t get_word(unsigned idx) const;
void set_word(unsigned idx, const vvp_vector4_t&that);
vvp_vector4_t get_word(unsigned idx) const override;
void set_word(unsigned idx, const vvp_vector4_t&that) override;
private:
unsigned context_idx_;
@ -1391,8 +1391,8 @@ class vvp_fun_force : public vvp_net_fun_t {
~vvp_fun_force();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
void recv_real(vvp_net_ptr_t port, double bit, vvp_context_t);
vvp_context_t context) override;
void recv_real(vvp_net_ptr_t port, double bit, vvp_context_t) override;
};
/* vvp_fun_drive
@ -1413,10 +1413,10 @@ class vvp_fun_drive : public vvp_net_fun_t {
~vvp_fun_drive();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t);
unsigned base, unsigned vwid, vvp_context_t) override;
private:
unsigned char drive0_;
unsigned char drive1_;
@ -1435,10 +1435,10 @@ class vvp_fun_extend_signed : public vvp_net_fun_t {
~vvp_fun_extend_signed();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t);
unsigned base, unsigned vwid, vvp_context_t) override;
private:
unsigned width_;
};
@ -1516,12 +1516,12 @@ class vvp_wide_fun_t : public vvp_net_fun_t {
~vvp_wide_fun_t();
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_real(vvp_net_ptr_t port, double bit,
vvp_context_t context);
vvp_context_t context) override;
void recv_vec4_pv(vvp_net_ptr_t p, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t context);
unsigned base, unsigned vwid, vvp_context_t context) override;
private:
vvp_wide_fun_core*core_;

View File

@ -1,7 +1,7 @@
#ifndef IVL_vvp_net_sig_H
#define IVL_vvp_net_sig_H
/*
* Copyright (c) 2004-2021 Stephen Williams (steve@icarus.com)
* Copyright (c) 2004-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -119,14 +119,14 @@ class automatic_signal_base : public vvp_signal_value, public vvp_net_fil_t {
public:
// Automatic variables cannot be forced or released. Provide
// stubs that assert.
virtual void release(vvp_net_ptr_t ptr, bool net_flag);
virtual void release_pv(vvp_net_ptr_t ptr, unsigned base, unsigned wid, bool net_flag);
virtual void release(vvp_net_ptr_t ptr, bool net_flag) override;
virtual void release_pv(vvp_net_ptr_t ptr, unsigned base, unsigned wid, bool net_flag) override;
virtual unsigned filter_size() const;
virtual void force_fil_vec4(const vvp_vector4_t&val, const vvp_vector2_t&mask);
virtual void force_fil_vec8(const vvp_vector8_t&val, const vvp_vector2_t&mask);
virtual void force_fil_real(double val, const vvp_vector2_t&mask);
virtual void get_value(struct t_vpi_value*value);
virtual unsigned filter_size() const override;
virtual void force_fil_vec4(const vvp_vector4_t&val, const vvp_vector2_t&mask) override;
virtual void force_fil_vec8(const vvp_vector8_t&val, const vvp_vector2_t&mask) override;
virtual void force_fil_real(double val, const vvp_vector2_t&mask) override;
virtual void get_value(struct t_vpi_value*value) override;
};
/*
@ -138,17 +138,17 @@ class vvp_fun_signal4_sa : public vvp_fun_signal_vec {
explicit vvp_fun_signal4_sa(unsigned wid, vvp_bit4_t init=BIT4_X);
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t);
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit);
vvp_context_t) override;
void recv_vec8(vvp_net_ptr_t port, const vvp_vector8_t&bit) override;
// Part select variants of above
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t);
unsigned base, unsigned vwid, vvp_context_t) override;
void recv_vec8_pv(vvp_net_ptr_t port, const vvp_vector8_t&bit,
unsigned base, unsigned vwid);
unsigned base, unsigned vwid) override;
// Get information about the vector value.
const vvp_vector4_t& vec4_unfiltered_value() const;
const vvp_vector4_t& vec4_unfiltered_value() const override;
private:
vvp_vector4_t bits4_;
@ -163,25 +163,25 @@ class vvp_fun_signal4_aa : public vvp_fun_signal_vec, public automatic_signal_ba
explicit vvp_fun_signal4_aa(unsigned wid, vvp_bit4_t init=BIT4_X);
~vvp_fun_signal4_aa();
void alloc_instance(vvp_context_t context);
void reset_instance(vvp_context_t context);
void alloc_instance(vvp_context_t context) override;
void reset_instance(vvp_context_t context) override;
#ifdef CHECK_WITH_VALGRIND
void free_instance(vvp_context_t context);
void free_instance(vvp_context_t context) override;
#endif
void recv_vec4(vvp_net_ptr_t port, const vvp_vector4_t&bit,
vvp_context_t context);
vvp_context_t context) override;
// Part select variants of above
void recv_vec4_pv(vvp_net_ptr_t port, const vvp_vector4_t&bit,
unsigned base, unsigned vwid, vvp_context_t);
unsigned base, unsigned vwid, vvp_context_t) override;
// Get information about the vector value.
unsigned value_size() const;
vvp_bit4_t value(unsigned idx) const;
vvp_scalar_t scalar_value(unsigned idx) const;
void vec4_value(vvp_vector4_t&) const;
const vvp_vector4_t& vec4_unfiltered_value() const;
unsigned value_size() const override;
vvp_bit4_t value(unsigned idx) const override;
vvp_scalar_t scalar_value(unsigned idx) const override;
void vec4_value(vvp_vector4_t&) const override;
const vvp_vector4_t& vec4_unfiltered_value() const override;
public: // These objects are only permallocated.
static void* operator new(std::size_t size) { return vvp_net_fun_t::heap_.alloc(size); }
@ -211,10 +211,10 @@ class vvp_fun_signal_real_sa : public vvp_fun_signal_real {
explicit vvp_fun_signal_real_sa();
void recv_real(vvp_net_ptr_t port, double bit,
vvp_context_t);
vvp_context_t) override;
// Get information about the vector value.
double real_unfiltered_value() const;
double real_unfiltered_value() const override;
private:
double bits_;
@ -229,25 +229,25 @@ class vvp_fun_signal_real_aa : public vvp_fun_signal_real, public automatic_sign
explicit vvp_fun_signal_real_aa();
~vvp_fun_signal_real_aa();
void alloc_instance(vvp_context_t context);
void reset_instance(vvp_context_t context);
void alloc_instance(vvp_context_t context) override;
void reset_instance(vvp_context_t context) override;
#ifdef CHECK_WITH_VALGRIND
void free_instance(vvp_context_t context);
void free_instance(vvp_context_t context) override;
#endif
void recv_real(vvp_net_ptr_t port, double bit,
vvp_context_t context);
vvp_context_t context) override;
// Get information about the vector value.
double real_unfiltered_value() const;
double real_unfiltered_value() const override;
// Get information about the vector value.
unsigned value_size() const;
vvp_bit4_t value(unsigned idx) const;
vvp_scalar_t scalar_value(unsigned idx) const;
void vec4_value(vvp_vector4_t&) const;
double real_value() const;
void get_signal_value(struct t_vpi_value*vp);
unsigned value_size() const override;
vvp_bit4_t value(unsigned idx) const override;
vvp_scalar_t scalar_value(unsigned idx) const override;
void vec4_value(vvp_vector4_t&) const override;
double real_value() const override;
void get_signal_value(struct t_vpi_value*vp) override;
public: // These objects are only permallocated.
static void* operator new(std::size_t size);
@ -278,9 +278,9 @@ class vvp_fun_signal_string_sa : public vvp_fun_signal_string {
explicit vvp_fun_signal_string_sa();
void recv_string(vvp_net_ptr_t port, const std::string&bit,
vvp_context_t context);
vvp_context_t context) override;
const std::string& get_string() const;
const std::string& get_string() const override;
private:
std::string value_;
@ -295,22 +295,22 @@ class vvp_fun_signal_string_aa : public vvp_fun_signal_string, public automatic_
explicit vvp_fun_signal_string_aa();
~vvp_fun_signal_string_aa();
void alloc_instance(vvp_context_t context);
void reset_instance(vvp_context_t context);
void alloc_instance(vvp_context_t context) override;
void reset_instance(vvp_context_t context) override;
#ifdef CHECK_WITH_VALGRIND
void free_instance(vvp_context_t context);
void free_instance(vvp_context_t context) override;
#endif
void recv_string(vvp_net_ptr_t port, const std::string&bit,
vvp_context_t context);
vvp_context_t context) override;
// Get information about the vector value.
unsigned value_size() const;
vvp_bit4_t value(unsigned idx) const;
vvp_scalar_t scalar_value(unsigned idx) const;
void vec4_value(vvp_vector4_t&) const;
double real_value() const;
const std::string& get_string() const;
void get_signal_value(struct t_vpi_value*vp);
unsigned value_size() const override;
vvp_bit4_t value(unsigned idx) const override;
vvp_scalar_t scalar_value(unsigned idx) const override;
void vec4_value(vvp_vector4_t&) const override;
double real_value() const override;
const std::string& get_string() const override;
void get_signal_value(struct t_vpi_value*vp) override;
public: // These objects are only permallocated.
static void* operator new(std::size_t size);
@ -340,9 +340,9 @@ class vvp_fun_signal_object_sa : public vvp_fun_signal_object {
explicit vvp_fun_signal_object_sa(unsigned size);
void recv_object(vvp_net_ptr_t port, vvp_object_t bit,
vvp_context_t context);
vvp_context_t context) override;
vvp_object_t get_object() const;
vvp_object_t get_object() const override;
private:
vvp_object_t value_;
@ -357,24 +357,24 @@ class vvp_fun_signal_object_aa : public vvp_fun_signal_object, public automatic_
explicit vvp_fun_signal_object_aa(unsigned size);
~vvp_fun_signal_object_aa();
void alloc_instance(vvp_context_t context);
void reset_instance(vvp_context_t context);
void alloc_instance(vvp_context_t context) override;
void reset_instance(vvp_context_t context) override;
#ifdef CHECK_WITH_VALGRIND
void free_instance(vvp_context_t context);
void free_instance(vvp_context_t context) override;
#endif
void recv_object(vvp_net_ptr_t port, vvp_object_t bit,
vvp_context_t context);
vvp_context_t context) override;
// Get information about the vector value.
unsigned value_size() const;
vvp_bit4_t value(unsigned idx) const;
vvp_scalar_t scalar_value(unsigned idx) const;
void vec4_value(vvp_vector4_t&) const;
unsigned value_size() const override;
vvp_bit4_t value(unsigned idx) const override;
vvp_scalar_t scalar_value(unsigned idx) const override;
void vec4_value(vvp_vector4_t&) const override;
//double real_value() const;
//void get_signal_value(struct t_vpi_value*vp);
vvp_object_t get_object() const;
vvp_object_t get_object() const override;
public: // These objects are only permallocated.
static void* operator new(std::size_t size);
@ -422,29 +422,29 @@ class vvp_wire_vec4 : public vvp_wire_base {
// filters. In wires, this also saves the driven value, so
// that when a force is released, we can revert to the driven value.
prop_t filter_vec4(const vvp_vector4_t&bit, vvp_vector4_t&rep,
unsigned base, unsigned vwid);
unsigned base, unsigned vwid) override;
prop_t filter_vec8(const vvp_vector8_t&val, vvp_vector8_t&rep,
unsigned base, unsigned vwid);
unsigned base, unsigned vwid) override;
// Abstract methods from vvp_vpi_callback
void get_value(struct t_vpi_value*value);
void get_value(struct t_vpi_value*value) override;
// Abstract methods from vvp_net_fit_t
unsigned filter_size() const;
void force_fil_vec4(const vvp_vector4_t&val, const vvp_vector2_t&mask);
void force_fil_vec8(const vvp_vector8_t&val, const vvp_vector2_t&mask);
void force_fil_real(double val, const vvp_vector2_t&mask);
void release(vvp_net_ptr_t ptr, bool net_flag);
void release_pv(vvp_net_ptr_t ptr, unsigned base, unsigned wid, bool net_flag);
unsigned filter_size() const override;
void force_fil_vec4(const vvp_vector4_t&val, const vvp_vector2_t&mask) override;
void force_fil_vec8(const vvp_vector8_t&val, const vvp_vector2_t&mask) override;
void force_fil_real(double val, const vvp_vector2_t&mask) override;
void release(vvp_net_ptr_t ptr, bool net_flag) override;
void release_pv(vvp_net_ptr_t ptr, unsigned base, unsigned wid, bool net_flag) override;
// Implementation of vvp_signal_value methods
unsigned value_size() const;
vvp_bit4_t value(unsigned idx) const;
vvp_scalar_t scalar_value(unsigned idx) const;
void vec4_value(vvp_vector4_t&) const;
unsigned value_size() const override;
vvp_bit4_t value(unsigned idx) const override;
vvp_scalar_t scalar_value(unsigned idx) const override;
void vec4_value(vvp_vector4_t&) const override;
// Support for $countdrivers
vvp_bit4_t driven_value(unsigned idx) const;
bool is_forced(unsigned idx) const;
vvp_bit4_t driven_value(unsigned idx) const override;
bool is_forced(unsigned idx) const override;
private:
vvp_bit4_t filtered_value_(unsigned idx) const;
@ -462,9 +462,9 @@ class vvp_wire_vec8 : public vvp_wire_base {
// The main filter behavior for this class
prop_t filter_vec4(const vvp_vector4_t&bit, vvp_vector4_t&rep,
unsigned base, unsigned vwid);
unsigned base, unsigned vwid) override;
prop_t filter_vec8(const vvp_vector8_t&val, vvp_vector8_t&rep,
unsigned base, unsigned vwid);
unsigned base, unsigned vwid) override;
// island ports use this method to filter arbitrary values
// through the force filter.
@ -472,26 +472,26 @@ class vvp_wire_vec8 : public vvp_wire_base {
// Abstract methods from vvp_vpi_callback
void get_value(struct t_vpi_value*value);
void get_value(struct t_vpi_value*value) override;
// Abstract methods from vvp_net_fit_t
unsigned filter_size() const;
void force_fil_vec4(const vvp_vector4_t&val, const vvp_vector2_t&mask);
void force_fil_vec8(const vvp_vector8_t&val, const vvp_vector2_t&mask);
void force_fil_real(double val, const vvp_vector2_t&mask);
void release(vvp_net_ptr_t ptr, bool net_flag);
void release_pv(vvp_net_ptr_t ptr, unsigned base, unsigned wid, bool net_flag);
unsigned filter_size() const override;
void force_fil_vec4(const vvp_vector4_t&val, const vvp_vector2_t&mask) override;
void force_fil_vec8(const vvp_vector8_t&val, const vvp_vector2_t&mask) override;
void force_fil_real(double val, const vvp_vector2_t&mask) override;
void release(vvp_net_ptr_t ptr, bool net_flag) override;
void release_pv(vvp_net_ptr_t ptr, unsigned base, unsigned wid, bool net_flag) override;
// Implementation of vvp_signal_value methods
unsigned value_size() const;
vvp_bit4_t value(unsigned idx) const;
vvp_scalar_t scalar_value(unsigned idx) const;
void vec4_value(vvp_vector4_t&) const;
unsigned value_size() const override;
vvp_bit4_t value(unsigned idx) const override;
vvp_scalar_t scalar_value(unsigned idx) const override;
void vec4_value(vvp_vector4_t&) const override;
// This is new to vvp_wire_vec8
vvp_vector8_t vec8_value() const;
// Support for $countdrivers
vvp_bit4_t driven_value(unsigned idx) const;
bool is_forced(unsigned idx) const;
vvp_bit4_t driven_value(unsigned idx) const override;
bool is_forced(unsigned idx) const override;
private:
vvp_scalar_t filtered_value_(unsigned idx) const;
@ -508,26 +508,26 @@ class vvp_wire_real : public vvp_wire_base {
explicit vvp_wire_real(void);
// The main filter behavior for this class
prop_t filter_real(double&bit);
prop_t filter_real(double&bit) override;
// Abstract methods from vvp_vpi_callback
void get_value(struct t_vpi_value*value);
void get_value(struct t_vpi_value*value) override;
// Abstract methods from vvp_net_fit_t
unsigned filter_size() const;
void force_fil_vec4(const vvp_vector4_t&val, const vvp_vector2_t&mask);
void force_fil_vec8(const vvp_vector8_t&val, const vvp_vector2_t&mask);
void force_fil_real(double val, const vvp_vector2_t&mask);
void release(vvp_net_ptr_t ptr, bool net_flag);
void release_pv(vvp_net_ptr_t ptr, unsigned base, unsigned wid, bool net_flag);
unsigned filter_size() const override;
void force_fil_vec4(const vvp_vector4_t&val, const vvp_vector2_t&mask) override;
void force_fil_vec8(const vvp_vector8_t&val, const vvp_vector2_t&mask) override;
void force_fil_real(double val, const vvp_vector2_t&mask) override;
void release(vvp_net_ptr_t ptr, bool net_flag) override;
void release_pv(vvp_net_ptr_t ptr, unsigned base, unsigned wid, bool net_flag) override;
// Implementation of vvp_signal_value methods
unsigned value_size() const;
vvp_bit4_t value(unsigned idx) const;
vvp_scalar_t scalar_value(unsigned idx) const;
void vec4_value(vvp_vector4_t&) const;
double real_value() const;
unsigned value_size() const override;
vvp_bit4_t value(unsigned idx) const override;
vvp_scalar_t scalar_value(unsigned idx) const override;
void vec4_value(vvp_vector4_t&) const override;
double real_value() const override;
void get_signal_value(struct t_vpi_value*vp);
void get_signal_value(struct t_vpi_value*vp) override;
private:
double bit_;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003-2022 Stephen Williams (steve@icarus.com)
* Copyright (c) 2003-2025 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -297,7 +297,7 @@ class __compile_net_resolv : public base_net_resolv {
~__compile_net_resolv() { }
bool resolve(bool message_flag);
bool resolve(bool message_flag) override;
private:
int msb_, lsb_;
@ -459,7 +459,7 @@ class __compile_real_net_resolv : public base_net_resolv {
~__compile_real_net_resolv() { }
bool resolve(bool message_flag);
bool resolve(bool message_flag) override;
private:
};