Перейти к содержанию
    

Maverick_

Модератор
  • Постов

    3 856
  • Зарегистрирован

Весь контент Maverick_


  1. Так это какая память однопортовая или двупортовая?
  2. Рекомендую заглянуть в книгу Сергиенко Проектирование вычислительных устройств -> там найдешь описание и пример конвеерных вычислителей. В блочную память ты ЛЗ не засунешь :( , ибо делается все на регистрах с помощью Конечных Автоматов. :)
  3. Без языка программирования точно не обойтись, и я думаю Вы должны подумать о создании конвеера. Чтобы не использовать все 512 умножителей, правда в этом случае будет внесена некоторая задержка. Лучшая оптимизация будет, если кол-во операций умножений будет = кол-ву встроенных умножителей. ;)
  4. Большое человеческое спасибо за понимание!!! CodeWarrior1241 и Iouri за :a14:
  5. Просто для переноса в другие проекты проще ;) (не надо постоянно генерировать новое фифо). И вообще то я работаю ЦКБ Арсенал в г. Киеве, универ закончил 3 года назад :) . Проект сделан с помощью корки, потом решил попробовать это описать все на VHDL, чтобы не зависеть от ПО.
  6. Помогите организовать фифо на VHDL. Сам пытался сделать получается какая то ерунда. Искал в Интернете не нашел (может плохо искал не ругайте :( ). ;). Нужна реализация для последующего внедрения в Spartan 3 - 400. Core Generator не хотелось бы использовать. Работаю в Xilinx ISE 8.2 SP3/ За помощь заранее благодарен!!!.
  7. Здравствуйте! Программирую на VHDL. И возникли некоторые трудности Я моделирую схему, которая описана ниже, в Post-Rout моделировании получаются при разных частотах разные результаты. Не могу понять почему. library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity decline is Port ( clk : in std_logic; rst : in std_logic; count : out std_logic_vector (15 downto 0); outdec1 : out std_logic_vector (9 downto 0); Q : out std_logic_vector (4 downto 0); outdec0 : out std_logic_vector (7 downto 0) ); end decline; architecture Behavioral of decline is signal cnt : std_logic_vector (15 downto 0) := (others => '0'); signal dec1 : std_logic_vector (9 downto 0); signal dec0 : std_logic_vector (7 downto 0); begin process (clk,rst,cnt) begin if rst = '1' then cnt <= "0000000000000000" ; elsif (clk'event and clk = '1') then cnt <= cnt + "0000000000000001"; end if; count <= cnt; end process; process (clk,cnt,rst,dec0) variable Qint: std_logic_vector (4 downto 0); begin if rst = '1' then dec0 <= "00000000"; Qint := "00000"; elsif ( clk'event and clk ='1') then case cnt is when "0000000000000000" => dec0 <= "00000001"; when "0000000000000001" => dec0 <= "00000010"; when "0000000000000011" => dec0 <= "00000100"; when "0000000000000101" => dec0 <= "00001000"; when "0000000000000111" => dec0 <= "00010000"; when "0000000000001010" => dec0 <= "00100000"; when "0000000000001011" => dec0 <= "01000000"; when "0000000000001101" => dec0 <= "10000000"; when others => dec0 <= "00000000"; end case; if (dec0(2) = '1' and dec0(4) = '1') then Qint(0) := not(Qint(0)); elsif (dec0(2)= '1' and dec0(4) = '0') then Qint(0) := '1'; elsif (dec0(2)= '0' and dec0(4) = '1') then Qint(0) := '0'; else Qint(0) := Qint(0); end if; if (dec0(3) = '1' and dec0(6) = '1') then Qint(1) := not(Qint(0)); elsif (dec0(3)= '1' and dec0(6) = '0') then Qint(1) := '1'; elsif (dec0(3)= '0' and dec0(6) = '1') then Qint(1) := '0'; else Qint := Qint; end if; if (dec0(4) = '1' and dec0(7) = '1') then Qint(2) := not(Qint(2)); elsif (dec0(4)= '1' and dec0(7) = '0') then Qint(2) := '1'; elsif (dec0(4)= '0' and dec0(7) = '1') then Qint(2) := '0'; else Qint := Qint; end if; if (dec0(1) = '1' and dec0(3) = '1') then Qint(3) := not(Qint(3)); elsif (dec0(1)= '1' and dec0(3) = '0') then Qint(3) := '1'; elsif (dec0(1)= '0' and dec0(3) = '1') then Qint(3) := '0'; else Qint := Qint; end if; if (dec0(0) = '1' and dec0(2) = '1') then Qint(4) := not(Qint(4)); elsif (dec0(0)= '1' and dec0(2) = '0') then Qint(4) := '1'; elsif (dec0(0)= '0' and dec0(2) = '1') then Qint(4) := '0'; else Qint := Qint; end if; end if; Q <= Qint; outdec0 <= dec0; end process; process (clk,cnt,rst,dec1) begin if rst = '1' then dec1 <= "0000000000"; elsif ( clk'event and clk ='1') then case cnt is when "1011110110000000" => dec1 <= "0000000001"; when "1011111001111000" => dec1 <= "0000000010"; when "1011111110000000" => dec1 <= "0000000100"; when "1100000000000000" => dec1 <= "0000001000"; when "1111111011000000" => dec1 <= "0000010000"; when "1111111011100000" => dec1 <= "0000100000"; when "1111111100000000" => dec1 <= "0001000000"; when "1111111100100000" => dec1 <= "0010000000"; when "1111111101000000" => dec1 <= "0100000000"; when "1111111101100000" => dec1 <= "1000000000"; when others => dec1 <= "0000000000"; end case; end if; outdec1 <= dec1; end process; end behavioral; Ниже даю описание модели для моделирования LIBRARY ieee; USE ieee.std_logic_1164.ALL; USE ieee.std_logic_unsigned.all; USE ieee.numeric_std.ALL; ENTITY test_vhd IS END test_vhd; ARCHITECTURE behavior OF test_vhd IS -- Component Declaration for the Unit Under Test (UUT) COMPONENT decline PORT( clk : IN std_logic; rst : IN std_logic; count : OUT std_logic_vector(15 downto 0); outdec1 : OUT std_logic_vector(9 downto 0); Q : OUT std_logic_vector (4 downto 0); outdec0 : OUT std_logic_vector(7 downto 0) ); END COMPONENT; --Inputs SIGNAL clk : std_logic := '0'; SIGNAL rst : std_logic := '0'; --Outputs SIGNAL count : std_logic_vector(15 downto 0); SIGNAL outdec1 : std_logic_vector(9 downto 0); SIGNAL Q : std_logic_vector (4 downto 0); SIGNAL outdec0 : std_logic_vector(7 downto 0); BEGIN -- Instantiate the Unit Under Test (UUT) uut: decline PORT MAP( clk => clk, rst => rst, count => count, outdec1 => outdec1, Q => Q, outdec0 => outdec0 ); clock_gen: process begin clk <= '0'; wait for 10 ns; clk <= '1'; wait for 10 ns; end process; reset_gen: process begin rst <= '1'; wait for 40 ns; rst <= '0'; wait; end process; END; При функциональном моделировании все работает правильно. Расскажите в чем разница между приведенной выше программой и ниже приведенной программой при синтезе library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity decline is Port ( clk : in std_logic; rst : in std_logic; count : out std_logic_vector (15 downto 0); outdec1 : out std_logic_vector (9 downto 0); Q : out std_logic_vector (4 downto 0); outdec0 : out std_logic_vector (7 downto 0) ); end decline; architecture Behavioral of decline is signal cnt : std_logic_vector (15 downto 0) := (others => '0'); signal dec1 : std_logic_vector (9 downto 0); begin process (clk,rst,cnt) begin if rst = '1' then cnt <= "0000000000000000" ; elsif (clk'event and clk = '1') then cnt <= cnt + "0000000000000001"; end if; count <= cnt; end process; process (clk,cnt,rst) variable dec0 : std_logic_vector (7 downto 0); variable Qint: std_logic_vector (4 downto 0); begin if rst = '1' then dec0 := "00000000"; Qint := "00000"; elsif ( clk'event and clk ='1') then case cnt is when "0000000000000000" => dec0 := "00000001"; when "0000000000000001" => dec0 := "00000010"; when "0000000000000011" => dec0 := "00000100"; when "0000000000000101" => dec0 := "00001000"; when "0000000000000111" => dec0 := "00010000"; when "0000000000001010" => dec0 := "00100000"; when "0000000000001011" => dec0 := "01000000"; when "0000000000001101" => dec0 := "10000000"; when others => dec0 := "00000000"; end case; if (dec0(2) = '1' and dec0(4) = '1') then Qint(0) := not(Qint(0)); elsif (dec0(2)= '1' and dec0(4) = '0') then Qint(0) := '1'; elsif (dec0(2)= '0' and dec0(4) = '1') then Qint(0) := '0'; else Qint(0) := Qint(0); end if; if (dec0(3) = '1' and dec0(6) = '1') then Qint(1) := not(Qint(0)); elsif (dec0(3)= '1' and dec0(6) = '0') then Qint(1) := '1'; elsif (dec0(3)= '0' and dec0(6) = '1') then Qint(1) := '0'; else Qint := Qint; end if; if (dec0(4) = '1' and dec0(7) = '1') then Qint(2) := not(Qint(2)); elsif (dec0(4)= '1' and dec0(7) = '0') then Qint(2) := '1'; elsif (dec0(4)= '0' and dec0(7) = '1') then Qint(2) := '0'; else Qint := Qint; end if; if (dec0(1) = '1' and dec0(3) = '1') then Qint(3) := not(Qint(3)); elsif (dec0(1)= '1' and dec0(3) = '0') then Qint(3) := '1'; elsif (dec0(1)= '0' and dec0(3) = '1') then Qint(3) := '0'; else Qint := Qint; end if; if (dec0(0) = '1' and dec0(2) = '1') then Qint(4) := not(Qint(4)); elsif (dec0(0)= '1' and dec0(2) = '0') then Qint(4) := '1'; elsif (dec0(0)= '0' and dec0(2) = '1') then Qint(4) := '0'; else Qint := Qint; end if; end if; Q <= Qint; outdec0 <= dec0; end process; process (clk,cnt,rst,dec1) begin if rst = '1' then dec1 <= "0000000000"; elsif ( clk'event and clk ='1') then case cnt is when "1011110110000000" => dec1 <= "0000000001"; when "1011111001111000" => dec1 <= "0000000010"; when "1011111110000000" => dec1 <= "0000000100"; when "1100000000000000" => dec1 <= "0000001000"; when "1111111011000000" => dec1 <= "0000010000"; when "1111111011100000" => dec1 <= "0000100000"; when "1111111100000000" => dec1 <= "0001000000"; when "1111111100100000" => dec1 <= "0010000000"; when "1111111101000000" => dec1 <= "0100000000"; when "1111111101100000" => dec1 <= "1000000000"; when others => dec1 <= "0000000000"; end case; end if; outdec1 <= dec1; end process; end behavioral; От себя замечу разница состоит в построении дешифратора. :( Ну какая именно не скажу
  8. Купил книгу Зотова Проектирование встраиваемых микропроцессорных систем на основе ПЛИС фирмы Xilinx :) . Описание микропроцессора (МК) - супер, а вот описания языка С, используемого там - нет. Язык С, не проблема я его знаю(как я считаю), проблема как например назначить определенному порту МК определенное действие, например z= x+y. Дайте ссылки на литературу, либо поделитесь готовым проектом для EDK. Да работаю с ПЛИС фирмы Xilinx и его программным пакетом программирования 8.2 версией. :(
×
×
  • Создать...