source: branches/reconfiguration/modules/vci_mem_cache/caba/test/memcache_cc_test/dspin_memcache_cc_test/caba/source/include/dspin_memcache_cc_test.h @ 872

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

reconf: adding test platform for the vci_mem_cache test mechanisms

  • The goal is to test the recently introduced test mechanisms of the coherence network in the VciMemCache?.
File size: 1.6 KB
Line 
1/**
2 * \file   dspin_memcache_cc_test.h
3 * \date   October 10, 2014
4 * \author Cesar Fuguet <cesar.fuguet-tortolero@lip6.fr>
5 */
6#ifndef DSPIN_MEMCACHE_CC_TEST_H
7#define DSPIN_MEMCACHE_CC_TEST_H
8
9#include "caba_base_module.h"
10#include "dspin_interface.h"
11#include "dspin_dhccp_param.h"
12#include <inttypes.h>
13
14namespace soclib { namespace caba {
15
16template<size_t M2P_WIDTH, size_t P2M_WIDTH>
17class DspinMemcacheCcTest : public soclib::caba::BaseModule
18{
19    public:
20
21        sc_core::sc_in<bool> p_clk;
22        sc_core::sc_in<bool> p_resetn;
23        DspinInput<M2P_WIDTH> p_dspin_m2p;
24        DspinInput<M2P_WIDTH> p_dspin_clack;
25        DspinOutput<P2M_WIDTH> p_dspin_p2m;
26
27        DspinMemcacheCcTest(sc_module_name name);
28        ~DspinMemcacheCcTest();
29
30        inline void setSrcid(uint32_t srcid)
31        {
32            m_srcid = srcid;
33        }
34
35    private:
36
37        typedef DspinDhccpParam FlitParam;
38
39        SC_HAS_PROCESS(DspinMemcacheCcTest);
40        void transition();
41        void genMoore();
42
43        /*
44         * Internal attributes
45         */
46        uint32_t m_srcid;
47
48        /*
49         * GenTest FSM constants and registers
50         */
51        enum genTest_fsm_e
52        {
53            P2M_HEADER,
54            P2M_SIGNATURE,
55            WAIT_M2P_AND_CLACK,
56            CHECK_SIGNATURE
57        };
58
59        sc_core::sc_signal<int> r_gen_test_fsm;
60        sc_core::sc_signal<uint32_t> r_sign;
61
62};                              /* class DspinMemcacheCcTest */
63
64}                               /* namespace caba */
65}                               /* namespace soclib */
66
67#endif
68
69/*
70 * vim: ts=4 : sw=4 : sts=4 : et
71 */
Note: See TracBrowser for help on using the repository browser.