Re: [Ghdl-discuss] entity instantiation

2017-05-13 Thread Tristan Gingold

On 13/05/17 15:45, Paebbels wrote:

@David, @Tristan

Shouldn't there be an error that "adder_0" is using a direct entity
instantiation and
thus a binding in the architecture can't be applied?


That's what I get:

analyze adder_tb2.vhdl
adder_tb2.vhdl:12:8:error: specification does not apply to direct 
instantiation


Tristan.


___
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss


Re: [Ghdl-discuss] entity instantiation

2017-05-13 Thread Paebbels
@David, @Tristan

Shouldn't there be an error that "adder_0" is using a direct entity
instantiation and
thus a binding in the architecture can't be applied?


Kind regards
Patrick



2017-05-13 15:37 GMT+02:00 Тихомиров Валентин :

> 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" :
>
> Hello,
>
> you provided 2 GHDL commands:
> ghdl -a adder.vhdl
> ghdl -e adder_tb
>
> but the example in the GHDL documentation lists 4 commands:
> ghdl -a adder.vhdl
> ghdl -a adder_tb.vhdl
> ghdl -e adder_tb
> ghdl -r adder_tb
>
> At first, it analyzes both source files;
> at second it elaborates the top-level (adder_tb - found in the second
> file) and
> at third it runs the top-level design (simulation).
>
> You can combine elaboration (-e) and run (-r) in one step called elab-run,
> but
> you can't skip analyzing adder_tb.vhdl, unless you changed the example and
> copied all source snippets into one file called adder.vhdl
>
>
> Btw. 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 regards
> Patrick
>
>
>
> 2017-05-13 14:12 GMT+02:00 Тихомиров Валентин :
>
> > ports
> > provide a
> Minimal, Complete, and Verifiable example
>  instead of snippets then complain
> when you can't get a quality answer without sufficient information
>
> The 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" :
>
>
> On May 13, 2017, at 11:48 PM, Тихомиров Валентин 
> wrote:
>
> The command is
>
> ghdl -a adder.vhdl && ghdl --elab-run adder_tb
>
> and 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 a
> Minimal, 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" :
>
> Hello,
>
> have you analyzed adder before that component?
> Please provide the executed GHDL commands.
>
> Am 13.05.2017 1:34 nachm. schrieb "Тихомиров Валентин"  >:
>
> >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
>
>
___
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss


Re: [Ghdl-discuss] entity instantiation

2017-05-13 Thread Тихомиров Валентин
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" :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 regards    Patrick2017-05-13 14:12 GMT+02:00 Тихомиров Валентин :> ports> provide a Minimal, Complete, and Verifiable example instead of snippets then complain when you can't get a quality answer without sufficient information The 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-adderAll I did, I prepended the adder reference with "entity" keyword. I did not touch any port mappings.13.05.2017, 14:58, "David Koontz" :On May 13, 2017, at 11:48 PM, Тихомиров Валентин  wrote:The command is ghdl -a adder.vhdl && ghdl --elab-run adder_tb and 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 a Minimal, 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" :Hello,have you analyzed adder before that component?Please provide the executed GHDL commands.Am 13.05.2017 1:34 nachm. schrieb "Тихомиров Валентин" :>        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 listGhdl-discuss@gna.orghttps://mail.gna.org/listinfo/ghdl-discuss___Ghdl-discuss mailing listGhdl-discuss@gna.orghttps://mail.gna.org/listinfo/ghdl-discuss,___Ghdl-discuss mailing listGhdl-discuss@gna.orghttps://mail.gna.org/listinfo/ghdl-discuss___
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss

,___Ghdl-discuss mailing listGhdl-discuss@gna.orghttps://mail.gna.org/listinfo/ghdl-discuss___
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss


Re: [Ghdl-discuss] entity instantiation

2017-05-13 Thread Paebbels
Hello,

you provided 2 GHDL commands:
ghdl -a adder.vhdl
ghdl -e adder_tb

but the example in the GHDL documentation lists 4 commands:
ghdl -a adder.vhdl
ghdl -a adder_tb.vhdl
ghdl -e adder_tb
ghdl -r adder_tb

At first, it analyzes both source files;
at second it elaborates the top-level (adder_tb - found in the second file)
and
at third it runs the top-level design (simulation).

You can combine elaboration (-e) and run (-r) in one step called elab-run,
but
you can't skip analyzing adder_tb.vhdl, unless you changed the example and
copied all source snippets into one file called adder.vhdl


Btw. 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 regards
Patrick



2017-05-13 14:12 GMT+02:00 Тихомиров Валентин :

> > ports
> > provide a
> Minimal, Complete, and Verifiable example
>  instead of snippets then complain
> when you can't get a quality answer without sufficient information
>
> The 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" :
>
>
> On May 13, 2017, at 11:48 PM, Тихомиров Валентин 
> wrote:
>
> The command is
>
> ghdl -a adder.vhdl && ghdl --elab-run adder_tb
>
> and 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 a
> Minimal, 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" :
>
> Hello,
>
> have you analyzed adder before that component?
> Please provide the executed GHDL commands.
>
> Am 13.05.2017 1:34 nachm. schrieb "Тихомиров Валентин"  >:
>
> >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


Re: [Ghdl-discuss] entity instantiation

2017-05-13 Thread Тихомиров Валентин
> ports> provide a Minimal, Complete, and Verifiable example instead of snippets then complain when you can't get a quality answer without sufficient information The 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-adderAll I did, I prepended the adder reference with "entity" keyword. I did not touch any port mappings.13.05.2017, 14:58, "David Koontz" :On May 13, 2017, at 11:48 PM, Тихомиров Валентин  wrote:The command is ghdl -a adder.vhdl && ghdl --elab-run adder_tb and 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 a Minimal, 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" :Hello,have you analyzed adder before that component?Please provide the executed GHDL commands.Am 13.05.2017 1:34 nachm. schrieb "Тихомиров Валентин" :>        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 listGhdl-discuss@gna.orghttps://mail.gna.org/listinfo/ghdl-discuss___Ghdl-discuss mailing listGhdl-discuss@gna.orghttps://mail.gna.org/listinfo/ghdl-discuss,___Ghdl-discuss mailing listGhdl-discuss@gna.orghttps://mail.gna.org/listinfo/ghdl-discuss___
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss


Re: [Ghdl-discuss] entity instantiation

2017-05-13 Thread David Koontz

> On May 13, 2017, at 11:48 PM, Тихомиров Валентин  wrote:
> 
> The command is
>  
> ghdl -a adder.vhdl && ghdl --elab-run adder_tb
>  
> and 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 a 
Minimal, 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" :
>> Hello,
>> 
>> have you analyzed adder before that component?
>> Please provide the executed GHDL commands.
>> 
>> Am 13.05.2017 1:34 nachm. schrieb "Тихомиров Валентин" > >:
>> >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


Re: [Ghdl-discuss] entity instantiation

2017-05-13 Thread Тихомиров Валентин
The command is ghdl -a adder.vhdl && ghdl --elab-run adder_tb and it analyzes the correct file which I prove by injecting a terrible syntactic error and it fails to parse.13.05.2017, 14:38, "Paebbels" :Hello,have you analyzed adder before that component?Please provide the executed GHDL commands.Am 13.05.2017 1:34 nachm. schrieb "Тихомиров Валентин" :>        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 listGhdl-discuss@gna.orghttps://mail.gna.org/listinfo/ghdl-discuss___
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss


Re: [Ghdl-discuss] entity instantiation

2017-05-13 Thread Paebbels
Hello,

have you analyzed adder before that component?
Please provide the executed GHDL commands.

Am 13.05.2017 1:34 nachm. schrieb "Тихомиров Валентин" :

>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


Re: [Ghdl-discuss] entity instantiation

2017-05-13 Thread David Koontz

> On May 13, 2017, at 11:25 PM, Тихомиров Валентин  wrote:
> 
> which works. I tried to get rid of the component, making direct instantiation 
> of the entity
>  
> adder_0: entity adder port map (i0 => i0, i1 => i1, ci => ci,
>  s => s, co => co);

adder_0: entity work.adder port map (i0 => i0, i1 => i1, ci => ci,
 s => s, co => co);

adder is not directly visible.


___
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss


Re: [Ghdl-discuss] ENTITY instantiation and \extended identifier\

2015-03-31 Thread Tristan Gingold

On 31/03/15 17:26, Ole Myren Rohne wrote:

Dear GHDL developers,

I’ve ran into a problem with an ENTITY whose name is an \extended identifier\. 
Needless to say, the issue surfaced in a file supplied by a major FPGA vendor, 
below is a minimalistic test case (attached, demo.vhd).


[...]


The underlying cause seems to be the procedure 
Trans.Chap9.Translate_Entity_Instantiation (trans-chap9.adb), which is not 
fully aware of \extended identifier\. A provisional patch is a attached 
(extended.diff).


Your analysis is correct, as well as your patch.  I have merged it (with 
a simple renaming).


Thanks!

Tristan.


___
Ghdl-discuss mailing list
Ghdl-discuss@gna.org
https://mail.gna.org/listinfo/ghdl-discuss