diff --git a/vpi/sys_plusargs.c b/vpi/sys_plusargs.c index f060277cd..b2d4d75af 100644 --- a/vpi/sys_plusargs.c +++ b/vpi/sys_plusargs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2014 Stephen Williams (steve@icarus.com) + * Copyright (c) 2002-2015 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 @@ -118,6 +118,7 @@ static PLI_INT32 sys_value_plusargs_compiletf(ICARUS_VPI_CONST PLI_BYTE8*name) case vpiLongIntVar: case vpiRealVar: case vpiTimeVar: + case vpiStringVar: break; default: diff --git a/vvp/vpi_priv.h b/vvp/vpi_priv.h index df83b2322..5daaee893 100644 --- a/vvp/vpi_priv.h +++ b/vvp/vpi_priv.h @@ -1,7 +1,7 @@ #ifndef IVL_vpi_priv_H #define IVL_vpi_priv_H /* - * Copyright (c) 2001-2014 Stephen Williams (steve@icarus.com) + * Copyright (c) 2001-2015 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 @@ -531,6 +531,7 @@ class __vpiStringVar : public __vpiBaseVar { 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); }; extern vpiHandle vpip_make_string_var(const char*name, vvp_net_t*net); diff --git a/vvp/vpi_string.cc b/vvp/vpi_string.cc index 1f7bb1851..5135fbcd9 100644 --- a/vvp/vpi_string.cc +++ b/vvp/vpi_string.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014 Stephen Williams (steve@icarus.com) + * Copyright (c) 2012-2015 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 @@ -79,6 +79,16 @@ void __vpiStringVar::vpi_get_value(p_vpi_value val) val->format = vpiSuppressVal; } +vpiHandle __vpiStringVar::vpi_put_value(p_vpi_value val, int) +{ + vvp_fun_signal_string*fun = dynamic_cast (get_net()->fun); + assert(fun); + assert(val->format == vpiStringVal); + vvp_net_ptr_t dest (get_net(), 0); + vvp_send_string(dest, val->value.str, vthread_get_wt_context()); + return 0; +} + vpiHandle vpip_make_string_var(const char*name, vvp_net_t*net) { struct __vpiScope*scope = vpip_peek_current_scope();