]> rtime.felk.cvut.cz Git - fpga/virtex2/msp_motion.git/commitdiff
Submodule PWM and toplevel updated.
authorVladimir Burian <buriavl2@fel.cvut.cz>
Fri, 27 May 2011 06:07:32 +0000 (08:07 +0200)
committerVladimir Burian <buriavl2@fel.cvut.cz>
Fri, 27 May 2011 06:07:32 +0000 (08:07 +0200)
  > 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
pwm

index a9769487189263d0f25fa4623bde65272e8d8dab..21ac3e6ec0c26a97abaebd88d164d50090960993 100644 (file)
@@ -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 7c10fab4d2484fd07ed396ea5cd5407e48f90fb8..879cb3117d4b07b76e9dc1ac3915d6e8753fe156 160000 (submodule)
--- a/pwm
+++ b/pwm
@@ -1 +1 @@
-Subproject commit 7c10fab4d2484fd07ed396ea5cd5407e48f90fb8
+Subproject commit 879cb3117d4b07b76e9dc1ac3915d6e8753fe156