Forum Discussion
Instantiation of the module in a toplevel module
- 3 years ago
Hi,
When "fifo_0_out_address"=1, readdata take in the channel value but not having opposite endianness check image below:
As this time channel had been being assigned some value.
Check document details:
If the read is valid, that is, the FIFO core is not empty, both data and packet status information are popped from the FIFO core. The packet status information is obtained by reading at address offset 1. Reading from address offset 1 does not pop data from the FIFO core.
Thanks,
Best regards,
Sheng
Thank you very much for helping me. sorry I forgot to mention that my simulation tool is ModelSim. Regarding the point 3, is there any specific reason why we need bit swizzling here?. Is it something needed for the memory-mapped data transfer? If I manually modify
"assign avalonmm_data[7 : 0] = avalonst_data[31 : 24];
assign avalonmm_data[15 : 8] = avalonst_data[23 : 16];
assign avalonmm_data[23 : 16] = avalonst_data[15 : 8];
assign avalonmm_data[31 : 24] = avalonst_data[7 : 0];"
to have the same endianness, or it's not recommended?
I am curious that if I am streaming a bitstream data (say "100000100010001") to FIFO and then do a Memory Map read though the output port to a peripheral (say DDR4), then how this endianness mis-match will be corrected (I mean how the correct bit sequence "100000100010001" will be saved in the DDR4)
Regarding the point 4, Yeh I am not using the status interface. I am just curious that if my host is some other IP, then the FIFO address will be set automatically by the "Assign Base-address"? or we have to do something manually?
I have noticed that setting the "fifo_0_out_address"=0 in the simulation test bench (\FIFO_TEST\fifo_qsys\sim\fifo_qsys_tb.v) an output data that is having opposite endianness to that of "fifo_0_out_address"=1 . I have a hard time in understanding why this happening. Do you have any thought regarding this?
Thank you very much.
Read the user guide I linked to which is also linked to in PD. That explains how to use IP like the FIFO.