orca-sim
Tile.h
Go to the documentation of this file.
1 
23 #ifndef __TILE_H
24 #define __TILE_H
25 
26 //std API
27 #include <iostream>
28 
29 //model API
30 #include <TDmaNetif.h>
31 #include <TRouter.h>
32 #include <UMemory.h>
33 #include <USignal.h>
34 
35 //include peripheral addresses
36 #include <MemoryMap.h>
37 
38 #define MEM1_SIZE ORCA_MEMORY_SIZE_1 /* recv memory */
39 #define MEM1_BASE ORCA_MEMORY_BASE_1
40 
41 #define MEM2_SIZE ORCA_MEMORY_SIZE_2 /* send memory */
42 #define MEM2_BASE ORCA_MEMORY_BASE_2
43 
44 class Tile{
45 
46 private:
47 
48  std::string _name;
49 
50  HermesRouter* _router; //hermes router
51  Signal<uint32_t>* _signal_id; // //self-id wire
52 
53 public:
54 
55  /*** ctor. & dtor. ***/
56  Tile(uint32_t x, uint32_t y);
57  ~Tile();
58 
59  /*** getters ***/
60  HermesRouter* GetRouter();
61  Signal<uint32_t>* GetSignalId();
62  std::string GetName();
63 
64  /*** setters ***/
65  void SetName(std::string);
66 };
67 
68 
69 #endif /* TILE_H */
std::string _name
Definition: Tile.h:48
~Tile()
Destructor: cleans up allocated memory.
Definition: Tile.cpp:58
void SetName(std::string)
Set a name to this tile.
Definition: Tile.cpp:112
HermesRouter * _router
Definition: Tile.h:50
std::string GetName()
Get current tile name.
Definition: Tile.cpp:92
HermesRouter * GetRouter()
Get current router of the PE.
Definition: Tile.cpp:83
Definition: Tile.h:44
Signal< uint32_t > * GetSignalId()
Get current signal for tile ID.
Definition: Tile.cpp:100
Signal< uint32_t > * _signal_id
Definition: Tile.h:51
Tile(uint32_t x, uint32_t y)
This file is part of project URSA.
Definition: Tile.cpp:38