اطلاعیه

Collapse
No announcement yet.

این برنامه ی VHDl برای فلیپ فلاپ T ایرادش چیه ؟

Collapse
X
 
  • فیلتر
  • زمان
  • Show
Clear All
new posts

    این برنامه ی VHDl برای فلیپ فلاپ T ایرادش چیه ؟

    سلام

    من این برنامه رو نوشتم که یه فلیپ فلاپ T بسازم ولی از این خطش که با قرمز مشخص کردم ارور Operand می گیره ... ایرادش نمی دونم چیه کسی می تونه کمک کنه ؟


    library IEEE;
    use IEEE.STD_LOGIC_1164.ALL;
    use IEEE.STD_LOGIC_ARITH.ALL;
    use IEEE.STD_LOGIC_UNSIGNED.ALL;
    use IEEE.numeric_std.all;
    use IEEE.numeric_bit.all;


    ---- any Xilinx primitives in this code.
    --library UNISIM;
    --use UNISIM.VComponents.all;

    entity TFlip_Flop is
    Port ( clock : in STD_LOGIC;
    clear : in std_logic;
    T_Output : out STD_LOGIC);
    end;

    ------------------------------------------------------------------------------------
    architecture Behavioral of TFlip_Flop is
    signal T_output_wire: std_logic;
    begin

    process(clock,clear)
    begin
    if clear='1' then
    T_output_wire<='0';
    elsif(clock'event and clock='1&#039then
    T_output_wire <= T_output_wire + 1;

    end if;
    end process;

    T_Output <= T_output_wire;

    end Behavioral;



    وقتی برنامه رو سنتز می کنم این ارور می گیره :
    Line 57. + can not have such operands in this context.

    با وجود اینکه همه ی لایبرری های مورد نیاز رو use کردم ؟؟؟؟

    #2
    پاسخ : این برنامه ی VHDl برای فلیپ فلاپ T ایرادش چیه ؟

    اساتید یکی کمک کنه لطفا ....

    دیدگاه


      #3
      پاسخ : این برنامه ی VHDl برای فلیپ فلاپ T ایرادش چیه ؟

      آقا تلف شدیم ... یکی بکمکه ...

      دیدگاه


        #4
        پاسخ : این برنامه ی VHDl برای فلیپ فلاپ T ایرادش چیه ؟

        ممنون

        مشکل حل شد

        دیدگاه


          #5
          پاسخ : این برنامه ی VHDl برای فلیپ فلاپ T ایرادش چیه ؟

          T flip flop with reset
          کد:
          library ieee; 
          use ieee.std_logic_1164.all 
          entity tff is 
           port( 
              clk: in std_logic; 
              reset: in std_logic; 
              t: in std_logic; 
              q: out std_logic 
             ); 
          enf tff; 
          
          architecture behave of tff is 
           signal q_reg: std_logic; 
           signal q_next: std_logic; 
          begin 
           process 
           begin 
              if (reset = '1') then 
               q_reg <= '0'; 
              elsif (clk'event and clk = '1') then 
               q_reg <= q_next; 
              end if; 
           end process; 
          
              
              q_next <= q_reg when t = '0' else 
                   not(q_reg); 
          
              q <= q_reg; 
          end behave;
          A T flip flop has the following equation: Q+ = T`Q+TQ` which is basically a D flip flop with a XOR gate connected to D, with one input being T and the other the Q output.

          دیدگاه

          لطفا صبر کنید...
          X