اطلاعیه

Collapse
No announcement yet.

جابه جا گرفتن دیتا از پین ورودی

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

    جابه جا گرفتن دیتا از پین ورودی

    سلام خسته نباشید.
    یه برنامه نوشتم که قرار 64 بایت دیتارو یکی درمیون تو دوتا ارایه 32 بایتی ذخیره کنه ولی هر کاری می کنم دیتا مرتب ذخیره نمیشه.

    library IEEE;
    use IEEE.STD_LOGIC_1164.ALL;
    use IEEE.std_logic_arith.all;
    use IEEE.STD_LOGIC_UNSIGNED.ALL;


    entity lop is
    Port (
    o : out std_logic:='0';
    o1 : out std_logic:='0';
    int1 : in std_logic:='0';---int save data

    a: in std_logic_vector(7 downto 0));
    end lop;

    architecture Behavioral of lop is



    signal lo:integer range 0 to 31:=0;
    ;

    signal cnt:integer range 0 to 1:=0;

    -----------------------------------------
    signal r0:integer range 0 to 255:=0;
    -----------------------------------------





    type m_arr0 is array(0 to 31)of integer range 0 to 255;
    signal arr0:m_arr0;

    type m_arr1 is array(0 to 31)of integer range 0 to 255;
    signal arr1:m_arr1;




    begin

    ------------------------------------------------------------
    process(int1)

    begin

    if(rising_edge(int1))then

    r0<=conv_integer(a);
    --arr0(cnt)<=r0;

    if cnt=0 then

    arr0(lo)<=r0;
    end if;


    if cnt=1 then

    arr1(lo)<=r0;
    lo<=lo+1;
    end if;



    cnt<=cnt+1;










    end if;

    end process;

















    end Behavioral;



    لظفا راهنماییم کنید
    گسترده تر از هر چیز دل مومن است(امام علی (ع))
    [glow=red,2,300]R[/glow]
    [glow=green,2,300]G[/glow]
    [glow=blue,2,300]B[/glow]
لطفا صبر کنید...
X