- pwm(1) <= pwm_sig(1) and dip_sw(1) and not spi_command_lost;
- pwm(2) <= pwm_sig(2) and dip_sw(2) and not spi_command_lost;
- pwm(3) <= pwm_sig(3) and dip_sw(3) and not spi_command_lost;
-
-
+ irc_direct_output_selection: process(fnccfg_direct_irc, irc_a, irc_b, irc_i)
+ begin
+ if fnccfg_direct_irc = '1' then
+ gpio23 <= irc_a;
+ gpio24 <= irc_a;
+ gpio27 <= irc_b;
+ gpio25 <= irc_b;
+ gpio17 <= irc_i;
+ else
+ gpio23 <= 'Z';
+ gpio24 <= 'Z';
+ gpio27 <= 'Z';
+ gpio25 <= 'Z';
+ gpio17 <= 'Z';
+ end if;
+ end process;
+
+ pwm_output_selection: process(pwm_sig, shdn_sig,
+ fnccfg_direct_3ph_pwm, fnccfg_pwm12_by_pwm_and_dir,
+ fnccfg_pwm12_by_pwm_and_dir, gpio12, gpio13, gpio18, gpio19,
+ gpio22, gpio26)
+ begin
+ if fnccfg_direct_3ph_pwm = '1' then
+ pwm(1) <= gpio18;
+ pwm(2) <= gpio13;
+ pwm(3) <= gpio12;
+ shdn(1) <= not gpio22;
+ shdn(2) <= not gpio19;
+ shdn(3) <= not gpio26;
+ elsif fnccfg_pwm12_by_pwm_and_dir = '1' then
+ -- pwm(1) <= pwm_in and not pwm_dir_in;
+ pwm(1) <= gpio18 and not gpio22;
+ -- pwm(2) <= pwm_in and pwm_dir_in;;
+ pwm(2) <= gpio18 and gpio22;
+ pwm(3) <= '0';
+ shdn(1) <= '0';
+ shdn(2) <= '0';
+ shdn(3) <= '1';
+ else
+ pwm <= pwm_sig;
+ shdn <= shdn_sig;
+ end if;
+ end process;
+