sim_config.h Source File

yasimavr: sim_config.h Source File
yasimavr
Loading...
Searching...
No Matches
sim_config.h
Go to the documentation of this file.
1/*
2 * sim_config.h
3 *
4 * Copyright 2021-2026 Clement Savergne <csavergne@yahoo.com>
5
6 This file is part of yasim-avr.
7
8 yasim-avr is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 yasim-avr is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with yasim-avr. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22//=======================================================================================
23
24#ifndef __YASIMAVR_CONFIG_H__
25#define __YASIMAVR_CONFIG_H__
26
27#include "sim_types.h"
28#include <vector>
29
31
32
33//=======================================================================================
34/*
35 *Structure holding core configuration parameters such as memory sizes
36 */
38
40 //Set if flash addresses use more than 16 bits
42 //Set if the Global Interrupt Enable bit is cleared automatically on interrupt routine
43 ClearGIEOnInt = 0x02
44 };
45
46 uint32_t attributes; //OR'ed value of Attributes flags
47 mem_addr_t iostart; //first address of the IO register file in the data space
48 mem_addr_t ioend; //last address of the IO register file in the data space
49 mem_addr_t ramstart; //first address of the SRAM in the data space
50 mem_addr_t ramend; //last address of the SRAM in the data space
51 mem_addr_t datasize; //Size of the data space
52 flash_addr_t flashsize; //Size of the flash
53 //Registers for extended addressing (on >64Kb variants)
56
57 bytes_t fuses; //Fuse bytes factory values
58
59};
60
61
62//=======================================================================================
63/*
64 *Structure holding device configuration parameters
65 */
67
68 std::string name;
70 std::vector<std::string> pins;
71
72 inline explicit DeviceConfiguration(CoreConfiguration& _core) : core(_core) {}
73
74};
75
76
78
79#endif //__YASIMAVR_CONFIG_H__
Representation of a I/O register address, with validity state.
Definition sim_types.h:60
#define YASIMAVR_BEGIN_NAMESPACE
Definition sim_globals.h:58
#define YASIMAVR_END_NAMESPACE
Definition sim_globals.h:59
std::vector< uint8_t > bytes_t
Definition sim_types.h:51
unsigned long flash_addr_t
Definition sim_types.h:42
unsigned long mem_addr_t
Definition sim_types.h:41
Definition sim_config.h:37
mem_addr_t ioend
Definition sim_config.h:48
reg_addr_t eind
Definition sim_config.h:55
mem_addr_t ramend
Definition sim_config.h:50
bytes_t fuses
Definition sim_config.h:57
mem_addr_t ramstart
Definition sim_config.h:49
flash_addr_t flashsize
Definition sim_config.h:52
reg_addr_t rampz
Definition sim_config.h:54
uint32_t attributes
Definition sim_config.h:46
mem_addr_t datasize
Definition sim_config.h:51
Attributes
Definition sim_config.h:39
@ ExtendedAddressing
Definition sim_config.h:41
@ ClearGIEOnInt
Definition sim_config.h:43
mem_addr_t iostart
Definition sim_config.h:47
Definition sim_config.h:66
std::vector< std::string > pins
Definition sim_config.h:70
DeviceConfiguration(CoreConfiguration &_core)
Definition sim_config.h:72
CoreConfiguration & core
Definition sim_config.h:69
std::string name
Definition sim_config.h:68