class sv_reg_t {
public:
- sv_reg_t(uint64_t _reg) : reg(_reg) /*, elwidth(0)*/ { } // default elwidth
- //sv_reg_t(uint64_t _reg, uint8_t _elwidth) : reg(_reg), elwidth(_elwidth) {}
+ sv_reg_t(uint64_t _reg) : reg(_reg) , elwidth(0) { } // default elwidth
+ sv_reg_t(uint64_t _reg, uint8_t _elwidth) : reg(_reg), elwidth(_elwidth) {}
uint64_t reg;
uint8_t elwidth;
public:
uint64_t get_data() { return reg; }
- //uint8_t get_width() { return elwidth; }
+ uint8_t get_width() { return elwidth; }
operator uint64_t() const & { return reg; }
operator sv_sreg_t() const &;
class sv_sreg_t {
public:
- sv_sreg_t(int64_t _reg) : reg(_reg) /*, elwidth(0)*/ {} // default elwidth
- //sv_sreg_t(int64_t _reg, uint8_t _elwidth) : reg(_reg), elwidth(_elwidth) {}
+ sv_sreg_t(int64_t _reg) : reg(_reg) , elwidth(0) {} // default elwidth
+ sv_sreg_t(int64_t _reg, uint8_t _elwidth) : reg(_reg), elwidth(_elwidth) {}
int64_t reg;
uint8_t elwidth;
public:
int64_t get_data() { return reg; }
- //uint8_t get_width() { return elwidth; }
+ uint8_t get_width() { return elwidth; }
operator int64_t() const& { return reg; }
- //operator sv_reg_t() { return sv_reg_t((uint64_t)reg, elwidth); }
- operator sv_reg_t() const& { return sv_reg_t((uint64_t)reg); }
+ operator sv_reg_t() const& { return sv_reg_t((uint64_t)reg, elwidth); }
};
-//inline sv_reg_t::operator sv_sreg_t() { return sv_sreg_t((int64_t)reg, elwidth); }
inline sv_reg_t::operator sv_sreg_t() const &
-{ return sv_sreg_t((int64_t)reg); }
+{ return sv_sreg_t((int64_t)reg, elwidth); }
#endif