From ee369f5f559270725cc85b1fe704d935cd701a6c Mon Sep 17 00:00:00 2001 From: Brent Stapleton Date: Thu, 13 Dec 2018 16:47:39 -0800 Subject: Device3: Set default block control response SIDs In the block controllers, set the default response SIDs for input and output ports. If we don't do this, the blocks may send their responses to other blocks' responses ports. For example, without this change, the DDC may send an error packet to port 0x0000, which is assigned to the DmaFIFO. With this change, the DDC would send that packet to 0xFFFF, which isn't assigned to any other block. --- host/lib/rfnoc/block_ctrl_base.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'host') diff --git a/host/lib/rfnoc/block_ctrl_base.cpp b/host/lib/rfnoc/block_ctrl_base.cpp index fada105de..ba4db7a61 100644 --- a/host/lib/rfnoc/block_ctrl_base.cpp +++ b/host/lib/rfnoc/block_ctrl_base.cpp @@ -103,6 +103,10 @@ block_ctrl_base::block_ctrl_base( size_t buf_size_bytes = size_t(sr_read64(reg, ctrl_port)); if (buf_size_bytes > 0) n_valid_input_buffers++; _tree->create(_root_path / "input_buffer_size" / ctrl_port).set(buf_size_bytes); + // Set default destination SIDs + // Otherwise, the default is someone else's SID, which we don't want + sr_write(SR_RESP_IN_DST_SID, 0xFFFF, ctrl_port); + sr_write(SR_RESP_OUT_DST_SID, 0xFFFF, ctrl_port); } /*** Register names *****************************************************/ -- cgit v1.2.3