Viterbi Path Structure

Class Diagram

The UML diagram of Fig. 2 shows the overview of the class.

@startuml
  class sc_core::sc_signal

  class viterbi_path_s<int output_buffer_bit_size> {
    sc_uint<MAX_METRIC_WIDTH> metric_value
    sc_uint<MAX_PATH_WIDTH> path_size
    sc_uint<output_buffer_bit_size> path_output
    bool is_alive

    viterbi_path_s<output_buffer_bit_size>& operator= (const viterbi_path_s<output_buffer_bit_size>& obj)
    bool operator== (const viterbi_path_s<output_buffer_bit_size>& obj) const
    void sc_trace(sc_trace_file * tf, const viterbi_path_s<output_buffer_bit_size>& obj, const std::string& name)

  }

  viterbi_path_s -up-|> sc_core::sc_signal

@enduml

Fig. 2 Viterbi Path Structure

Class Description

template<int output_buffer_bit_size>
class viterbi_path_s

Viterbi Path Structure

sc_uint<MAX_METRIC_WIDTH> metric_value

Metric Value

sc_uint<MAX_PATH_WIDTH> path_size

Current size of the path

sc_uint<output_buffer_bit_size> path_output

Decoded value because of the taken path.

bool is_alive

Flags the validity of the information stored in the structure.

inline viterbi_path_s<output_buffer_bit_size> &operator=(const viterbi_path_s<output_buffer_bit_size> &obj)

Overload the = operator

Parameters:const viterbi_path_s<output_buffer_bit_size>& obj – Object to be assign to this instance.
inline bool operator==(const viterbi_path_s<output_buffer_bit_size> &obj) const

Overload the == operation

Parameters:const viterbi_path_s<output_buffer_bit_size>& obj – Object to be equal to this instance.
inline friend void sc_trace(sc_trace_file *tf, const viterbi_path_s<output_buffer_bit_size> &obj, const std::string &name)

Enables the tracing of the signal of type viterbi_path_s<output_buffer_bit_size>

Parameters:
  • sc_trace_file * tf – Trace file pointer
  • const viterbi_path_s<output_buffer_bit_size>& obj – Object instance to trace.
  • const string& name – Signal name

Structure

The structure of the clock divider is trivial since it has only one process.