source: branches/reconfiguration/modules/vci_local_crossbar/caba/source/include/vci_local_crossbar.h @ 1001

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

reconf: introducing a hardware barrier in the global-local interface of
the local interconnects.

  • This barrier is controlled by a port (barrier enable) in the dspin and vci local interconnects.
  • The barrier enable port is connected to a configuration register of the XICU component to allow the software to control this barrier. The barrier is enabled when the barrier enable port value is different of 0xFFFFFFFF. As the configuration register of the XICU component are reset to 0, this barrier is enabled by default.
  • This barrier allows to isolate the cluster from the rest of the architecture and only if it self-diagnoses as functional, it release the barrier to communicate with the others.
  • The same barrier enable signal is connected to the five local interconnects. Therefore, either all are released or all are disabled.
  • If a local initiator or an external initiator sends a packet out or into the cluster respectively, and the barrier is enabled, the packet is dropped.
File size: 3.5 KB
Line 
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 * Copyright (c) UPMC, Lip6, Asim
24 *         Alain Greiner <alain.greiner@lip6.fr>, 2005
25 *         Nicolas Pouillon <nipo@ssji.net>, 2008
26 *
27 * Maintainers: alain
28 */
29
30#ifndef SOCLIB_CABA_VCI_LOCAL_CROSSBAR_H_
31#define SOCLIB_CABA_VCI_LOCAL_CROSSBAR_H_
32
33#include <systemc>
34#include "caba_base_module.h"
35#include "vci_initiator.h"
36#include "vci_target.h"
37#include "vci_buffers.h"
38#include "mapping_table.h"
39#include "address_decoding_table.h"
40
41namespace soclib { namespace caba {
42
43using namespace soclib::common;
44
45template<typename pkt_t> class SimpleCrossbar;
46
47////////////////////////////////////
48template<typename vci_param>
49class VciLocalCrossbar
50////////////////////////////////////
51    : public BaseModule
52{
53public:
54
55    sc_in<bool>                               p_clk;
56    sc_in<bool>                               p_resetn;
57
58    sc_in<uint32_t>                          *p_barrier_enable;
59
60    VciInitiator<vci_param>                  *p_to_target;
61    VciTarget<vci_param>                     *p_to_initiator;
62    VciTarget<vci_param>                      p_target_to_up;
63    VciInitiator<vci_param>                   p_initiator_to_up;
64
65private:
66
67    size_t                                    m_nb_attached_initiators;
68    size_t                                    m_nb_attached_targets;
69
70    AddressDecodingTable<uint64_t, size_t>    m_cmd_rt;   // command routing table
71    AddressDecodingTable<uint64_t, bool>      m_cmd_lt;   // command locality table
72
73    AddressDecodingTable<uint32_t, size_t>    m_rsp_rt;   // response routing table
74    AddressDecodingTable<uint32_t, bool>      m_rsp_lt;   // response locality table
75
76    VciInitiator<vci_param>                 **m_ports_to_target;
77    VciTarget<vci_param>                    **m_ports_to_initiator;
78
79    SimpleCrossbar<VciCmdBuffer<vci_param> > *m_cmd_crossbar;
80    SimpleCrossbar<VciRspBuffer<vci_param> > *m_rsp_crossbar;
81
82    void transition();
83    void genMealy();
84
85protected:
86    SC_HAS_PROCESS(VciLocalCrossbar);
87
88public:
89    void print_trace();
90
91    VciLocalCrossbar( sc_core::sc_module_name             name,
92                                          const soclib::common::MappingTable  &mt,
93                                          const size_t                        cluster_id,
94                                          const size_t                        nb_attached_initiators,
95                                          const size_t                        nb_attached_targets,
96                      const size_t                        default_target_id,
97                      const bool                          hardware_barrier = false );
98    ~VciLocalCrossbar();
99};
100
101}}
102
103#endif /* SOCLIB_CABA_VCI_LOCAL_CROSSBAR_H_ */
104
105// Local Variables:
106// tab-width: 4
107// c-basic-offset: 4
108// c-file-offsets:((innamespace . 0)(inline-open . 0))
109// indent-tabs-mode: nil
110// End:
111
112// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
Note: See TracBrowser for help on using the repository browser.