OpenCores
URL https://opencores.org/ocsvn/fwrisc/fwrisc/trunk

Subversion Repositories fwrisc

[/] [fwrisc/] [trunk/] [ve/] [fwrisc/] [tests/] [fwrisc_zephyr_tests.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 mballance
/*
2
 * fwrisc_zephyr_tests.h
3
 *
4
 * Copyright 2018 Matthew Ballance
5
 *
6
 * Licensed under the Apache License, Version 2.0 (the
7
 * "License"); you may not use this file except in
8
 * compliance with the License.  You may obtain a copy of
9
 * the License at
10
 *
11
 * http://www.apache.org/licenses/LICENSE-2.0
12
 *
13
 * Unless required by applicable law or agreed to in
14
 * writing, software distributed under the License is
15
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
16
 * CONDITIONS OF ANY KIND, either express or implied.  See
17
 * the License for the specific language governing
18
 * permissions and limitations under the License.
19
 *
20
 *
21
 *  Created on: Nov 16, 2018
22
 *      Author: ballance
23
 */
24
 
25
#ifndef INCLUDED_FWRISC_ZEPHYR_TESTS_H
26
#define INCLUDED_FWRISC_ZEPHYR_TESTS_H
27
#include "fwrisc_ctest_base.h"
28
#include "ElfSymtabReader.h"
29
#include <functional>
30
 
31
class fwrisc_zephyr_tests : public fwrisc_ctest_base {
32
public:
33
        fwrisc_zephyr_tests();
34
 
35
        virtual ~fwrisc_zephyr_tests();
36
 
37
        virtual void SetUp();
38
 
39
        virtual void regwrite(uint32_t raddr, uint32_t rdata);
40
 
41
        virtual void exec(uint32_t addr, uint32_t instr);
42
 
43
        virtual void memwrite(uint32_t addr, uint8_t mask, uint32_t data);
44
 
45
protected:
46
 
47
        void check(const char *exp[], uint32_t exp_sz);
48
 
49
protected:
50
        uint32_t                                                                        m_ram_console;
51
        bool                                                                            m_raw_console;
52
        std::string                                                                     m_buffer;
53
        std::vector<std::string>                                        m_console_out;
54
        std::function<void(const std::string &)>        m_msg_listener;
55
 
56
//      std::function<void(const std::)
57
};
58
 
59
#endif /* INCLUDED_FWRISC_ZEPHYR_TESTS_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.