lib: xc7series: shorten accessor names

_address suffix on accessors is unnecessary and somewhat inaccurate.
The returned values are indices rather than frame addresses.

Signed-off-by: Rick Altherr <[email protected]>
This commit is contained in:
Rick Altherr
2018-01-10 14:28:17 -08:00
parent 17985d1934
commit 53d7f1f80b
6 changed files with 35 additions and 39 deletions
+6 -9
View File
@@ -159,11 +159,11 @@ int main(int argc, char** argv) {
static_cast<uint32_t>(it.first),
static_cast<unsigned int>(it.first.block_type()),
it.first.is_bottom_half_rows() ? 1 : 0,
it.first.row_address(), it.first.column_address(),
it.first.minor_address());
it.first.row(), it.first.column(),
it.first.minor());
if (FLAGS_p) {
if (it.first.minor_address() == 0 && !pgmdata.empty())
if (it.first.minor() == 0 && !pgmdata.empty())
pgmsep.push_back(pgmdata.size());
pgmdata.push_back(std::vector<bool>());
@@ -195,12 +195,9 @@ int main(int argc, char** argv) {
it.first.is_bottom_half_rows()
? 1
: 0,
it.first
.row_address(),
it.first
.column_address(),
it.first
.minor_address());
it.first.row(),
it.first.column(),
it.first.minor());
else
fprintf(f,
"bit_%08x_%03d_"
+12 -11
View File
@@ -18,17 +18,18 @@ int main(int argc, char* argv[]) {
for (uint32_t frame_address_raw;
(*input_stream) >> std::setbase(0) >> frame_address_raw;) {
xc7series::FrameAddress frame_address(frame_address_raw);
std::cout
<< "[" << std::hex << std::showbase << std::setw(10)
<< frame_address_raw << "] "
<< (frame_address.is_bottom_half_rows() ? "BOTTOM" : "TOP")
<< " Row=" << std::setw(2) << std::dec
<< static_cast<unsigned int>(frame_address.row_address())
<< " Column=" << std::setw(2) << std::dec
<< frame_address.column_address()
<< " Minor=" << std::setw(2) << std::dec
<< static_cast<unsigned int>(frame_address.minor_address())
<< " Type=" << frame_address.block_type() << std::endl;
std::cout << "[" << std::hex << std::showbase << std::setw(10)
<< frame_address_raw << "] "
<< (frame_address.is_bottom_half_rows() ? "BOTTOM"
: "TOP")
<< " Row=" << std::setw(2) << std::dec
<< static_cast<unsigned int>(frame_address.row())
<< " Column=" << std::setw(2) << std::dec
<< frame_address.column() << " Minor=" << std::setw(2)
<< std::dec
<< static_cast<unsigned int>(frame_address.minor())
<< " Type=" << frame_address.block_type()
<< std::endl;
}
return 0;