From e12d2b2f36743568c36568ff46a0c907cfaf0ed9 Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 18 Oct 2013 14:36:47 -0700 Subject: [PATCH] Explicitly instantiate coerce_to_width() for vvp_vector4_t --- vpi/table_mod_lexor.lex | 3 ++- vvp/vthread.cc | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/vpi/table_mod_lexor.lex b/vpi/table_mod_lexor.lex index 196df266f..738c644fe 100644 --- a/vpi/table_mod_lexor.lex +++ b/vpi/table_mod_lexor.lex @@ -6,7 +6,7 @@ %{ /* - * Copyright (C) 2011 Cary R. (cygcary@yahoo.com) + * Copyright (C) 2011-2013 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 @@ -97,6 +97,7 @@ double get_scaled_real(const char *text) case 'G': scale = "e9"; break; /* giga */ case 'T': scale = "e12"; break; /* tera */ default: + scale = ""; assert(0); break; } diff --git a/vvp/vthread.cc b/vvp/vthread.cc index 04896e7a4..147cfff88 100644 --- a/vvp/vthread.cc +++ b/vvp/vthread.cc @@ -319,6 +319,10 @@ template T coerce_to_width(const T&that, unsigned width) return res; } +/* Explicitly define the vvp_vector4_t version of coerce_to_width(). */ +template vvp_vector4_t coerce_to_width(const vvp_vector4_t&that, + unsigned width); + static unsigned long* vector_to_array(struct vthread_s*thr, unsigned addr, unsigned wid) {