mirror of https://github.com/openXC7/prjxray.git
Remove unused ConfigurationFrameRange
Signed-off-by: Rick Altherr <kc8apf@kc8apf.net>
This commit is contained in:
parent
2b34fbb35d
commit
2da520bea3
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
#ifndef PRJXRAY_LIB_XILINX_XC7SERIES_CONFIGURATION_FRAME_RANGE_H_
|
||||
#define PRJXRAY_LIB_XILINX_XC7SERIES_CONFIGURATION_FRAME_RANGE_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include <prjxray/xilinx/xc7series/frame_address.h>
|
||||
#include <yaml-cpp/yaml.h>
|
||||
|
||||
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<prjxray::xilinx::xc7series::ConfigurationFrameRange> {
|
||||
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_
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
#include <prjxray/xilinx/xc7series/configuration_frame_range.h>
|
||||
|
||||
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<xc7series::ConfigurationFrameRange>::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<xc7series::ConfigurationFrameRange>::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<xc7series::FrameAddress>(),
|
||||
node["end"].as<xc7series::FrameAddress>());
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace YAML
|
||||
Loading…
Reference in New Issue