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

AlexReiki

Участник
  • Постов

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

  • Посещение

Репутация

0 Обычный

Информация о AlexReiki

  • День рождения 11.01.1967

Контакты

  • Сайт
    Array
  • ICQ
    Array

Информация

  • Город
    Array
  1. Я же говорю переделал :) вот код library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; --------------------------------------------------------------- -- Input word decoder --------------------------------------------------------------- entity Input_decoder is port( input_word : in std_logic_vector(5 downto 0);-- Logic control signal Input output_word : out std_logic_vector(5 downto 0) -- Logic control signal Output ); end entity; architecture decoder_arch of Input_decoder is begin decoder: process(input_word) begin if input_word(5) ='1' -- "1-----" then output_word <= b"101000" ; --1 elsif input_word(5) ='0' and input_word(4) ='0' -- "00-1--" and input_word(2) ='1' then output_word <= b"010000"; --2 elsif input_word(5)='0' and input_word(4) ='0' -- "0000--" and input_word(3)='0' and input_word(2) ='0' then output_word <= b"010100"; --3 elsif input_word(5) ='0' and input_word(4) ='0' -- "0011--" and input_word(3)='1' and input_word(2) ='1' then output_word <= b"011000" ; --4 elsif input_word(5) ='0' and input_word(4) ='0' --"0001--" and input_word(3)='0' and input_word(2) ='1' then output_word <= b"010000"; --5 elsif input_word(5) ='1' and input_word(4) ='0' --"1000--" and input_word(3)='0' and input_word(2) ='0' then output_word <= b"110100"; --6 elsif input_word(5) ='0' and input_word(4) ='0' -- "00-1--" and input_word(2)='1' then output_word <= b"010000"; --7 elsif input_word(5) ='0' and input_word(4) ='1' -- "01-1--" and input_word(2) ='1' then output_word <= b"000000"; --8 elsif input_word(5) ='1' and input_word(4) ='1' -- "11-0--" and input_word(2) ='0' then output_word <= b"101100" ; --9 elsif input_word(1) ='0' and input_word(0) ='0' -- "----00" then output_word <= b"001101"; --10 elsif input_word(1) ='1' and input_word(0) ='1' -- "----11" then output_word <= b"001110"; --11 elsif input_word(1) ='1' and input_word(0) ='0' -- "----10" then output_word <= b"001111"; --12 elsif input_word(4) ='1' and input_word(3) ='0' -- "-100--" and input_word(2)='0' then output_word <= b"000100"; --13 elsif input_word(4) ='1' and input_word(3) ='1' -- "-111--" and input_word(2)='1' then output_word <= b"001000" ; --14 else output_word <= b"101100" end if; end process; end architecture;
  2. Спасибо Так и сделал.Теперь- работает. Интересно где используют такую запись "if input_word ="1-----"; Да кстати с иксами "Х" не пашет. и спасибо за ответы :)
  3. Подскажите пожалуйста? :laughing: надо получить декодер из входной комбинации с DONT CARE битами,выходная комбинация битов определенна. Написал вот так но в synplifay не синтезируется. library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; --------------------------------------------------------------- -- Input word decoder --------------------------------------------------------------- entity Input_decoder is port( input_word : in std_logic_vector(5 downto 0);-- Logic control signal Input output_word : out std_logic_vector(5 downto 0) -- Logic control signal Output ); end entity; architecture decoder_arch of Input_decoder is begin decoder: process(input_word) begin if input_word ="1-----" then output_word <= b"101001" ; --1 elsif input_word ="00-1--" then output_word <= b"011001"; --2 elsif input_word ="0000--" then output_word <= b"010101"; --3 elsif input_word ="0011--" then output_word <= b"011001" ; --4 elsif input_word ="0001--" then output_word <= b"010001"; --5 elsif input_word ="1000--" then output_word <= b"110101"; --6 elsif input_word ="00-1--" then output_word <= b"001111"; --7 elsif input_word ="01-1--" then output_word <= b"001001"; --8 elsif input_word ="11-0--" then output_word <= b"101101" ; --9 elsif input_word ="----00" then output_word <= b"101010"; --10 elsif input_word ="----11" then output_word <= b"101011"; --11 elsif input_word ="----10" then output_word <= b"101010"; --12 elsif input_word ="-100--" then output_word <= b"100101"; --13 elsif input_word ="-111--" then output_word <= b"101001" ; --14 end if; end process; end architecture; Заранее всем спасибо
  4. Я обычно определяю сигналы для тех линий -которые хочу сохранить signal KEEPingSIGNAL :std_logic; при синтезе они не меняются. Больше возни но часто огромная польза!
  5. Гм, в Израиле денег нет на лецинзионную версию? Пиши, куда кидать. Завтра с работы попробую прислать. Сегодня уже не получется, но я думаю, что Вам не срочно сегодня вечером это надо. З.Ы. Раздел называется FPGA programming languages, то есть языки программирования для ПЛИС. Для всех вопросов по САПР создан специальный раздел Спасибо Murr Von Kater.Сделал все как описано в прикрепленном файле.Перестала работать версия 8.1 , а 8.5 так и не заработала . Может найдется у кого нибудь рабочий ПАТЧ?
  6. :) Большая просьба подкинуть кряк на Synplify Pro 8.5.1 если у кого есть :) Заранее Всем спасибо.
  7. Не мешало бы знать точно, что он пишет, что за симулятор(синтезатор), и в какой строке он именно видит ошибку. Потому как этот элементарный пример синтезирует даже Квартусь. И совершенно не могу понять, что тут может быть неправильно, разве только вы задаете расширения для файла, как для исходника на Верилоге или еще на каком нить непонятном компилятору языке :-) Может человек забыл библиотеки прописать? library ieee; use ieee.std_logic_1164.all; entity ------ is ----
  8. :) library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity shift_reg is port(clk,reset : in std_logic; shift_reg: inout std_logic_vector(3 downto 0); in_bit: in std_logic); end entity; architecture behav of shift_reg is begin shift:process(clk,reset) begin if reset ='1' then shift_reg<=(others=>'0'); --shift_reg="0000" elsif rising_edge(clk) then shift_reg<=shr(shift_reg,"01"); shift_reg(1)<=in_bit; end if; end process; end architecture;
×
×
  • Создать...