orca-sim
GdbProcessorBase.hpp
Go to the documentation of this file.
1 /******************************************************************************
2  * This file is part of project ORCA. More information on the project
3  * can be found at the following repositories at GitHub's website.
4  *
5  * http://https://github.com/andersondomingues/orca-sim
6  * http://https://github.com/andersondomingues/orca-software
7  * http://https://github.com/andersondomingues/orca-mpsoc
8  * http://https://github.com/andersondomingues/orca-tools
9  *
10  * Copyright (C) 2018-2020 Anderson Domingues, <ti.andersondomingues@gmail.com>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License along
23  * with this program; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 ******************************************************************************/
26 #ifndef ORCASIM_GDBRSP_INCLUDE_GDBPROCESSORBASE_HPP_
27 #define ORCASIM_GDBRSP_INCLUDE_GDBPROCESSORBASE_HPP_
28 
29 // base API includes
30 #include <iostream>
31 #include <list>
32 #include <string>
33 
34 #include "ProcessorBase.hpp"
35 #include "SimulationTime.hpp"
36 #include "GdbProcessorState.hpp"
37 #include "Memory.hpp"
38 #include "RspServer.hpp"
39 
45 
46 namespace orcasim::gdbrsp {
47 
48 template <typename T>
49 class GdbProcessorBase : public ProcessorBase<T>{
50  private:
53 
54  public:
55  static uint32_t GDBSERVER_PORT;
56  GdbProcessorBase(std::string name, MemoryAddr initial_pc,
57  Memory* mem, std::string gdb_ip, int gdb_prt);
58 
61 };
62 
63 // Some of the most used instances. More can be added later.
64 template class GdbProcessorBase<uint8_t>;
65 template class GdbProcessorBase<uint16_t>;
66 template class GdbProcessorBase<uint32_t>;
67 template class GdbProcessorBase<uint64_t>;
68 
69 // Some of the most used instances. More can be added later.
70 template class GdbProcessorBase<int8_t>;
71 template class GdbProcessorBase<int16_t>;
72 template class GdbProcessorBase<int32_t>;
73 template class GdbProcessorBase<int64_t>;
74 
75 } // namespace orcasim::gdbrsp
76 #endif // ORCASIM_GDBRSP_INCLUDE_GDBPROCESSORBASE_HPP_
77 
SimulationTime Run()
Run method from the base TimedModel class, overloaded.
#define MemoryAddr
Definition: MemoryType.hpp:34
uint32_t SimulationTime
GdbProcessorBase(std::string name, MemoryAddr initial_pc, Memory *mem, std::string gdb_ip, int gdb_prt)
This class models a memory module.
Definition: Memory.hpp:55
This class implements the base operation for generic processor implementations.
GdbProcessorState< T > * GetState()
Defines a generic state model for use within processor models.
GdbProcessorState< T > * _state