Skip to content
This repository has been archived by the owner on Jan 31, 2022. It is now read-only.

Hw access optimization #327

Merged
merged 15 commits into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,7 @@ namespace gem {
* @param gbtcfg is an array of 92 32-bit words
*/

void configureGBT(uint8_t const& gbtID, uint32_t const* gbtcfg); // FIXME, make private
void configureGBT(uint8_t const& gbtID, std::array<const uint32_t, 92> const& gbtcfg);
void configureGBT(uint8_t const& gbtID, std::array<const uint8_t, ::gbt::CONFIG_SIZE> const& gbtcfg);

/**
* @brief Sends a write request for all configuration registers on all GBTx chips
Expand Down
12 changes: 3 additions & 9 deletions gemhardware/devices/src/common/optohybrid/HwOptoHybrid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,19 +228,13 @@ void gem::hw::optohybrid::HwOptoHybrid::configureVFATs(std::map<std::string, uin
//} GEM_CATCH_RPC_ERROR("HwOptoHybrid::configureVFATs", gem::hw::devices::exception::Exception);
}


void gem::hw::optohybrid::HwOptoHybrid::configureGBT(uint8_t const& gbtID, uint32_t const* gbtcfg)
void gem::hw::optohybrid::HwOptoHybrid::configureGBT(uint8_t const& gbtID, std::array<const uint8_t, ::gbt::CONFIG_SIZE> const& gbtcfg)
{
gbt::config_t t_gbtconfig = {*(uint8_t*) gbtcfg};
configureGBT(gbtID, gbtcfg.data());
try {
xhal::common::rpc::call<::gbt::writeGBTConfig>(rpc, static_cast<uint32_t>(m_link), static_cast<uint32_t>(gbtID), t_gbtconfig);
lpetre-ulb marked this conversation as resolved.
Show resolved Hide resolved
} GEM_CATCH_RPC_ERROR("HwOptoHybrid::configureAllGBTs", gem::hw::devices::exception::Exception);
}
} GEM_CATCH_RPC_ERROR("HwOptoHybrid::configureGBT", gem::hw::devices::exception::Exception);


void gem::hw::optohybrid::HwOptoHybrid::configureGBT(uint8_t const& gbtID, std::array<const uint32_t, 92> const& gbtcfg)
{
configureGBT(gbtID, gbtcfg.data());
}


Expand Down