Closed Milemarco closed 1 year ago
Could you share the code where wbuf_var is declared and the process code where it is used? If wbuf_var contains sc_signal/sc_in/sc_out it should be sc_vector, not C++ array.
Its both used and declared inside of proc_clk_lsu()
of lsu.cpp
wbuf_var is a struct containing only sc_uint<>
members and overloaded operators (see lsu.h).
I uploaded the files here https://cloud.hs-augsburg.de/s/qKJK7EXr3sXrmNf
Thank you.
~ marco
I have taken almost all code from proc_clk_lsu, no error up to now. Will continue to investigate. Are you using the last ICSC?
In the last ICSC your updated design is passed, no record related errors. Please do git pull.
It needs to modify code of MLsu::FindWbufHit()
and MLsu::FindEmptyWbufEntry()
as soon as code after return is not supported. Also please check warnings and remarks reported.
int MLsu::FindWbufHit(sc_uint<30> adr)
{
SWbufEntry entry;
// Special case for entry 0 - No hit when it will be removed from wbuf this cycle...
entry = WriteSWbufEntry(0);
if ((entry.valid != 0) && (entry.adr == adr) && (wp_ack_reg == 0))
{
return 0;
} else {
// look for matching adr in SWbufEntry
int result = -1;
for (int n = 1; n < CFG_LSU_WBUF_SIZE; n++){
entry = WriteSWbufEntry(n);
if (entry.valid != 0 && entry.adr == adr){ result = n; break; }
}
return result;
}
}
int MLsu::FindEmptyWbufEntry()
{
SWbufEntry entry;
int result = -1;
for (int n = 0; n < CFG_LSU_WBUF_SIZE; n++)
{
entry = WriteSWbufEntry(n);
if (entry.valid == 0 && entry.special == 0) { result = n; break; }
}
return result;
}
I worked with Version 1.43. I updated my ICSC Version and implemented your changes and the Record type errors are gone.
This helps alot, I still get weird warning: Read not initialized non-channel variable : adr
for all occurrences of the struct variables.
Also I still get this error:
/home/marco/Workspace/intel_compiler/icsc/designs/lsu_test/lsu.cpp:137:56: fatal error: Code after function return is prohibited
if (entry.valid != 0 && entry.adr == adr){ return n; break; } //added the break
which confuses me. Maybe this is a installation Problem if you didn't get this error.
That is correct error -- code after return
is not supported, it needs to rewrite it. See my previous comment.
Yes, I made the necessary change and removed the return from the loop. Now I just need to deal with the warnings and remarks. Thank you alot!
~ marco
I have problems with a Struct i use for data storage.
Whenever I try to access the member variables I get following errors:
I dont know how i can fix this error type. Do you have any advice?
~ Marco