From 2da520bea3036020a73719f16bc42c4df0ecd2d0 Mon Sep 17 00:00:00 2001 From: Rick Altherr Date: Tue, 9 Jan 2018 13:15:43 -0800 Subject: [PATCH] Remove unused ConfigurationFrameRange Signed-off-by: Rick Altherr --- lib/CMakeLists.txt | 1 - .../xc7series/configuration_frame_range.h | 47 ------------------- .../xc7series/configuration_frame_range.cc | 41 ---------------- 3 files changed, 89 deletions(-) delete mode 100644 lib/include/prjxray/xilinx/xc7series/configuration_frame_range.h delete mode 100644 lib/xilinx/xc7series/configuration_frame_range.cc diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 759f5eb4..2edffb1d 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -6,7 +6,6 @@ add_library(libprjxray xilinx/xc7series/block_type.cc xilinx/xc7series/configuration_bus.cc xilinx/xc7series/configuration_column.cc - xilinx/xc7series/configuration_frame_range.cc xilinx/xc7series/configuration_packet.cc xilinx/xc7series/configuration_register.cc xilinx/xc7series/frame_address.cc diff --git a/lib/include/prjxray/xilinx/xc7series/configuration_frame_range.h b/lib/include/prjxray/xilinx/xc7series/configuration_frame_range.h deleted file mode 100644 index 30397039..00000000 --- a/lib/include/prjxray/xilinx/xc7series/configuration_frame_range.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef PRJXRAY_LIB_XILINX_XC7SERIES_CONFIGURATION_FRAME_RANGE_H_ -#define PRJXRAY_LIB_XILINX_XC7SERIES_CONFIGURATION_FRAME_RANGE_H_ - -#include - -#include -#include - -namespace prjxray { -namespace xilinx { -namespace xc7series { - -class ConfigurationFrameRange { - public: - ConfigurationFrameRange() : begin_(0), end_(0) {} - - ConfigurationFrameRange(FrameAddress begin, FrameAddress end) - : begin_(begin), end_(end){}; - - FrameAddress begin() const { return begin_; } - FrameAddress end() const { return end_; } - - size_t size() const { return end_ - begin_; } - bool empty() const { return size() == 0; } - - bool Contains(FrameAddress address) const; - - private: - FrameAddress begin_; - FrameAddress end_; -}; - -} // namespace xc7series -} // namespace xilinx -} // namespace prjxray - -namespace YAML { -template <> -struct convert { - static Node encode( - const prjxray::xilinx::xc7series::ConfigurationFrameRange& rhs); - static bool decode( - const Node& node, - prjxray::xilinx::xc7series::ConfigurationFrameRange& lhs); -}; -} // namespace YAML -#endif // PRJXRAY_LIB_XILINX_XC7SERIES_CONFIGURATION_FRAME_RANGE_H_ diff --git a/lib/xilinx/xc7series/configuration_frame_range.cc b/lib/xilinx/xc7series/configuration_frame_range.cc deleted file mode 100644 index 3fb69235..00000000 --- a/lib/xilinx/xc7series/configuration_frame_range.cc +++ /dev/null @@ -1,41 +0,0 @@ -#include - -namespace prjxray { -namespace xilinx { -namespace xc7series { - -bool ConfigurationFrameRange::Contains(FrameAddress address) const { - return address >= begin_ && address < end_; -} - -} // namespace xc7series -} // namespace xilinx -} // namespace prjxray - -namespace xc7series = prjxray::xilinx::xc7series; - -namespace YAML { - -Node convert::encode( - const xc7series::ConfigurationFrameRange& rhs) { - Node node; - node.SetTag("xilinx/xc7series/configuration_frame_range"); - node["begin"] = rhs.begin(); - node["end"] = rhs.end(); - return node; -} - -bool convert::decode( - const Node& node, - xc7series::ConfigurationFrameRange& lhs) { - if (node.Tag() != "xilinx/xc7series/configuration_frame_range" || - !node["begin"] || !node["end"]) - return false; - - lhs = xc7series::ConfigurationFrameRange( - node["begin"].as(), - node["end"].as()); - return true; -} - -} // namespace YAML