My commands are fine. David already figured everything right. The configuration for removed adder component instantiation was the culprit.
13.05.2017, 16:28, "Paebbels" <paebb...@gmail.com>:
Hello,you provided 2 GHDL commands:ghdl -a adder.vhdlghdl -e adder_tbbut the example in the GHDL documentation lists 4 commands:ghdl -a adder.vhdlghdl -a adder_tb.vhdlghdl -e adder_tbghdl -r adder_tbAt first, it analyzes both source files;at second it elaborates the top-level (adder_tb - found in the second file) andat third it runs the top-level design (simulation).You can combine elaboration (-e) and run (-r) in one step called elab-run, butyou can't skip analyzing adder_tb.vhdl, unless you changed the example andcopied all source snippets into one file called adder.vhdlBtw. the solution to change:-- Component instantiation. adder_0: adder port map ( i0 => i0, i1 => i1, ci => ci, s => s, co => co );to-- Direct entity instantiation. adder_0: entity work.adder port map ( i0 => i0, i1 => i1, ci => ci, s => s, co => co );is correct. But you should also remove the component and binding from the architectures deklarative region.Kind regardsPatrick,2017-05-13 14:12 GMT+02:00 Тихомиров Валентин <intel...@yandex.ru>:> ports> provide aMinimal, Complete, and Verifiable example instead of snippets then complain when you can't get a quality answer without sufficient informationThe full code is the same. I took it from your "getting started" part of User Guide, http://ghdl.readthedocs.io/en/latest/Starting_with_GHDL. html#a-full-adder All I did, I prepended the adder reference with "entity" keyword. I did not touch any port mappings.13.05.2017, 14:58, "David Koontz" <diogra...@gmail.com>:,On May 13, 2017, at 11:48 PM, Тихомиров Валентин <intel...@yandex.ru> wrote:The command isghdl -a adder.vhdl && ghdl --elab-run adder_tband it analyzes the correct file which I prove by injecting a terrible syntactic error and it fails to parse.In addition to a selected or directly visible named entity with the same simple name as the entity that has been analyzed into either the same working library or a reference library there's something called a default binding indication, which requires that the port declarations match formals in the port map and the port map obeys semantic rules for association lists.If this were Stackoverflow someone would pop up and suggest you provide aMinimal, Complete, and Verifiable example instead of snippets then complain when you can't get a quality answer without sufficient information.13.05.2017, 14:38, "Paebbels" <paebb...@gmail.com>:______________________________Hello,have you analyzed adder before that component?Please provide the executed GHDL commands.,Am 13.05.2017 1:34 nachm. schrieb "Тихомиров Валентин" <intel...@yandex.ru>:> adder_0: entity work.adder port map (i0 => i0, i1 => i1, ci => ci,
s => s, co => co);
> adder is not directly visible.Thanks but "work" does not improve anything. I am still getting the same "no declaration for adder" error.
_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss
______________________________
_________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss _________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss ______________________________
_________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss
_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss
_______________________________________________
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss
_______________________________________________ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss