cpu-architecturepci-e

PCIe TLP write packet address only 31:2 bits


Let's take a sample write packet : Suppose that the CPU wrote the value 0x12345678 to the physical address 0xfdaff040 using 32-bit addressing

sample write packet

This example is from this site (I didn't understand the explanations in the original post)

  1. Why does the address start at the second bit [31 : 2]
  2. Why isn't the address the same

Solution

  • An address of an aligned, 32-bit chunk always has two zero bits at the end of the address. You can think of this as either writing the address of the chunk to the 32-bit slot or as writing the addresses divided by four to bits 2 through 31 of the address. The result is the same either way since dividing by four is equivalent to shifting two bit positions to the right.