picman 0 June 12, 2009 Posted June 12, 2009 (edited) · Report post Помогите пожалуйста entity pwcex is port( res: in std_logic; clock: in std_logic; ); end pwcex; architecture pwcex_arch of pwcex is signal del: std_logic_vector(1 downto 0); begin A: process(clock,res) begin if res='0' then del <= "00"; elsif (clock'event and clock='0' ) then del <= del + 1; end if; end process; end pwcex_arch; компилирую, выдает ошибки Error (10500): VHDL syntax error at pwcex.vhd(9) near text ")"; expecting an identifier, or "constant", or "file", or "signal", or "variable" Error (10500): VHDL syntax error at pwcex.vhd(28) near text "begin"; expecting an identifier ("begin" is a reserved keyword), or "constant", or "file", or "signal", or "variable" Error: Quartus II Analysis & Synthesis was unsuccessful. 2 errors, 0 warnings Info: Allocated 153 megabytes of memory during processing Error: Processing ended: Fri Jun 12 22:30:08 2009 Error: Elapsed time: 00:00:03 Error: Quartus II Full Compilation was unsuccessful. 2 errors, 0 warnings Все, сам разобрался... entity pwcex is port( res: in std_logic; clock: in std_logic; <--- ";" не надо!!! ); end pwcex; Edited June 12, 2009 by yagger Quote Share this post Link to post Share on other sites More sharing options...
LV26 0 June 13, 2009 Posted June 13, 2009 · Report post Помогите пожалуйста entity pwcex is port( res: in std_logic; clock: in std_logic; ); end pwcex; architecture pwcex_arch of pwcex is signal del: std_logic_vector(1 downto 0); begin A: process(clock,res) begin if res='0' then del <= "00"; elsif (clock'event and clock='0' ) then del <= del + 1; end if; end process; end pwcex_arch; компилирую, выдает ошибки Error (10500): VHDL syntax error at pwcex.vhd(9) near text ")"; expecting an identifier, or "constant", or "file", or "signal", or "variable" Error (10500): VHDL syntax error at pwcex.vhd(28) near text "begin"; expecting an identifier ("begin" is a reserved keyword), or "constant", or "file", or "signal", or "variable" Error: Quartus II Analysis & Synthesis was unsuccessful. 2 errors, 0 warnings Info: Allocated 153 megabytes of memory during processing Error: Processing ended: Fri Jun 12 22:30:08 2009 Error: Elapsed time: 00:00:03 Error: Quartus II Full Compilation was unsuccessful. 2 errors, 0 warnings Все, сам разобрался... entity pwcex is port( res: in std_logic; clock: in std_logic; <--- ";" не надо!!! ); end pwcex; Интересный счетчик получился :laughing: Выходов у него нет.... Прям черная дыра Quote Share this post Link to post Share on other sites More sharing options...
vetal 0 June 13, 2009 Posted June 13, 2009 · Report post в строчке clock: in std_logic; лишняя запятая Quote Share this post Link to post Share on other sites More sharing options...
picman 0 June 13, 2009 Posted June 13, 2009 · Report post Интересный счетчик получился :laughing: Выходов у него нет.... Прям черная дыра сори. полный текст вот такой: 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='0' then del <= "00"; elsif (clock'event and clock='0' ) then del <= del + 1; end if; end process; del_1 <= del; end pwcex_arch; но я в симуляторе сигналов на выводах del_1[0] и del_1[1] наблюдаю ХХХХХХХХХХХХХХХХХХХХХХХХ.... почему? вроде ни на что не ругается... :crying: Quote Share this post Link to post Share on other sites More sharing options...
LV26 0 June 13, 2009 Posted June 13, 2009 · Report post сори. полный текст вот такой: 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='0' then del <= "00"; elsif (clock'event and clock='0' ) then del <= del + 1; end if; end process; del_1 <= del; end pwcex_arch; но я в симуляторе сигналов на выводах del_1[0] и del_1[1] наблюдаю ХХХХХХХХХХХХХХХХХХХХХХХХ.... почему? вроде ни на что не ругается... :crying: Не телепат... Какой симулятор? Где тестбенч? Quote Share this post Link to post Share on other sites More sharing options...
picman 0 June 13, 2009 Posted June 13, 2009 (edited) · Report post Не телепат... Какой симулятор? Где тестбенч? обана... это для меня пока абра кадабра... в квартусе 7.2 что такое тест бенч? :laughing: я в этом деле можно сказать только только начал, посему могу очень глупые вопросы задавать... в квартусе, создал проект, написал вот ЭТО (см выше) ну правда со всеми подключениями библиотек, нажал компиляция... Создал файл с расширением vwf и подключил его к этому же проекту, "проявил" в нем все сигналы что есть в описании, входные сигналы клок (сделал мендр) а рес переход из 0 в 1 на первых 40 нСек... потом в симулятор тул нажал Generate Functional Simulation Netlist, потом сверху кнопочку Start Simulation... и все... на закладке с этим файлом, где графики сигналов нарисованы типа, выходные сигналы как были так и остались в виде ХХХХХХХХ... :laughing: Я их могу сам менять, но я так понимаю они должны меняться автоматически согласно описанию логики работы, согласно ВХОДНЫМ сигналам!? Научите пжлст. :1111493779: Edited June 13, 2009 by yagger Quote Share this post Link to post Share on other sites More sharing options...
LV26 0 June 13, 2009 Posted June 13, 2009 · Report post обана... это для меня пока абра кадабра... в квартусе 7.2 что такое тест бенч? :laughing: я в этом деле можно сказать только только начал, посему могу очень глупые вопросы задавать... в квартусе, создал проект, написал вот ЭТО (см выше) ну правда со всеми подключениями библиотек, нажал компиляция... Создал файл с расширением vwf и подключил его к этому же проекту, "проявил" в нем все сигналы что есть в описании, входные сигналы клок (сделал мендр) а рес переход из 0 в 1 на первых 40 нСек... потом в симулятор тул нажал Generate Functional Simulation Netlist, потом сверху кнопочку Start Simulation... и все... на закладке с этим файлом, где графики сигналов нарисованы типа, выходные сигналы как были так и остались в виде ХХХХХХХХ... :laughing: Я их могу сам менять, но я так понимаю они должны меняться автоматически согласно описанию логики работы, согласно ВХОДНЫМ сигналам!? Научите пжлст. :1111493779: С квартусом давно не работаю... на память не подскажу. Вообще-то там есть туториалы... потратьте час-два на них - станет намного легче. Это - хороший совет :-) Вы так сами научитесь. Quote Share this post Link to post Share on other sites More sharing options...
picman 0 June 13, 2009 Posted June 13, 2009 · Report post С квартусом давно не работаю... на память не подскажу. Вообще-то там есть туториалы... потратьте час-два на них - станет намного легче. Это - хороший совет :-) Вы так сами научитесь. :wassat: спасибо... Quote Share this post Link to post Share on other sites More sharing options...
Des333 0 June 13, 2009 Posted June 13, 2009 · Report post Вот так на Quartus 8.1 работает: library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.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: unsigned(1 downto 0); begin A: process(clock,res) begin if res='0' then del <= "00"; elsif (clock'event and clock='0' ) then del <= del + 1; end if; end process; del_1 <= std_logic_vector(del); end pwcex_arch; yagger: Два совета: 1) Приводить весь код полностью (при этом лучше воспользоваться тегом code). 2) Приводить список всех errors и warnings, которые выдал компилятор. Quote Share this post Link to post Share on other sites More sharing options...
sazh 9 June 13, 2009 Posted June 13, 2009 · Report post на закладке с этим файлом, где графики сигналов нарисованы типа, выходные сигналы как были так и остались в виде ХХХХХХХХ... Реакция на входные воэдействия по кнопке report А если в опции open реакцию хотите увидеть, поставьте галочку overwrite simulation input file ....... Quote Share this post Link to post Share on other sites More sharing options...
picman 0 June 13, 2009 Posted June 13, 2009 · Report post Большое спасибо, действительно заработало. :) Буду дальше экспериментировать и учить... 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; 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='0' then del <= "00"; elsif (clock'event and clock='0' ) then del <= del + 1; --<--------Указывает ошибку вот сюда... end if; end process; del_1 <= del(1 downto 0); end pwcex_arch; ------------------------------------------------ Info: ******************************************************************* Info: Running Quartus II Analysis & Synthesis Info: Version 7.2 Build 175 11/20/2007 Service Pack 1 SJ Full Version Info: Processing started: Sun Jun 14 11:58:30 2009 Info: Command: quartus_map --read_settings_files=on --write_settings_files=off pwcex -c pwcex Info: Found 2 design units, including 1 entities, in source file pwcex.vhd Info: Found design unit 1: pwcex-pwcex_arch Info: Found entity 1: pwcex Error (10327): VHDL error at pwcex.vhd(27): can't determine definition of operator ""+"" -- found 0 possible definitions Error: Quartus II Analysis & Synthesis was unsuccessful. 1 error, 0 warnings Info: Allocated 153 megabytes of memory during processing Error: Processing ended: Sun Jun 14 11:58:34 2009 Error: Elapsed time: 00:00:04 Error: Quartus II Full Compilation was unsuccessful. 1 error, 0 warnings почему я не могу прибавить 1 к переменной del? в верхнем примере с unsigned работает, а с std_logic_vector нет, почему? 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 в верхнем примере с unsigned работает, а с std_logic_vector нет, почему? Библиотеки ему не хватает типа use IEEE.STD_LOGIC_UNSIGNED.ALL; скачайте с сайта xilinx докумет xst.pdf и по нему учитесь. Без наставника по vhdl лучше c verilog начинать. 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 Библиотеки ему не хватает типа use IEEE.STD_LOGIC_UNSIGNED.ALL; скачайте с сайта xilinx докумет xst.pdf и по нему учитесь. Без наставника по vhdl лучше c verilog начинать. опа, точно. спасибо. странно, но у меня эта библиотека была прописана сразу, а теперь смотрю прописана другая, при этом я ее не прописывал руками!!! а unsigned пропала сама почему то, точнее "заменилась" сама на нумерик... :unsure: Гы, так вот я и нашел только в "лице" форума наставников!!! У нас с таковыми глушь, такое впечатление что вымерли все!!! Ни одного ни то что знакомого, даже НЕЗНАКОМОГО нет, кто с вшдл работает... да вообще с плисами мало кто возится... :unsure: 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: Скачайте книги по VHDL или Verilog(больше советую) и разбирайтесь - будет проще. Вы опять не используете теги для оформления кода. Quote Share this post Link to post Share on other sites More sharing options...