mirror of https://github.com/openXC7/prjxray.git
lib: xc7series: ostream overload for BlockType
Makes debugging a bit easier. Signed-off-by: Rick Altherr <kc8apf@kc8apf.net> Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
This commit is contained in:
parent
47e02d4cfd
commit
fd3a5d8bab
|
|
@ -3,6 +3,7 @@ add_library(libprjxray
|
|||
memory_mapped_file.cc
|
||||
segbits_file_reader.cc
|
||||
xilinx/xc7series/bitstream_reader.cc
|
||||
xilinx/xc7series/block_type.cc
|
||||
xilinx/xc7series/configuration_frame_address.cc
|
||||
xilinx/xc7series/configuration_packet.cc
|
||||
xilinx/xc7series/configuration_register.cc
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef PRJXRAY_LIB_XILINX_XC7SERIES_BLOCK_TYPE_H_
|
||||
#define PRJXRAY_LIB_XILINX_XC7SERIES_BLOCK_TYPE_H_
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace prjxray {
|
||||
namespace xilinx {
|
||||
namespace xc7series {
|
||||
|
|
@ -11,7 +13,9 @@ enum class BlockType : unsigned int {
|
|||
CFG_CLB = 0b010,
|
||||
/* reserved = 0b011, */
|
||||
};
|
||||
|
||||
|
||||
std::ostream &operator<<(std::ostream &o, BlockType value);
|
||||
|
||||
} // namespace xc7series
|
||||
} // namespace xilinx
|
||||
} // namespace prjxray
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
#include <prjxray/xilinx/xc7series/block_type.h>
|
||||
|
||||
namespace prjxray {
|
||||
namespace xilinx {
|
||||
namespace xc7series {
|
||||
|
||||
std::ostream &operator<<(std::ostream &o, BlockType value) {
|
||||
switch (value) {
|
||||
case BlockType::CLB_IO_CLK:
|
||||
o << "CLB/IO/CLK";
|
||||
break;
|
||||
case BlockType::BLOCK_RAM:
|
||||
o << "Block RAM";
|
||||
break;
|
||||
case BlockType::CFG_CLB:
|
||||
o << "Config CLB";
|
||||
break;
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
} // namespace xc7series
|
||||
} // namespace xilinx
|
||||
} // namespace prjxray
|
||||
Loading…
Reference in New Issue