From e20dcee6dc5ad6a01b271d3feb08b317ab062810 Mon Sep 17 00:00:00 2001 From: Vladimir Burian Date: Fri, 27 May 2011 08:07:32 +0200 Subject: [PATCH] Submodule PWM and toplevel updated. > MCC testbench tests all MCC entities/modules. > MCC_EXEC entity support for multiple axes control. > Corrected generic parameters in MCC entity. > PWM3 wrapper for 3 PWMs entities. > Wave_table impure function. > PWM selection signal added. > Overflow event signal of counter corrected. --- msp_motion.vhd | 14 +++++++++++--- pwm | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/msp_motion.vhd b/msp_motion.vhd index a976948..21ac3e6 100644 --- a/msp_motion.vhd +++ b/msp_motion.vhd @@ -199,7 +199,7 @@ begin ------------------------------------------------------------------------------ irq (13 downto 1) <= (others => '0'); - motor_irq_ff : process (mclk, puc) is + motor_irq_gen : process (mclk, puc) is begin if rising_edge (mclk) then if puc = '1' or irq_acc (0) = '1' then @@ -247,7 +247,7 @@ begin -- Motor feedback IRQ generator -- f_motor_irq approx. 1 kHz - mcc_irq_counter_1 : entity work.counter + irq_counter_1 : entity work.counter generic map ( WIDTH => 5, MAX => 22) @@ -316,9 +316,14 @@ begin -- Motion Control Chain ------------------------------------------------------------------------------ mcc_exec_1 : entity work.mcc_exec + generic map ( + AXIS_CNT => 1, + AXIS_CNT_W => 1) port map ( CLK_I => mclk, RST_I => puc, + MCC_AXIS_O => open, + MCC_DONE_O => open, MCC_EN_I => '1', MCC_EXEC_I => PWM_OW, MCC_ERR_O => open, @@ -369,7 +374,7 @@ begin ------------------------------------------------------------------------------ -- PWM counter is shared by all PWM generators. Generator contains only -- comparator and desired value. - counter_1 : entity work.counter + pwm_counter : entity work.counter generic map ( WIDTH => PWM_W, MAX => 2**PWM_W - 2) @@ -387,6 +392,7 @@ begin clk => mclk, reset => puc, din => PWM_DAT, + sel => '1', we => PWM1_STB, pwm_cnt => PWM_CNT, pwm_cyc => PWM_OW, @@ -399,6 +405,7 @@ begin clk => mclk, reset => puc, din => PWM_DAT, + sel => '1', we => PWM2_STB, pwm_cnt => PWM_CNT, pwm_cyc => PWM_OW, @@ -411,6 +418,7 @@ begin clk => mclk, reset => puc, din => PWM_DAT, + sel => '1', we => PWM3_STB, pwm_cnt => PWM_CNT, pwm_cyc => PWM_OW, diff --git a/pwm b/pwm index 7c10fab..879cb31 160000 --- a/pwm +++ b/pwm @@ -1 +1 @@ -Subproject commit 7c10fab4d2484fd07ed396ea5cd5407e48f90fb8 +Subproject commit 879cb3117d4b07b76e9dc1ac3915d6e8753fe156 -- 2.39.2