From 10b2310c52b2b9cbb71dbc0c48d2c495cae43f17 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 20 Apr 2011 09:11:01 -0700 Subject: [PATCH] $q_full should return x for an invalid id. After some more thought I believe it is better for $q_full to return 'bx instead of 2 when $q_full is given an invalid id. This will make the typical full/not full checks both return false. We still return an error code in the status variable. --- vpi/sys_queue.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vpi/sys_queue.c b/vpi/sys_queue.c index 86ad0c6de..274b80076 100644 --- a/vpi/sys_queue.c +++ b/vpi/sys_queue.c @@ -1194,9 +1194,7 @@ static PLI_INT32 sys_q_full_calltf(ICARUS_VPI_CONST PLI_BYTE8 *name) val.format = vpiIntVal; val.value.integer = IVL_QUEUE_UNDEFINED_ID; vpi_put_value(status, &val, 0, vpiNoDelay); - val.format = vpiIntVal; - val.value.integer = 2; /* An error value. */ - vpi_put_value(callh, &val, 0, vpiNoDelay); + fill_variable_with_x(callh); return 0; }