20UHAL_REGISTER_DERIVED_NODE(SIMIONode)
24 :
IONode(node, "", "", "", {}, {})
44 std::stringstream status;
50 TLOG() << status.str();
75 std::stringstream info;
81 std::vector<std::pair<std::string, std::string>> hardware_info;
84 hardware_info.push_back(std::make_pair(
"Board type",
get_board_type_map().at(board_type)));
85 }
catch (
const std::out_of_range& e) {
91 }
catch (
const std::out_of_range& e) {
96 hardware_info.push_back(std::make_pair(
"Carrier type",
get_carrier_type_map().at(carrier_type)));
97 }
catch (
const std::out_of_range& e) {
102 hardware_info.push_back(std::make_pair(
"Design type",
get_design_type_map().at(design_type)));
103 }
catch (
const std::out_of_range& e) {
109 TLOG() << info.str();
128 TLOG_DEBUG(0) <<
"Simulation does not support PLL config";
136 TLOG_DEBUG(0) <<
"Simulation does not support reading of freq";
145 TLOG_DEBUG(0) <<
"Simulation does not support freq table";
146 return "Simulation does not support freq table";
154 TLOG_DEBUG(0) <<
"Simulation does not support PLL status";
155 return "Simulation does not support PLL status";
163 TLOG_DEBUG(0) <<
"Simulation does not support SFP I2C";
164 return "Simulation does not support SFP I2C";
172 TLOG_DEBUG(0) <<
"Simulation does not support SFP I2C";
180 TLOG_DEBUG(0) <<
"Simulation does not support SFP control";
Base class for timing IO nodes.
virtual uint32_t read_board_type() const
Read the word identifying the timing board.
virtual void write_soft_reset_register() const
Write soft reset register.
virtual uint32_t read_carrier_type() const
Read the word identifying the FPFA carrier board.
virtual uint32_t read_design_type() const
Read the word identifying the firmware design in the FPGA.
static const std::map< DesignType, std::string > & get_design_type_map()
static const std::map< BoardRevision, std::string > & get_board_revision_map()
static const std::map< BoardType, std::string > & get_board_type_map()
static const std::map< CarrierType, std::string > & get_carrier_type_map()
Class for the timing simulation IO.
BoardRevision get_board_revision() const override
Read the word identifying the timing board.
std::string get_clock_frequencies_table(bool print_out=false) const override
Print frequencies of on-board clocks.
void switch_sfp_soft_tx_control_bit(uint32_t sfp_id, bool turn_on) const override
Control tx laser of on-board SFP softly (I2C command)
std::string get_pll_status(bool print_out=false) const override
Print status of on-board PLL.
std::string get_hardware_info(bool print_out=false) const override
Print hardware information.
void configure_pll(const std::string &clock_config_file="") const override
Configure clock chip.
uint64_t read_board_uid() const override
Read the word containing the timing board UID.
std::vector< double > read_clock_frequencies() const override
Read frequencies of on-board clocks.
std::string get_uid_address_parameter_name() const override
Get the UID address parameter name.
void reset(const std::string &clock_config_file) const override
Reset IO.
std::string get_sfp_status(uint32_t sfp_id, bool print_out=false) const override
Print status of on-board SFP.
std::string get_status(bool print_out=false) const override
Get status string, optionally print.
void switch_sfp_tx(uint32_t sfp_id, bool turn_on) const override
Control tx laser of on-board SFP softly (I2C command)
std::map< std::string, uhal::ValWord< uint32_t > > read_sub_nodes(const uhal::Node &node, bool dispatch=true) const
Read subnodes.
#define TLOG_DEBUG(lvl,...)
CarrierType convert_value_to_carrier_type(uint32_t darrier_type)
BoardType convert_value_to_board_type(uint32_t Board_type)
std::string format_reg_table(T data, std::string title, std::vector< std::string > headers)
Format reg-value table.
DesignType convert_value_to_design_type(uint32_t design_type)
std::string format_reg_value(T reg_value, uint32_t base)