des00 26 June 14, 2009 Posted June 14, 2009 · Report post опа, точно. спасибо. странно, но у меня эта библиотека была прописана сразу, а теперь смотрю прописана другая, при этом я ее не прописывал руками!!! а unsigned пропала сама почему то, точнее "заменилась" сама на нумерик... :unsure: прописана как раз нужная(numeric_std рекомендован для всех новых проектов), но в ней операция сложения с integer определена для типов unsigned/signed, которые хоть и являются производными от std_logic_vector, но параноидальный VHDL хочет ручного приведения типов %) Читайте книги и стандарт. там всего 200 страниц, в них все написано. ЗЫ. Прошу не считать мое сообщение предлогом к холивару %) Quote Share this post Link to post Share on other sites More sharing options...
picman 0 June 14, 2009 Posted June 14, 2009 · Report post yagger: Скачайте книги по VHDL или Verilog(больше советую) и разбирайтесь - будет проще. Вы опять не используете теги для оформления кода. спасибо. уже накачал. читаю изучаю. просто на конкретных примерах проще. все что сам нахожу исправляю, в чем торможу, спрашиваю. Еще раз спасибо... Гыыы, я понял откуда у меня нумерик взялся!!! я из сообщения http://electronix.ru/forum/index.php?s=&am...st&p=606583 код просто скопировал и потом не обратил внимания на эти изменения... Quote Share this post Link to post Share on other sites More sharing options...
picman 0 June 14, 2009 Posted June 14, 2009 · Report post Вот попробовал еще вариант с сбросом по фронту, что тут не так? library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use ieee.std_logic_unsigned.all; entity pwcex is port( res: in std_logic; clock: in std_logic; del_1: out std_logic_vector(1 downto 0) ); end pwcex; architecture pwcex_arch of pwcex is signal del: std_logic_vector(1 downto 0); begin A: process(clock,res) begin if (res='1') then if (clock'event and clock='0') then del <= del + 1; end if; end if; end process; B: process(res) begin if (res'event and res='1') then del <= "00"; end if; end process; del_1 <= del; end pwcex_arch; ------------------------------------------------ Error (10028): Can't resolve multiple constant drivers for net "del[1]" at pwcex.vhd(31) Error (10029): Constant driver at pwcex.vhd(23) Error (10028): Can't resolve multiple constant drivers for net "del[0]" at pwcex.vhd(31) Error: Can't elaborate top-level user hierarchy Error: Quartus II Analysis & Synthesis was unsuccessful. 4 errors, 0 warnings Info: Allocated 154 megabytes of memory during processing Error: Processing ended: Sun Jun 14 16:34:40 2009 Error: Elapsed time: 00:00:03 Error: Quartus II Full Compilation was unsuccessful. 4 errors, 0 warnings Quote Share this post Link to post Share on other sites More sharing options...
des00 26 June 14, 2009 Posted June 14, 2009 · Report post Вот попробовал еще вариант с сбросом по фронту, что тут не так? всё не так, читайте книги и учитесь переводить ошибки квартуса на русский язык, он ясно пишет вам что ему не нравиться. Quote Share this post Link to post Share on other sites More sharing options...
Des333 0 June 14, 2009 Posted June 14, 2009 · Report post yagger: Не так, как минимум, то, что я уже дважды Вам писал: Вы опять не используете теги для офромления кода. Quote Share this post Link to post Share on other sites More sharing options...
picman 0 June 14, 2009 Posted June 14, 2009 (edited) · Report post всё не так, читайте книги и учитесь переводить ошибки квартуса на русский язык, он ясно пишет вам что ему не нравиться. :unsure: да пробую переводить, какой то бред получается. :crying: yagger: Не так, как минимум, то, что я уже дважды Вам писал: Вы опять не используете теги для офромления кода. а что такое тэги? может мне проще не терминами а на примере покажите пжлст...? Edited June 14, 2009 by yagger Quote Share this post Link to post Share on other sites More sharing options...
Des333 0 June 14, 2009 Posted June 14, 2009 (edited) · Report post а что такое тэги? может мне проще не терминами а на примере покажите пжлст...? Ну, показать не сложно. Вы бы сразу написали, что не в курсе, что это - Вам бы сразу ответили. :) Пример: 1) Без тегов и отступов: A: process(clock,res) begin if (res='1') then if (clock'event and clock='0') then del <= del + 1; end if; end if; end process; 2) С тегами и отступами: A: process(clock,res) begin if (res='1') then if (clock'event and clock='0') then del <= del + 1; end if; end if; end process; Чтобы использовать тег нажмите кнопку со свитком, расположенную над полем для ответа. Edited June 14, 2009 by des333 Quote Share this post Link to post Share on other sites More sharing options...
picman 0 June 14, 2009 Posted June 14, 2009 (edited) · Report post Чтобы использовать тег нажмите кнопку со свитком, расположенную над полем для ответа. ааа, спасибо и прошу прощения. я то думаю, почему у меня в окне смотрится с отступами, а в форуме уже в 1 колонку. :rolleyes: цель: хочу попробовать сделать сброс асинхронный, не зависящий ни от каких сигналов, чтобы по нему сразу же все обнулялось... так а что у меня не так в последнем примере? (к сожалению не могу изменить его, я бы и его отредактировал с тэгами...) Edited June 14, 2009 by yagger Quote Share this post Link to post Share on other sites More sharing options...
Des333 0 June 14, 2009 Posted June 14, 2009 · Report post ааа, спасибо и прошу прощения. я то думаю, почему у меня в окне смотрится с отступами, а в форуме уже в 1 колонку. :rolleyes: цель: хочу попробовать сделать сброс асинхронный, не зависящий ни от каких сигналов, чтобы по нему сразу же все обнулялось... так а что у меня не так в последнем примере? (к сожалению не могу изменить его, я бы и его отредактировал с тэгами...) Почему не можете? :) Можете. Нажмите на кнопку "edit" под полем с сообщением, которое хотите изменить. Quote Share this post Link to post Share on other sites More sharing options...
picman 0 June 14, 2009 Posted June 14, 2009 · Report post Почему не можете? :) Можете. Нажмите на кнопку "edit" под полем с сообщением, которое хотите изменить. не под всеми моими сообщениями есть эта кнопочка... :laughing: Quote Share this post Link to post Share on other sites More sharing options...
Des333 0 June 14, 2009 Posted June 14, 2009 · Report post не под всеми моими сообщениями есть эта кнопочка... :laughing: А, наверное, прошло слишком много времени. :) Quote Share this post Link to post Share on other sites More sharing options...
picman 0 June 14, 2009 Posted June 14, 2009 (edited) · Report post Вот попробовал так: library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; use ieee.std_logic_unsigned.all; entity pwcex is port( res: in std_logic; clock: in std_logic; del_1: out std_logic_vector(1 downto 0) ); end pwcex; architecture pwcex_arch of pwcex is signal del: std_logic_vector(1 downto 0); begin A: process(clock,res) begin if (res'event and res='1') then del <= "00"; elsif res='0' then del <= "00"; elsif (clock'event and clock='0') then del <= del + 1; end if; end process; del_1 <= del; end pwcex_arch; выдает: Error (10820): Netlist error at pwcex.vhd(22): can't infer register for del[0] because its behavior depends on the edges of multiple distinct clocks Info (10041): Inferred latch for "del[0]" at pwcex.vhd(20) Error (10820): Netlist error at pwcex.vhd(22): can't infer register for del[1] because its behavior depends on the edges of multiple distinct clocks Info (10041): Inferred latch for "del[1]" at pwcex.vhd(20) Error (10822): HDL error at pwcex.vhd(22): couldn't implement registers for assignments on this clock edge Error (10822): HDL error at pwcex.vhd(26): couldn't implement registers for assignments on this clock edge Error: Can't elaborate top-level user hierarchy Error: Quartus II Analysis & Synthesis was unsuccessful. 5 errors, 0 warnings Info: Allocated 154 megabytes of memory during processing Error: Processing ended: Sun Jun 14 21:01:45 2009 Error: Elapsed time: 00:00:03 Error: Quartus II Full Compilation was unsuccessful. 5 errors, 0 warnings как мне можно выйти из процесса досрочно, чтобы не проверялось событие clock'event если выполнилось хоть одно из предыдущих событий? Edited June 14, 2009 by yagger Quote Share this post Link to post Share on other sites More sharing options...
sazh 9 June 14, 2009 Posted June 14, 2009 · Report post Вот попробовал так: как мне можно выйти из процесса досрочно, чтобы не проверялось событие clock'event если выполнилось хоть одно из предыдущих событий? Надо полагать, xst.pdf Вы так и не скачали. Иначе бы просто скопировали, то что Вам нужно. Quote Share this post Link to post Share on other sites More sharing options...
picman 0 June 14, 2009 Posted June 14, 2009 (edited) · Report post Надо полагать, xst.pdf Вы так и не скачали. Иначе бы просто скопировали, то что Вам нужно. скачал и сейчас открыт у меня... может просто еще не нашел такое? :rolleyes: просто с англицким не сильно, поэтому медленно. Edited June 14, 2009 by yagger Quote Share this post Link to post Share on other sites More sharing options...
Des333 0 June 14, 2009 Posted June 14, 2009 · Report post скачал и сейчас открыт у меня... может просто еще не нашел такое? :rolleyes: просто с англицким не сильно, поэтому медленно. Вы можете начать с книг на русском языке. Просто это, действительно, будет быстрее, чем если Вы будете спрашивать все мелочи на форуме. Quote Share this post Link to post Share on other sites More sharing options...