When I use a 32bits x 16locations ram in a pci target I chose 0x200 - 0x23f space address. If I want to write at location1 I must to write on address pci bus the address 0x204???? (1 location is 32bits ==> 4 bytes address)...It is correct?
If I use a fifo with portin(for write) and portout(for read) , 32bits x 16 locations too, I mapped at 0x200-0x23f. When I write in fifo through pci bus I write always the same address on pci address bus?????
Yes, in my example RAM, address 1 of the 32 bits RAM starting at 0x200 would be at 0x204. That's because I didn't make the RAM 8-bits addressable, only 32-bits. Otherwise you would be able to go to address 0x201 for example and read or write just one byte.
If you use a FIFO, you typically access it through a single address, that’s correct.
Is the verilog code the same if we read/write to the memory as the MEMORY, not I/O. Is there anything else to change except the command code on the BE lines during command phase?