diff --git a/tb/pcie.py b/tb/pcie.py index 3491f5d60..f350b8c18 100644 --- a/tb/pcie.py +++ b/tb/pcie.py @@ -1327,7 +1327,7 @@ class MSICapability(object): # Mask bits self.msi_mask_bits = byte_mask_update(self.msi_mask_bits, mask, data) & 0xffffffff - def issue_msi_interrupt(self, number=0, attr=0): + def issue_msi_interrupt(self, number=0, attr=0, tc=0): if not self.msi_enable: print("MSI disabled") return @@ -1335,16 +1335,8 @@ class MSICapability(object): print("MSI message number out of range") return - tlp = TLP() - tlp.fmt_type = TLP_MEM_WRITE - tlp.requester_id = self.get_id() - tlp.attr = attr - addr = self.msi_message_address - if addr > 0xffffffff: - tlp.fmt_type = TLP_MEM_WRITE_64 - tlp.data = [self.msi_message_data & ~(2**self.msi_multiple_message_enable-1) | number] - tlp.set_be(addr, 4) - yield self.send(tlp) + data = self.msi_message_data & ~(2**self.msi_multiple_message_enable-1) | number + yield self.mem_write(self.msi_message_address, struct.pack(' 0xffffffff: - tlp.fmt_type = TLP_MEM_WRITE_64 - tlp.data = [data] - tlp.set_be(addr, 4) - yield self.send(tlp) + yield self.mem_write(addr, struct.pack('