19UHAL_REGISTER_DERIVED_NODE(VLCmdGeneratorNode)
35 std::stringstream status;
40 TLOG() << status.str();
50 reset_sub_nodes(getNode(
"csr.ctrl"));
51 getNode(
"csr.ctrl.addr").write(
address);
52 getNode(
"csr.ctrl.tx_en").write(
enable);
53 getNode(
"csr.ctrl.go").write(0x1);
54 getNode(
"csr.ctrl.go").write(0x0);
55 getClient().dispatch();
62 uint32_t coarse_delay,
64 uint32_t phase_delay)
const
66 reset_sub_nodes(getNode(
"csr.ctrl"),
false);
67 getNode(
"csr.ctrl.tx_en").write(0x0);
68 getNode(
"csr.ctrl.addr").write(
address);
69 getNode(
"csr.ctrl.cdel").write(coarse_delay);
70 getNode(
"csr.ctrl.fdel").write(fine_delay);
71 getNode(
"csr.ctrl.pdel").write(phase_delay);
72 getNode(
"csr.ctrl.update").write(0x1);
73 getNode(
"csr.ctrl.go").write(0x1);
74 getNode(
"csr.ctrl.go").write(0x0);
75 getClient().dispatch();
Base class for timing nodes.
std::map< std::string, uhal::ValWord< uint32_t > > read_sub_nodes(const uhal::Node &node, bool dispatch=true) const
Read subnodes.
Class for master global node.
void switch_endpoint_sfp(uint32_t address, bool enable=false) const
Control the endpoint sfp tx laser.
virtual ~VLCmdGeneratorNode()
std::string get_status(bool print_out=false) const override
Print the status of the timing node.
void apply_endpoint_delay(uint32_t address, uint32_t coarse_delay, uint32_t fine_delay, uint32_t phase_delay) const
Adjust endpoint delay.
#define TLOG_DEBUG(lvl,...)
std::string format_reg_table(T data, std::string title, std::vector< std::string > headers)
Format reg-value table.
std::string format_reg_value(T reg_value, uint32_t base)