|
|
|
@ -399,7 +399,8 @@ void state_t::reset(processor_t* const proc, reg_t max_isa) |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
void processor_t::vectorUnit_t::reset(){ |
|
|
|
void processor_t::vectorUnit_t::reset() |
|
|
|
{ |
|
|
|
free(reg_file); |
|
|
|
VLEN = get_vlen(); |
|
|
|
ELEN = get_elen(); |
|
|
|
@ -420,7 +421,8 @@ void processor_t::vectorUnit_t::reset(){ |
|
|
|
set_vl(0, 0, 0, -1); // default to illegal configuration
|
|
|
|
} |
|
|
|
|
|
|
|
reg_t processor_t::vectorUnit_t::set_vl(int rd, int rs1, reg_t reqVL, reg_t newType){ |
|
|
|
reg_t processor_t::vectorUnit_t::set_vl(int rd, int rs1, reg_t reqVL, reg_t newType) |
|
|
|
{ |
|
|
|
int new_vlmul = 0; |
|
|
|
if (vtype->read() != newType) { |
|
|
|
vtype->write_raw(newType); |
|
|
|
@ -536,7 +538,8 @@ void processor_t::set_pmp_num(reg_t n) |
|
|
|
n_pmp = n; |
|
|
|
} |
|
|
|
|
|
|
|
void processor_t::set_pmp_granularity(reg_t gran) { |
|
|
|
void processor_t::set_pmp_granularity(reg_t gran) |
|
|
|
{ |
|
|
|
// check the pmp granularity is set from dtb(!=0) and is power of 2
|
|
|
|
if (gran < (1 << PMP_SHIFT) || (gran & (gran - 1)) != 0) { |
|
|
|
fprintf(stderr, "error: bad pmp granularity '%ld' from the dtb\n", (unsigned long)gran); |
|
|
|
|