- dat_reg(92 downto 90) <= pwm_en_p(1 to 3); --enable positive
- dat_reg(89 downto 87) <= pwm_en_n(1 to 3); --shutdown
- dat_reg(86 downto 81) <= (others=>'0');--pwm_match(1)(10 downto 5); --6 MSb of PWM1
- dat_reg(80 downto 74) <= (others=>'0');--pwm_match(2)(10 downto 4); --7 MSb of PWM2
- dat_reg(73 downto 68) <= (others=>'0');--pwm_match(3)(10 downto 5); --6 MSb of PWM3
- dat_reg(71 downto 60)<=(others=>'0');
- dat_reg(59 downto 48) <= adc_channels(35 downto 24); --current mesurments
- dat_reg(47 downto 36)<=(others=>'0');
- dat_reg(35 downto 24) <= adc_channels(23 downto 12); --current mesurments
- dat_reg(23 downto 12)<=(others=>'0');
- dat_reg(11 downto 0) <= adc_channels(11 downto 0); --current mesurments
+ dat_reg(92 downto 81) <= index_position(11 downto 0); --position of irc_i
+ dat_reg(80 downto 72) <=adc_m_count(8 downto 0); --count of measurments
+ --data order schould be: ch2 downto ch0 downto ch1
+ dat_reg(71 downto 0) <= adc_channels(71 downto 0); --current mesurments