source: branches/reconfiguration/modules/dspin_router/caba/test/recovery_bcast_evaluation/synthetic_dspin_network/caba/source/include/synthetic_dspin_network.h @ 1009

Last change on this file since 1009 was 1009, checked in by cfuguet, 9 years ago

add a new platform for the evaluation of the broadcast recovery
replication policy.

File size: 2.7 KB
RevLine 
[1009]1/* -*- c++ -*-
2 *
3 * SOCLIB_LGPL_HEADER_BEGIN
4 *
5 * This file is part of SoCLib, GNU LGPLv2.1.
6 *
7 * SoCLib is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as published
9 * by the Free Software Foundation; version 2.1 of the License.
10 *
11 * SoCLib is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with SoCLib; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 *
21 * SOCLIB_LGPL_HEADER_END
22 *
23 * Authors  : Cesar Armando Fuguet Tortolero
24 * Date     : jul 2015
25 * Copyright: UPMC - LIP6
26 */
27#ifndef SYNTHETIC_DSPIN_NETWORK
28#define SYNTHETIC_DSPIN_NETWORK
29
30#include <systemc>
31#include <stdint.h>
32#include "caba_base_module.h"
33#include "dspin_router.h"
34#include "dspin_broadcast_generator.h"
35
36namespace soclib {
37namespace caba {
38
39
40class SyntheticDspinNetwork
41    : public soclib::caba::BaseModule
42{
43    static const int X_WIDTH = 4;
44    static const int Y_WIDTH = 4;
45    static const int DSPIN_WIDTH = 39;
46    static const int DSPIN_ROUTER_FIFO_DEPTH = 4;
47    static const int DSPIN_GENERATOR_FIFO_DEPTH = 50;
48
49    typedef DspinBroadcastGenerator<DSPIN_WIDTH, DSPIN_WIDTH>
50    DspinNetworkGenerator;
51    typedef DspinRouter<DSPIN_WIDTH>
52    DspinNetworkRouter;
53    typedef DspinSignals<DSPIN_WIDTH>
54    DspinNetworkSignal;
55
56     
57public:
58
59    sc_core::sc_in<bool> p_clk;
60    sc_core::sc_in<bool> p_resetn;
61
62    SyntheticDspinNetwork(sc_module_name name,
63                          const size_t x_size,
64                          const size_t y_size,
65                          const size_t load);
66
67    ~SyntheticDspinNetwork();
68
69    void reset();
70    void set_faulty_router(const size_t faulty_x, const size_t faulty_y);
71    void print_stats(const size_t x, const size_t y);
72
73     
74private:
75
76    const size_t m_x_size;
77    const size_t m_y_size;
78     
79    DspinNetworkGenerator **dspinGenerator;
80    DspinNetworkRouter **dspinRouter;
81
82    DspinNetworkSignal ***sL;
83    DspinNetworkSignal ***sH;
84    DspinNetworkSignal ***sV;
85     
86    sc_core::sc_signal<uint32_t>** sConfigRouter;
87};                  // end class SyntheticDspinNetwork
88
89
90}                   // end namespace caba
91}                   // end namespace soclib
92
93#endif              // end SYNTHETIC_DSPIN_NETWORK
94
95// Local Variables:
96// tab-width: 4
97// c-basic-offset: 4
98// c-file-offsets:((innamespace . 0)(inline-open . 0))
99// indent-tabs-mode: nil
100// End:
Note: See TracBrowser for help on using the repository browser.