Thanks Korey, you are right - I had to increase the MaxWidth parameter in impl.hh to make it work.
On Mon, 9 May 2011 01:00:27 -0400, Korey Sewell wrote: Sanity Checks on TimeBuffers and Wires: - Is your time buffer declared to be big enough? - Are you grabbing a wire outside of the range of the timebuffer? - Did you declare the size of your "insts" array to be large enough? Looks like you have a leftover instructon in your TimeBuffer that you are overwriting, causing it to be deleted. These are refcnted pointers so hopefully you arent deleting these instructions yourself because you'll get a double-delete problem. How about print out if there is a valid instruction in the timebuffer before you overwrite the slot. Then you can see what instruction is trying to be deleted: overwrite_inst = toTGUnitDecode->insts[toTGUnitDecode->size]; DPRINTF(MyFlags, "Writing to index:%i. Instruction there is [sn:%i], now I'm writing [sn:%i]n", toTGUnitDecode->size, (overwrite_inst) ? overwrite_inst->seqNum : -1, instruction->seqNum); toTGUnitDecode->insts[toTGUnitDecode->size++] = instruction; On Mon, May 9, 2011 at 12:44 AM, Andrea Pellegrini wrote: Hi all, I am using m5 to implement a DataFlow-like architecture. I am having a weird Segmentation Fault when I insert an instruction in a wire. I can send a bunch of instructions before this one with no problem, and after a little bit I get a Segmentation Fault. This is part of the code that I am using, and the function that generates the error (RefCounted::decref()). In my design I store a bunch of instructions (usually a Basic Block) in a wire and move them to the next pipeline stage. I advance the Queue when the next stage receives and stores the instructions in its own local buffer, is there anything else I need to do? Thanks! -Andrea Code that causes Segmentation Fault (fetch_impl.hh): //tg_units[index_tg_unit]->getFetchQueue()->insts[toDecode->size++] = instruction; //toDecode->insts[toDecode->size++] = instruction; typename TimeBuffer::wire toTGUnitDecode = tg_units[index_tg_unit]->getOutputWire(); toTGUnitDecode->insts[toTGUnitDecode->size++] = instruction; // Links: ------ [1] mailto:[email protected] [2] mailto:[email protected] [3] http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
_______________________________________________ m5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
