when I say partial word access, I mean 16-bit (two byte) or 8-bit (byte) read/write.
Background: In one of our recent projects, Cyclone V SoC is used to replace 386 CPU in an existing product. I am responsible for the board and FPGA design. Another software engineer is developing software under DS5 environment. Avalon MM Slave interface is use on FPGA side. Software needs to read/write data on the FPGA.
Problem description: Everything works fine on Altera System Console. However, it does not work so well on DS5. I have problem with the addresses that are not multiple of 4. For example, it works for address 0x800, I can read a full 32-bit word, or a 16-bit half-word, or a single byte. But for address 0x802, I cannot read out anything. All I got is all zeros.
Troubleshooting being conducted: I thought it relates to where the data should be put on the 32bit data bus. So I revised FPGA code to duplicate the data on the 32-bit bus, but DS5 still reads all zeros. Also tried to run SignalTap to capture waveforms, but DS5 and SignalTap cannot be run at the same time through the same JTAG connector.
anybody know what could be the problem?
Thanks, Goodwin.
I have resolved the problem yesterday. I will update the post in the community.
The problem is with the byteenable signal generated by the AXI-Avalon bridge. It is asserted to correct value for only one clock cycle.
To access address 0x802, the byteenable needs to be “1100”, and it should maintain the same value during the entire transaction. However, it only stay effective for one clock cycle then changed to different value.
I have to revise my FPGA code to latch the byteenable signal, and use the latched value in my FPGA logic.
The Avalon Master used by Altera System Console generates the correct byteenable signal during the entire transaction. So that is why my FPGA works well on System Console, but failed on DS-5.
Qiangsheng Xiang
Senior Engineer
GE Hitachi Nuclear Energy America
910-819-6344 (work)
910-233-2985 (cell)
Congrats Qiangsheng! You resolved it and I appreciate your feedback info about the status of your project.