return get_usv();
}
+sv_shape_t* state_t::get_shape(reg_t reg)
+{
+ if (prv == PRV_M || prv == PRV_S || reg == 0) {
+ return NULL;
+ }
+ for (int i = 0; i < 3; i++) {
+ if (remap[i].regidx == reg) {
+ return &shape[i];
+ }
+ }
+ return NULL;
+}
+
void processor_t::set_debug(bool value)
{
debug = value;
sv_csr_t &get_ssv() { return ssv; }
sv_csr_t &get_usv() { return usv; }
+ sv_remap_t remap[3];
+ sv_shape_t shape[3];
+
+ sv_shape_t *get_shape(reg_t reg);
+
#endif
uint32_t fflags;
bool sv_check_reg(bool intreg, uint64_t reg);
+typedef struct {
+ uint64_t regidx: 7; // actual i.e. real register (0-127)
+ unsigned int shape: 2; // which shape register to use
+} sv_remap_t;
+
+typedef struct {
+ int xsz;
+ int ysz;
+ int zsz;
+ int offs;
+ int permute;
+} sv_shape_t;
+
#endif