op_vvec_print()

Abstract

Sends a text representation of a value vector to a standard output device.

Syntax

op_vvec_print (vector)
Argument Type Description
vector Vvec_Vector value vector to send to an output device
[This is a vector that will be sent to the standard output device, such as a screen.]

Return Type

void

No return value

Example

/* respond to esys interface interrupt */
data_bus = op_intrpt_esys_interface ();

/* Obtain value from esys interface */
data_vector = op_vvec_create (OpC_Type_Stdlogic);
op_esys_interface_vector_get (data_bus, data_vector, 0);

/* print informational string */
printf ("The following value was asserted on the data bus:\n");

op_vvec_print (data_bus);

Details

When invoked, this function sends output to the standard output device stating whether the value vector is valid and, if it is, stating its size. For bit vectors, the contents of the vector are displayed with the most significant bit on the left and the least significant bit on the right. All other vectors appear with position 0 on the left, and all subsequent elements then appear in order.

For example, the value vector {1, 2, 3, 4, 5} prints as:

1 2 3 4 5

whereas the bit vector representation of a byte containing the number 5 appears as:

0 0 0 0 0 1 0 1

Purpose

Provides a mechanism to view the contents of a value vector by sending them, in a readable format, to an output device. In general, op_vvec_print() is a debugging aid that will not be a necessary part of a finished model. During the model development process, however, it is often useful to view the contents of a given vector.

Errors

  • Recoverable Error: Value vector is invalid.

Reference

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com