Revision ce5940f8 host/lib/usrp/usrp2/clock_ctrl.cpp

b/host/lib/usrp/usrp2/clock_ctrl.cpp
86 86

  
87 87
    void set_rate_rx_dboard_clock(double rate){
88 88
        assert_has(get_rates_rx_dboard_clock(), rate, "rx dboard clock rate");
89
        size_t divider = size_t(rate/get_master_clock_rate());
89
        size_t divider = size_t(get_master_clock_rate()/rate);
90 90
        //bypass when the divider ratio is one
91 91
        _ad9510_regs.bypass_divider_out7 = (divider == 1)? 1 : 0;
92 92
        //calculate the low and high dividers
......
118 118

  
119 119
    void set_rate_tx_dboard_clock(double rate){
120 120
        assert_has(get_rates_tx_dboard_clock(), rate, "tx dboard clock rate");
121
        size_t divider = size_t(rate/get_master_clock_rate());
121
        size_t divider = size_t(get_master_clock_rate()/rate);
122 122
        //bypass when the divider ratio is one
123 123
        _ad9510_regs.bypass_divider_out6 = (divider == 1)? 1 : 0;
124 124
        //calculate the low and high dividers

Also available in: Unified diff