Why does trn_tbuf_av toggle even though I am not sending TLP packets?
Trn_tbuf_av can change even though you are not putting packets into the core using trn_tsof_n, trn_teof_n, etc. This can occur because internally the core must generate some TLPs. For example, the core generates completion TLPs for any read or write to the configuration space. Also, in some cases, the core generates message TLPs. Each time this occurs, internally, it loads these TLPs into the same transmit buffer used by you. Consequently, this is why you observe trn_tbuf_av changes even though there has been no change on trn_tsof_n or trn_teof_n. You might also notice that after reset, trn_tbuf_av has a value of zero or a full status, and then it counts upward to its maximum value. This is also expected because the core checks the transmit buffer and notifies you that all buffers are available.