OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [sysc/] [include/] [Utils.h] - Diff between revs 63 and 462

Show entire file | Details | Blame | View Log

Rev 63 Rev 462
Line 29... Line 29...
#ifndef UTILS_H
#ifndef UTILS_H
#define UTILS_H
#define UTILS_H
 
 
#include <stdint.h>
#include <stdint.h>
 
 
 
 
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//! A class offering a number of convenience utilities for the GDB Server.
//! A class offering a number of convenience utilities for the GDB Server.
 
 
//! All static functions. This class is not intended to be instantiated.
//! All static functions. This class is not intended to be instantiated.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
class  Utils
class Utils {
{
 
public:
public:
 
 
  static uint8_t     char2Hex (int  c);
  static uint8_t     char2Hex (int  c);
  static const char  hex2Char (uint8_t  d);
  static const char  hex2Char (uint8_t  d);
  static void        reg2Hex (uint32_t  val,
        static void reg2Hex(uint32_t val, char *buf);
                              char     *buf);
 
  static uint32_t    hex2Reg (char *buf);
  static uint32_t    hex2Reg (char *buf);
  static void        ascii2Hex (char *dest,
        static void ascii2Hex(char *dest, char *src);
                                char *src);
        static void hex2Ascii(char *dest, char *src);
  static void        hex2Ascii (char *dest,
        static int rspUnescape(char *buf, int len);
                                char *src);
 
  static int         rspUnescape (char *buf,
 
                                  int   len);
 
  static uint32_t    htotl (uint32_t hostVal);
  static uint32_t    htotl (uint32_t hostVal);
  static uint32_t    ttohl (uint32_t targetVal);
  static uint32_t    ttohl (uint32_t targetVal);
 
 
 
 
private:
private:
 
 
  // Private constructor cannot be instantiated
  // Private constructor cannot be instantiated
  Utils () {};
         Utils() {
 
        };
 
 
};      // class Utils
};      // class Utils
 
 
#endif  // UTILS_H
#endif  // UTILS_H
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.