Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/timing source mux #123

Merged
merged 11 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions config/etc/addrtab/v7xx/kerberos_mib_v2/pdts_mib_v2_io.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
<node id="sfp0_los" mask="0x8"/>
<node id="sfp1_los" mask="0x10"/>
<node id="sfp2_los" mask="0x20"/>
<node id="pll_lol" mask="0x40"/>
<node id="mmcm_ok" mask="0x80"/>
<node id="mmcm_sticky" mask="0x100"/>
<node id="pll_ok" mask="0x40"/>
<node id="pll_sticky" mask="0x80"/>
<node id="mmcm_ok" mask="0x100"/>
<node id="mmcm_sticky" mask="0x200"/>
</node>
</node>
<node id="config" address="0x2" description="board/firmware config" fwinfo="endpoint;width=1">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<node id="pdts_timing_source_mux" description="Switch between upstream timing sources" fwinfo="endpoint">
<node id="csr" address="0x0" fwinfo="endpoint;width=0">
<node id="ctrl" address="0x0">
<node id="src" mask="0x1"/>
<node id="src" mask="0x3"/>
</node>
</node>
</node>
2 changes: 1 addition & 1 deletion include/timing/BoreasDesign.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class BoreasDesign : public MasterDesign, public HSIDesignInterface
* @brief Prepare the timing master for data taking.
*
*/
void configure() const override;
void configure(ClockSource clock_source, TimestampSource ts_source) const override;

/**
* @brief Give info to collector.
Expand Down
73 changes: 0 additions & 73 deletions include/timing/CRTDesign.hpp

This file was deleted.

55 changes: 0 additions & 55 deletions include/timing/CRTDesignInterface.hpp

This file was deleted.

79 changes: 0 additions & 79 deletions include/timing/CRTNode.hpp

This file was deleted.

4 changes: 2 additions & 2 deletions include/timing/ChronosDesign.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// Timing Headers
#include "timing/HSINode.hpp"
#include "timing/HSIDesignInterface.hpp"
#include "timing/EndpointDesign.hpp"
#include "timing/TopDesign.hpp"

// uHal Headers
#include "uhal/DerivedNode.hpp"
Expand Down Expand Up @@ -47,7 +47,7 @@ class ChronosDesign : public TopDesign, public HSIDesignInterface
* @brief Prepare the timing endpoint for data taking.
*
*/
void configure() const override;
void configure(ClockSource clock_source) const override;

/**
* @brief Read endpoint firmware version.
Expand Down
12 changes: 6 additions & 6 deletions include/timing/EndpointDesign.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ class EndpointDesign : public TopDesign, public EndpointDesignInterface
*/
std::string get_status(bool print_out = false) const override;

/**
* @brief Prepare the timing endpoint for data taking.
*
*/
void configure() const override;

// /**
// * @brief Give info to collector.
// */
Expand All @@ -68,6 +62,12 @@ class EndpointDesign : public TopDesign, public EndpointDesignInterface
*/
void validate_firmware_version() const override;

/**
* @brief Prepare the timing endpoint for data taking.
*
*/
void configure(ClockSource clock_source) const override;

/**
* @brief Give info to collector.
*/
Expand Down
5 changes: 5 additions & 0 deletions include/timing/FIBIONode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ class FIBIONode : public SFPMuxIONode {
*/
void switch_sfp_tx(uint32_t sfp_id, bool turn_on) const override; // NOLINT(build/unsigned)

/**
* @brief Clocks ready?
*/
bool clocks_ok() const override;

// /**
// * @brief Fill hardware monitoring structure.
// */
Expand Down
5 changes: 5 additions & 0 deletions include/timing/FIBV2IONode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ class FIBV2IONode : public IONode {
*/
void switch_sfp_tx(uint32_t sfp_id, bool turn_on) const override; // NOLINT(build/unsigned)

/**
* @brief Clocks ready?
*/
bool clocks_ok() const override {return true;} //TODO measure clock freq.

/**
* @brief Print status of on-board PLL.
*/
Expand Down
5 changes: 5 additions & 0 deletions include/timing/FMCIONode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ class FMCIONode : public IONode
*/
std::string get_clock_frequencies_table(bool print_out = false) const override;

/**
* @brief Clocks ready?
*/
bool clocks_ok() const override;

/**
* @brief control tx laser of on-board SFP
*/
Expand Down
6 changes: 3 additions & 3 deletions include/timing/FanoutDesign.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ class FanoutDesign : public TopDesign, public EndpointDesignInterface, public CD
* @brief Prepare the timing fanout for data taking.
*
*/
void configure() const override;
void configure(ClockSource clock_source) const override;

/**
* @brief Validate endpoint firmware version.
*
*/
void validate_firmware_version() const override { /*firmware version in fanout design right now*/}
void validate_firmware_version() const override;

uint32_t read_firmware_version() const override { /*firmware version in fanout design right now*/}
uint32_t read_firmware_version() const override;

/**
* @brief Give info to collector.
Expand Down
7 changes: 6 additions & 1 deletion include/timing/GIBIONode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class GIBIONode : public IONode
/**
* @brief Reset timing node with clock file lookup
*/
void reset(const ClockSource& clock_source) const override;
using IONode::reset;

/**
* @brief Print status of on-board SFP.
Expand All @@ -79,6 +79,11 @@ class GIBIONode : public IONode
*/
void switch_sfp_soft_tx_control_bit(uint32_t sfp_id, bool turn_on) const override; // NOLINT(build/unsigned)

/**
* @brief Clocks ready?
*/
bool clocks_ok() const override;

/**
* @brief control tx laser of on-board SFP softly (I2C command)
*/
Expand Down
4 changes: 2 additions & 2 deletions include/timing/GaiaDesign.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ class GaiaDesign : public MasterDesign, public EndpointDesignInterface, public C
// void get_info(opmonlib::InfoCollector& ci, int level) const override;

/**
* @brief Prepare the timing fanout for data taking.
* @brief Prepare the timing unit for data taking.
*
*/
void configure() const override;
void configure(ClockSource clock_source, TimestampSource ts_source, IRIGEpoch epoch) const;

/**
* @brief Give info to collector.
Expand Down
5 changes: 5 additions & 0 deletions include/timing/IONode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ class IONode : public TimingNode
*/
virtual void reset(const ClockSource& clock_source) const;

/**
* @brief Clocks ready?
*/
virtual bool clocks_ok() const = 0;

virtual void get_info(timinghardwareinfo::TimingPLLMonitorData& mon_data) const {get_pll()->get_info(mon_data);}

static const std::map<BoardType, std::string>& get_board_type_map() { return board_type_map; }
Expand Down
Loading
Loading