Altera_Forum
Honored Contributor
14 years agoAvalon-MM Master reading
Hello,
I am trying to run Avalon-MM master to read data from memory chip, so I've written a code accessible here: http://paste.org/41475 When I try to count data when readdatavalid is asserted, the counter doesn't work (even doesn't start to count) and the FSM is stuck on state "end_read". When I disable the readdatavalid signal check (code part 2), then everything works ok, but the counted data is wrong, since readdatavalid signal sometimes is deasserted by the interconnect. The counter then fills up before the valid data ends and goes to the first state again - all the data after counter fill up is lost. Why the counter doesn't work, when readdatavalid is asserted? I suppose this is the issue of the first read cycle. I can see write master writing data to the memory, so I am sure about mem_write signal as it is also goes until the last state and stucks there waiting for readdatavalid signal to comeup. I can't catch signal in SignalTap to check what's happening on the very first FSM cycle when I assert read signal, but it should work fine as the FSM is trivial here. I am out of ideas :(