17#ifndef _SCC_TRACE_TYPES_HH_
18#define _SCC_TRACE_TYPES_HH_
20#include <sysc/datatypes/fx/fx.h>
21#include <sysc/tracing/sc_tracing_ids.h>
28enum trace_type { WIRE, REAL };
33 static inline trace_type get_type() {
return std::is_floating_point<T>::value ? REAL : WIRE; }
34 static inline unsigned get_bits(T
const&) {
return std::is_floating_point<T>::value ? 1 :
sizeof(T) * 8; }
37template <>
inline trace_type traits<sc_dt::sc_fxval>::get_type() {
return REAL; }
38template <>
inline trace_type traits<sc_dt::sc_fxval_fast>::get_type() {
return REAL; }
39template <>
inline trace_type traits<sc_dt::sc_fxnum>::get_type() {
return REAL; }
40template <>
inline trace_type traits<sc_dt::sc_fxnum_fast>::get_type() {
return REAL; }
42template <>
inline unsigned traits<bool>::get_bits(
bool const&) {
return 1; }
43template <>
inline unsigned traits<sc_dt::sc_bit>::get_bits(sc_dt::sc_bit
const&) {
return 1; }
44template <>
inline unsigned traits<sc_dt::sc_logic>::get_bits(sc_dt::sc_logic
const&) {
return 1; }
45template <>
inline unsigned traits<sc_dt::sc_bv_base>::get_bits(sc_dt::sc_bv_base
const& o) {
return o.length(); }
46template <>
inline unsigned traits<sc_dt::sc_lv_base>::get_bits(sc_dt::sc_lv_base
const& o) {
return o.length(); }
47template <>
inline unsigned traits<sc_dt::sc_int_base>::get_bits(sc_dt::sc_int_base
const& o) {
return o.length(); }
48template <>
inline unsigned traits<sc_dt::sc_uint_base>::get_bits(sc_dt::sc_uint_base
const& o) {
return o.length(); }
49template <>
inline unsigned traits<sc_dt::sc_signed>::get_bits(sc_dt::sc_signed
const& o) {
return o.length(); }
50template <>
inline unsigned traits<sc_dt::sc_unsigned>::get_bits(sc_dt::sc_unsigned
const& o) {
return o.length(); }
51template <>
inline unsigned traits<sc_dt::sc_fxval>::get_bits(sc_dt::sc_fxval
const&) {
return 1; }
52template <>
inline unsigned traits<sc_dt::sc_fxval_fast>::get_bits(sc_dt::sc_fxval_fast
const&) {
return 1; }
55template <>
inline unsigned traits<sc_dt::sc_fxnum>::get_bits(sc_dt::sc_fxnum
const&) {
return 1; }
56template <>
inline unsigned traits<sc_dt::sc_fxnum_fast>::get_bits(sc_dt::sc_fxnum_fast
const& o) {
return 1; }
SCC SystemC tracing utilities.