update names
This commit is contained in:
2
incl/iss/arch/.gitignore
vendored
2
incl/iss/arch/.gitignore
vendored
@ -1 +1 @@
|
||||
/tgf_b.h
|
||||
/tgc_*.h
|
||||
|
@ -30,8 +30,8 @@
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
#ifndef _TGF_C_H_
|
||||
#define _TGF_C_H_
|
||||
#ifndef _TGC_C_H_
|
||||
#define _TGC_C_H_
|
||||
|
||||
#include <array>
|
||||
#include <iss/arch/traits.h>
|
||||
@ -41,11 +41,11 @@
|
||||
namespace iss {
|
||||
namespace arch {
|
||||
|
||||
struct tgf_c;
|
||||
struct tgc_c;
|
||||
|
||||
template <> struct traits<tgf_c> {
|
||||
template <> struct traits<tgc_c> {
|
||||
|
||||
constexpr static char const* const core_type = "TGF_C";
|
||||
constexpr static char const* const core_type = "TGC_C";
|
||||
|
||||
static constexpr std::array<const char*, 35> reg_names{
|
||||
{"X0", "X1", "X2", "X3", "X4", "X5", "X6", "X7", "X8", "X9", "X10", "X11", "X12", "X13", "X14", "X15", "X16", "X17", "X18", "X19", "X20", "X21", "X22", "X23", "X24", "X25", "X26", "X27", "X28", "X29", "X30", "X31", "PC", "NEXT_PC", "PRIV"}};
|
||||
@ -53,7 +53,7 @@ template <> struct traits<tgf_c> {
|
||||
static constexpr std::array<const char*, 35> reg_aliases{
|
||||
{"X0", "X1", "X2", "X3", "X4", "X5", "X6", "X7", "X8", "X9", "X10", "X11", "X12", "X13", "X14", "X15", "X16", "X17", "X18", "X19", "X20", "X21", "X22", "X23", "X24", "X25", "X26", "X27", "X28", "X29", "X30", "X31", "PC", "NEXT_PC", "PRIV"}};
|
||||
|
||||
enum constants {XLEN=32, PCLEN=32, MISA_VAL=0b01000000000000000001000100000100, CSR_SIZE=4096, fence=0, fencei=1, fencevmal=2, fencevmau=3, eei_aligned_addresses=1, MUL_LEN=64};
|
||||
enum constants {XLEN=32, PCLEN=32, MISA_VAL=0b01000000000000000001000100000100, PGSIZE=0x1000, PGMASK=0b111111111111, CSR_SIZE=4096, fence=0, fencei=1, fencevmal=2, fencevmau=3, eei_aligned_addresses=1, MUL_LEN=64};
|
||||
|
||||
constexpr static unsigned FP_REGS_SIZE = 0;
|
||||
|
||||
@ -179,15 +179,15 @@ template <> struct traits<tgf_c> {
|
||||
};
|
||||
};
|
||||
|
||||
struct tgf_c: public arch_if {
|
||||
struct tgc_c: public arch_if {
|
||||
|
||||
using virt_addr_t = typename traits<tgf_c>::virt_addr_t;
|
||||
using phys_addr_t = typename traits<tgf_c>::phys_addr_t;
|
||||
using reg_t = typename traits<tgf_c>::reg_t;
|
||||
using addr_t = typename traits<tgf_c>::addr_t;
|
||||
using virt_addr_t = typename traits<tgc_c>::virt_addr_t;
|
||||
using phys_addr_t = typename traits<tgc_c>::phys_addr_t;
|
||||
using reg_t = typename traits<tgc_c>::reg_t;
|
||||
using addr_t = typename traits<tgc_c>::addr_t;
|
||||
|
||||
tgf_c();
|
||||
~tgf_c();
|
||||
tgc_c();
|
||||
~tgc_c();
|
||||
|
||||
void reset(uint64_t address=0) override;
|
||||
|
||||
@ -208,9 +208,9 @@ struct tgf_c: public arch_if {
|
||||
inline uint64_t stop_code() { return interrupt_sim; }
|
||||
|
||||
inline phys_addr_t v2p(const iss::addr_t& addr){
|
||||
if (addr.space != traits<tgf_c>::MEM || addr.type == iss::address_type::PHYSICAL ||
|
||||
if (addr.space != traits<tgc_c>::MEM || addr.type == iss::address_type::PHYSICAL ||
|
||||
addr_mode[static_cast<uint16_t>(addr.access)&0x3]==address_type::PHYSICAL) {
|
||||
return phys_addr_t(addr.access, addr.space, addr.val&traits<tgf_c>::addr_mask);
|
||||
return phys_addr_t(addr.access, addr.space, addr.val&traits<tgc_c>::addr_mask);
|
||||
} else
|
||||
return virt2phys(addr);
|
||||
}
|
||||
@ -223,7 +223,7 @@ struct tgf_c: public arch_if {
|
||||
|
||||
protected:
|
||||
#pragma pack(push, 1)
|
||||
struct TGF_C_regs {
|
||||
struct TGC_C_regs {
|
||||
uint32_t X0 = 0;
|
||||
uint32_t X1 = 0;
|
||||
uint32_t X2 = 0;
|
||||
@ -275,4 +275,4 @@ protected:
|
||||
|
||||
}
|
||||
}
|
||||
#endif /* _TGF_C_H_ */
|
||||
#endif /* _TGC_C_H_ */
|
Reference in New Issue
Block a user