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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [sysc/] [include/] [Utils.h] - Blame information for rev 64

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 63 julius
// ----------------------------------------------------------------------------
2
 
3
// GDB Server Utilties: definition
4
 
5
// Copyright (C) 2008  Embecosm Limited <info@embecosm.com>
6
 
7
// Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
8
 
9
// This file is part of the cycle accurate model of the OpenRISC 1000 based
10
// system-on-chip, ORPSoC, built using Verilator.
11
 
12
// This program is free software: you can redistribute it and/or modify it
13
// under the terms of the GNU Lesser General Public License as published by
14
// the Free Software Foundation, either version 3 of the License, or (at your
15
// option) any later version.
16
 
17
// This program is distributed in the hope that it will be useful, but WITHOUT
18
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
20
// License for more details.
21
 
22
// You should have received a copy of the GNU Lesser General Public License
23
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
24
 
25
// ----------------------------------------------------------------------------
26
 
27
// $Id: Utils.h 324 2009-03-07 09:42:52Z jeremy $
28
 
29
#ifndef UTILS_H
30
#define UTILS_H
31
 
32
#include <stdint.h>
33
 
34
 
35
//-----------------------------------------------------------------------------
36
//! A class offering a number of convenience utilities for the GDB Server.
37
 
38
//! All static functions. This class is not intended to be instantiated.
39
//-----------------------------------------------------------------------------
40
class  Utils
41
{
42
public:
43
 
44
  static uint8_t     char2Hex (int  c);
45
  static const char  hex2Char (uint8_t  d);
46
  static void        reg2Hex (uint32_t  val,
47
                              char     *buf);
48
  static uint32_t    hex2Reg (char *buf);
49
  static void        ascii2Hex (char *dest,
50
                                char *src);
51
  static void        hex2Ascii (char *dest,
52
                                char *src);
53
  static int         rspUnescape (char *buf,
54
                                  int   len);
55
  static uint32_t    htotl (uint32_t hostVal);
56
  static uint32_t    ttohl (uint32_t targetVal);
57
 
58
 
59
private:
60
 
61
  // Private constructor cannot be instantiated
62
  Utils () {};
63
 
64
};      // class Utils
65
 
66
#endif  // UTILS_H

powered by: WebSVN 2.1.0

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