From 2a1154ec169f48ba23a04f01199c2d674f2cecf4 Mon Sep 17 00:00:00 2001 From: Rick Altherr Date: Thu, 1 Feb 2018 12:20:02 -0800 Subject: [PATCH] lib: xc7series: config packet subclass that owns the payload Signed-off-by: Rick Altherr --- .../configuration_packet_with_payload.h | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lib/include/prjxray/xilinx/xc7series/configuration_packet_with_payload.h diff --git a/lib/include/prjxray/xilinx/xc7series/configuration_packet_with_payload.h b/lib/include/prjxray/xilinx/xc7series/configuration_packet_with_payload.h new file mode 100644 index 00000000..bdcdc3c3 --- /dev/null +++ b/lib/include/prjxray/xilinx/xc7series/configuration_packet_with_payload.h @@ -0,0 +1,33 @@ +#ifndef PRJXRAY_LIB_XILINX_XC7SERIES_g_CONFIGURATION_PACKET_WITH_PAYLOAD_H +#define PRJXRAY_LIB_XILINX_XC7SERIES_g_CONFIGURATION_PACKET_WITH_PAYLOAD_H + +#include + +#include +#include +#include +#include + +namespace prjxray { +namespace xilinx { +namespace xc7series { + +template +class ConfigurationPacketWithPayload : public ConfigurationPacket { + public: + ConfigurationPacketWithPayload( + Opcode op, + ConfigurationRegister reg, + const std::array& payload) + : ConfigurationPacket(1, op, reg, absl::Span(payload_)), + payload_(std::move(payload)) {} + + private: + std::array payload_; +}; // namespace xc7series + +} // namespace xc7series +} // namespace xilinx +} // namespace prjxray + +#endif // PRJXRAY_LIB_XILINX_XC7SERIES_g_CONFIGURATION_PACKET_WITH_PAYLOAD_H