FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-02-2003, 06:04 PM
Valentin Tihomirov
Guest
 
Posts: n/a
Default Overriding functionality of an entity is prohibited?

I want to extend behaviour(architecture) of an entity (interface).

architecture EXTENDING_ARCH of SOME_ENTITY is
begin
base: entity work.SOME_ENTITY(BASIC_ARCH) PORT MAP(

Error message: "Entity 'SOME_ENTITY' is exactly the same as instance (same
ports and generics)."


Reply With Quote
  #2 (permalink)  
Old 11-02-2003, 06:20 PM
Paul Uiterlinden
Guest
 
Posts: n/a
Default Re: Overriding functionality of an entity is prohibited?

Valentin Tihomirov wrote:

> I want to extend behaviour(architecture) of an entity (interface).
>
> architecture EXTENDING_ARCH of SOME_ENTITY is
> begin
> base: entity work.SOME_ENTITY(BASIC_ARCH) PORT MAP(
>
> Error message: "Entity 'SOME_ENTITY' is exactly the same as instance
> (same ports and generics)."


I have no idea whether the above is allowed or not.

In stead of direct instantiation, you could use a component
instantiation and use a configuration declaration (or even
specification) to specifiy the architecture you want to use
(basic_arch in your case).

Something along these lines (untested):

ENTITY some_entity IS
END ENTITY some_entity.

ARCHITECTURE basic_arch OF some_entity IS
BEGIN
END ARCHITECTURE basic_arch;

ARCHITECTURE extending_arch OF some_entity IS
COMPONENT some_entity IS
END COMPONENT some_entity;
BEGIN
base: some_entity
PORT MAP
(
...
);
END ARCHITECTURE extending_arch;

CONFIGURATION some_entity_extending_arch_cfg OF some_entity IS
FOR extending_arch
FOR base
USE ENTITY work.some_entity(base_arch);
END FOR;
END FOR;
END CONFIGURATION some_entity_extending_arch_cfg;

--
Paul.
(s and x switched in e-mail)
Reply With Quote
  #3 (permalink)  
Old 11-02-2003, 06:58 PM
Valentin Tihomirov
Guest
 
Posts: n/a
Default Re: Overriding functionality of an entity is prohibited?

Component instantiations are used for components which structural or
behavioral implementation is not yes defined. In my case I base new
architecture on a specific one. I wanted someone to explain where is the
circullar reference I encounter, where is my fault?


Reply With Quote
  #4 (permalink)  
Old 11-02-2003, 11:12 PM
Mike Treseler
Guest
 
Posts: n/a
Default Re: Overriding functionality of an entity is prohibited?


Valentin Tihomirov wrote:
> Component instantiations are used for components which structural or
> behavioral implementation is not yes defined. In my case I base new
> architecture on a specific one. I wanted someone to explain where is the
> circullar reference I encounter, where is my fault?


Consider a new name for the expanded entity:

architecture synth of SOME_ENTITY_PLUS is
begin
base: entity work.SOME_ENTITY(synth) PORT MAP(

-- Mike Treseler

Reply With Quote
  #5 (permalink)  
Old 11-03-2003, 09:24 AM
Klaus Falser
Guest
 
Posts: n/a
Default Re: Overriding functionality of an entity is prohibited?

In article <[email protected]>, [email protected] says...
> Component instantiations are used for components which structural or
> behavioral implementation is not yes defined. In my case I base new
> architecture on a specific one. I wanted someone to explain where is the
> circullar reference I encounter, where is my fault?
>


Your line

base: entity work.SOME_ENTITY(BASIC_ARCH) PORT MAP(..

is only an abbreviation for a component declaration and an instantiation together.

It creates the same entity internally of the entity.

Immagine your entity declatation as a socket and the architectures as the different
pin-compatible devices which can be plugged in.

You can not have a device which has internally a socket for the same device, or at
least it is hard to deal with.
What happens if you plug in the same device in the internal socket again and again?

If you want to define an extended entity, you have to give it a new name.

Do not forget that VHDL is a hardware description language and not a programming
language!

Best regards

--
Klaus Falser
Durst Phototechnik AG
[email protected]
Reply With Quote
  #6 (permalink)  
Old 11-03-2003, 10:14 AM
Paul Uiterlinden
Guest
 
Posts: n/a
Default Re: Overriding functionality of an entity is prohibited?

Klaus Falser wrote:
>
> Your line
>
> base: entity work.SOME_ENTITY(BASIC_ARCH) PORT MAP(..
>
> is only an abbreviation for a component declaration and an instantiation together.
>
> It creates the same entity internally of the entity.
>
> Immagine your entity declatation as a socket and the architectures as the different
> pin-compatible devices which can be plugged in.
>
> You can not have a device which has internally a socket for the same device, or at
> least it is hard to deal with.
> What happens if you plug in the same device in the internal socket again and again?


But that does not happen. In architecture BASIC_ARCH there is no further
instantiation.

Paul.

Reply With Quote
  #7 (permalink)  
Old 11-03-2003, 12:55 PM
Valentin Tihomirov
Guest
 
Posts: n/a
Default yes, glad to see one careful person


Yes, BASIC_ARCH does not have any instantiations.



Reply With Quote
  #8 (permalink)  
Old 11-03-2003, 12:56 PM
Valentin Tihomirov
Guest
 
Posts: n/a
Default Re: Overriding functionality of an entity is prohibited?


"Klaus Falser" <[email protected]> wrote in message
news:[email protected]
> In article <[email protected]>,

[email protected] says...
> > Component instantiations are used for components which structural or
> > behavioral implementation is not yes defined. In my case I base new
> > architecture on a specific one. I wanted someone to explain where is the
> > circullar reference I encounter, where is my fault?
> >

>
> Your line
>
> base: entity work.SOME_ENTITY(BASIC_ARCH) PORT MAP(..
>
> is only an abbreviation for a component declaration and an instantiation

together.
>
> It creates the same entity internally of the entity.
>
> Immagine your entity declatation as a socket and the architectures as the

different
> pin-compatible devices which can be plugged in.
>
> You can not have a device which has internally a socket for the same

device, or at
> least it is hard to deal with.
> What happens if you plug in the same device in the internal socket again

and again?
>
> If you want to define an extended entity, you have to give it a new name.
>
> Do not forget that VHDL is a hardware description language and not a

programming
> language!
>


Where did I confuse programming and HW desc. languages? Nevertheless, there
are definite analogues to OOP. An entity corresponds to interface,
architectures allow for several implementations of that interface. These are
VHDL components that stand for sockets; meantime, I instantiate a specific
architecture and compiler should not get into instantiation recursion when
analyzes VHDL properly because the nested architecture does not instantiate
anything.

Thank you for your view of entity notion. Here was mine. May be
compiler/simulator has a third notion of entity object. Where is a supreme
arbiter that can tell who is right?


Reply With Quote
  #9 (permalink)  
Old 11-03-2003, 01:33 PM
Paul Uiterlinden
Guest
 
Posts: n/a
Default Re: Overriding functionality of an entity is prohibited?

Valentin Tihomirov wrote:
>
> Thank you for your view of entity notion. Here was mine. May be
> compiler/simulator has a third notion of entity object. Where is a supreme
> arbiter that can tell who is right?


The LRM of course! ;-)

In my opinion your code is correct. I simulated your code (see below) in ModelSim.
The output did not contain any surprise:

bash> vsim -c 'my_ent(ext_arch)' -do 'run -a; quit'
Reading /appl/iccadm/MTI/mti_5.7d/tcl/vsim/pref.tcl

# 5.7d

# vsim -do {run -a; quit} -c my_ent(ext_arch)
# // ModelSim SE VHDL 5.7d May 2 2003 SunOS 5.8
# //
# // Copyright Model Technology, a Mentor Graphics Corporation company, 2003
# // All Rights Reserved.
# // UNPUBLISHED, LICENSED SOFTWARE.
# // CONFIDENTIAL AND PROPRIETARY INFORMATION WHICH IS THE
# // PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS.
# //
# Loading /appl/iccadm/MTI/mti_5.7d/bin/../sunos5/../std.standard
# Loading work.my_ent(ext_arch)
# Loading work.my_ent(basic_arch)
# run -a; quit
# ** Note: Hi, I am basic_arch
# Time: 0 ps Iteration: 0 Instance: /my_ent/base
# ** Note: Hi, I am ext_arch
# Time: 0 ps Iteration: 0 Instance: /my_ent



ENTITY my_ent IS
END ENTITY my_ent;

ARCHITECTURE basic_arch OF my_ent IS
BEGIN
hello: ASSERT false
REPORT "Hi, I am basic_arch"
SEVERITY note;
END basic_arch;

ARCHITECTURE ext_arch OF my_ent IS
BEGIN
hello: ASSERT false
REPORT "Hi, I am ext_arch"
SEVERITY note;

base: ENTITY work.my_ent(basic_arch);
END ext_arch;


Paul.

Reply With Quote
  #10 (permalink)  
Old 11-03-2003, 07:51 PM
Valentin Tihomirov
Guest
 
Posts: n/a
Default Re: Overriding functionality of an entity is prohibited?

But WebPack sythesis reports

ERROR:Xst:1609 -
C:/projects/xilinx_bad_arch_bind/../Temp/rs232/rs232/src/my/my_ent.vhd line
23: Entity 'my_ent' is exactly the same as instance (same ports and
generics).

end does not proceed. Project navigator cannot bouild hierarcy due to the
same recursion. I can not tell about quality of Xilinx chips (have not
anything to download yet) but SW tell for itself. A new error every day!


Reply With Quote
  #11 (permalink)  
Old 11-03-2003, 08:41 PM
Mike Treseler
Guest
 
Posts: n/a
Default Re: Overriding functionality of an entity is prohibited?

Valentin Tihomirov wrote:
> But WebPack sythesis reports
>
> ERROR:Xst:1609 -
> C:/projects/xilinx_bad_arch_bind/../Temp/rs232/rs232/src/my/my_ent.vhd line
> 23: Entity 'my_ent' is exactly the same as instance (same ports and
> generics).
>
> end does not proceed. Project navigator cannot bouild hierarcy due to the
> same recursion.


Selecting one of two architectures requires a vhdl configuration.
You cannot use a configuration and a direct instance at the same time.
Some synthesis software does not support vhdl configurations in any case.
I stand by my earlier advice.

-- Mike Treseler

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Overriding SDF backannotation y_p_w Verilog 3 11-05-2007 04:43 AM
timescale overriding? Neo Verilog 1 10-11-2007 08:26 AM
overriding parameters [email protected] Verilog 2 09-04-2007 04:44 PM
Overriding a VHDL generic for command-line driven synthesis with ISE Uncle Noah FPGA 0 08-26-2007 04:51 AM
Entity with Multiple Architectures [email protected] FPGA 2 03-15-2006 02:11 AM


All times are GMT +1. The time now is 04:14 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved