New TargetMemoryDescriptor struct
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#include "TargetMemory.hpp"
|
||||
#include "TargetRegister.hpp"
|
||||
#include "TargetVariant.hpp"
|
||||
|
||||
@@ -14,7 +15,7 @@ namespace Bloom::Targets
|
||||
{
|
||||
std::string name;
|
||||
std::string id;
|
||||
std::uint32_t ramSize;
|
||||
std::map<TargetMemoryType, TargetMemoryDescriptor> memoryDescriptorsByType;
|
||||
std::map<TargetRegisterType, TargetRegisterDescriptors> registerDescriptorsByType;
|
||||
std::vector<TargetVariant> variants;
|
||||
};
|
||||
|
||||
@@ -22,6 +22,18 @@ namespace Bloom::Targets
|
||||
TargetMemoryAddressRange(std::uint32_t startAddress, std::uint32_t endAddress)
|
||||
: startAddress(startAddress), endAddress(endAddress) {};
|
||||
};
|
||||
|
||||
struct TargetMemoryDescriptor
|
||||
{
|
||||
TargetMemoryType type;
|
||||
TargetMemoryAddressRange addressRange;
|
||||
|
||||
TargetMemoryDescriptor(TargetMemoryType type, TargetMemoryAddressRange addressRange)
|
||||
: type(type), addressRange(addressRange) {};
|
||||
|
||||
std::uint32_t size() const {
|
||||
return this->addressRange.endAddress - this->addressRange.startAddress;
|
||||
}
|
||||
};
|
||||
|
||||
using TargetMemoryBuffer = std::vector<unsigned char>;
|
||||
|
||||
Reference in New Issue
Block a user