UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Voyager
Voyager
5,353 Views
Registered: ‎04-12-2012

Why use a wrapper in Block Design?

Hello,

 

The highest hierarchy of any Block Design in Vivado is always an HDL file that bares the Block Design's name and contains all the appropriate interconnections between instantiated components...

 

So why do we have to generate an HDL wrapper as a subsequent step ? Isn't this redundant ?

 

For example, in a VHDL based project:

If we name our Block Design: "some_design" - it will ALWAYS have "some_design.vhd" file as part of the synthesis sources.

As part of the design process, the next step is to generate an HDL wrapper which will be automatically called: "some_design_wrapper.vhd".

 

If we look inside "some_design_wrapper.vhd" the ONLY thing that we'll see is "some_design.vhd" instantiated as a daughter component - NOTHING MORE.

 

So why can't we skip the generation of "some_design_wrapper.vhd" and use "some_design.vhd" instead ?

What am I missing ?

0 Kudos
7 Replies
Highlighted
Observer yurifiore
Observer
5,319 Views
Registered: ‎07-21-2016

Re: Why use a wrapper in Block Design?

Hi Shaikon,

 

I had the same question previosly. What I found is that, following your terminology, "some_design.vhd" is a read only file which cannot be modified by the user, I guess for the sake of consistency bewteen your block design and it's instance.

If you take a closer look to "some_design.vhd", you'll find that it contains the instances of every IP you're using inside your block design.

On the other hand, "some_design_wrapper.vhd" contains only the instance of the entire block design, and provide the possibility to the user of adding custom logic to it.

 

As an example, you wouldn't be able to use "some_design.vhd" as a top level module, while it's possible by employing "some_design_wrapper.vhd", provided you're adding the correct pins (and all the other constraints) in your .vhd and .xdc files. 

 

Cheers

 

------------------------------------------------------

Please, give a kudo to this post if you found useful information 

Voyager
Voyager
5,310 Views
Registered: ‎04-12-2012

Re: Why use a wrapper in Block Design?

Thanks for the clear explanation.

Can you please direct me to the forum link where you asked this question? (If it was on this forum of-course...)

0 Kudos
Scholar hbucher
Scholar
5,300 Views
Registered: ‎03-22-2016

Re: Why use a wrapper in Block Design?

@shaikon Just to add to the answer of @yurifiore, sometimes you want to create the HDL wrapper as a convenience but then modify its contents for your own purpose, whatever it is. 

It is an advanced usage but sometimes it is what's necessary if, for example, you have other HDL sources you have to integrate that do not conform to the AXI standard.

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
Voyager
Voyager
5,294 Views
Registered: ‎04-12-2012

Re: Why use a wrapper in Block Design?


@hbucher wrote:

@shaikon Just to add to the answer of @yurifiore, sometimes you want to create the HDL wrapper as a convenience but then modify its contents for your own purpose, whatever it is. 

It is an advanced usage but sometimes it is what's necessary if, for example, you have other HDL sources you have to integrate that do not conform to the AXI standard.

 


And at this point I expected a responsible adult to say: "if it doesn't conform to AXI standards - it's should be out and away of the Block Design scope at the first place..."

0 Kudos
Scholar hbucher
Scholar
5,292 Views
Registered: ‎03-22-2016

Re: Why use a wrapper in Block Design?

@shaikon Not necessarily. Take for example QDR memory. It does not have an AXI interface because it does not make sense to have an AXI interface (due to latency) so you would have to program the native interface. 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Voyager
Voyager
5,281 Views
Registered: ‎04-12-2012

Re: Why use a wrapper in Block Design?

"so you would have to program the native interface"
And I will gladly do so in a separate out-of-BD component named "QDR_memory_controller.vhd" and I'll connect both it and the bd.vhd in a top level file named "top.vhd".

But this is a matter of flavor of-course...
0 Kudos
Visitor xlabs
Visitor
4,442 Views
Registered: ‎07-11-2018

Re: Why use a wrapper in Block Design?

I don't use the wrapper. I use various  block designs in my project, mostly because I am too lazy to manually instantiate the core generators for bram or fifos for instance. Then when I need those BDs, I can instantiate them in a for-generate fashion. The trick is to generate the output products of the block design in question, and in the sources(top tab) libraries( bottom tab) you will find the blocksources->[name of your bd]->blockdesigns->[name of your bd] entry which you can right click and select "view instantiation template". This template would become the wrapper if you wanted to, but you just need to copy the component part in that template and paste where you want to instantiate , this time instead of using component, you use the entity work.name way.  The error checking wont be happy because the corresponding .vhd is not added to the xil_defaultlib but it will synthesize correctly. At least it does in my case.

Multi_BD.png

0 Kudos