Files
openairinterface5g/common/utils/LOG
Cedric Roux 39c42bca41 bugfix: bad usage of T() in the log module
The LOG_x() and T() logic was wrong.

LOG_x() goes to the terminal when T_stdout == 1 or T_stdout == 2.
It goes to T() when T_stdout == 0 or T_stdout == 2.

The call T() does the check for T_stdout == 0 or T_stdout == 2.
So we have to call it out of the check "if (T_stdout)".

So, well, let's fix that.

Some spacing was fixed as well. clang-format may complain.
2023-03-10 12:10:08 +01:00
..
2022-11-30 14:30:18 +01:00
2021-10-24 14:47:24 +02:00
2023-02-11 12:32:34 +01:00

VCD Plugin v0.1

The VCD plugin outputs signals to a .vcd file which is readable by gtkwave (http://en.wikipedia.org/wiki/GTKWave).
Signals may have two types:
- Variables to dump the state of a variable (range 0..2^64 - 1).
- Functions to log function usage (implies two call to VCD API: IN and OUT)

This module is always built in, but is only used when -V oaisim option is added.
The VCD file generated is called openair_vcd_dump.vcd and is located in the execution folder.

Usage:
1) To dump function usage:
    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(FUNCTION_NAME, VCD_FUNCTION_IN); at start of function
    VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(FUNCTION_NAME, VCD_FUNCTION_OUT); at end of function
    FUNCTION_NAME should be defined in the enum in vcd_signal_dumper.h and the function name should be addded at the right place in the vcd_signal_dumper.c file.

2) To dump a variable:
    VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VARIABLE_NAME, value); where VARIABLE_NAME is defined as described above for functions and value is the state of the variable at log time.

TODO list:
- Add support for signed variables
- Create more than two module (for now: one for variable, one for functions)
- Integrate date in filename
- Use a more accurate clock (if necessary) or use a host specific clock (for other systems than Linux)

Useful link:
http://www.beyondttl.com/vcd.php