Skip to content

Commit

Permalink
Added size to PCIe message metas
Browse files Browse the repository at this point in the history
  • Loading branch information
nichosta committed Mar 2, 2024
1 parent 24e1a08 commit 9fafe2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion protocol/driverprotocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func NewMemCopyH2DReq(
) *MemCopyH2DReq {
req := new(MemCopyH2DReq)
req.ID = sim.GetIDGenerator().Generate()
req.MsgMeta.TrafficBytes = len(srcBuffer)
req.SendTime = time
req.Src = src
req.Dst = dst
Expand All @@ -131,7 +132,7 @@ func (m *MemCopyD2HReq) Meta() *sim.MsgMeta {
return &m.MsgMeta
}

// NewMemCopyD2HReq created a new MemCopyH2DReq
// NewMemCopyD2HReq created a new MemCopyD2HReq
func NewMemCopyD2HReq(
time sim.VTimeInSec,
src, dst sim.Port,
Expand All @@ -140,6 +141,7 @@ func NewMemCopyD2HReq(
) *MemCopyD2HReq {
req := new(MemCopyD2HReq)
req.ID = sim.GetIDGenerator().Generate()
req.MsgMeta.TrafficBytes = len(dstBuffer)
req.SendTime = time
req.Src = src
req.Dst = dst
Expand Down

0 comments on commit 9fafe2b

Please sign in to comment.