总是显示没有与这些操作数匹配的=运算符,刚开始学编程,请帮忙解答
void write()
{
if (ctr_l1_wr_en.read() == false)return;
unsigned int index = Cache_L2_address.read().range(7, 2);
unsigned int tag = Cache_L2_address.read().range(13, 8);
unsigned int value = ctr_l1_wr_addr.read();
int i, j;
//判断cache是否命中
for (i = 0; i <= 3; i++)
{
if (Cache_data[index].unit[i].tag == tag && Cache_data[index].unit[i].valid == true)
{
Cache_data[index].unit[i].changed = true;
Cache_data[index].unit[i].data = value;
update_used(Cache_data[index].lastused, i);
return;
}
}
//Cache miss进行更新操作
insert_newdata(index, tag, value);
}
//L1Mem模块
//从L2中读入数据
void ctr_l2_rd_en(unsigned int index, unsigned int road, unsigned int addr)
{
read_times++;
Cache_data[index].unit[road].data = L2_data[addr/4];
return;
}