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!

Reply

How to use scripts to generate memories in VIVADO

Visitor
Posts: 7
Registered: ‎01-17-2016

How to use scripts to generate memories in VIVADO

Hi guys

 

I always use a suit of scripts to generate memories in Coregen. What I did were:

1. input parameters to perl and generate *.xco files

2. use *.xco files as input to Coregen and generate *.ngc and *.v. 

 

But there is no "Coregen" in VIVADO, how can I  generate memories automatically like before?

 

Thanks and Best Regards

Azure 

Moderator
Posts: 2,908
Registered: ‎10-24-2013

Re: How to use scripts to generate memories in VIVADO

Hi @yingxiaoliu

You will need to use IP generator in Vivado.

Please refer to this thread for usage.

https://forums.xilinx.com/t5/Design-Entry/How-to-invoke-COREgen-in-Vivado/td-p/622087

Thanks,Vijay
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
Visitor
Posts: 7
Registered: ‎01-17-2016

Re: How to use scripts to generate memories in VIVADO

Hi @vijayak

 

Thanks a lot for your reply.

Yes, I have used IP Catalog tool which integraed in VIVADO, and can generate memory successfully.

But my concern is that if VIVADO can generate a dozen of memories by scripts but not in GUI? Which would save a lot of time. 

Moderator
Posts: 2,908
Registered: ‎10-24-2013

Re: How to use scripts to generate memories in VIVADO

Hi @yingxiaoliu

 

I didnt get your query.

IP catalog has GUI based flow.

Thanks,Vijay
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
Moderator
Posts: 4,610
Registered: ‎08-01-2008

Re: How to use scripts to generate memories in VIVADO

you can check this guide . you can try batch mode
http://www.xilinx.com/support/documentation/sw_manuals/xilinx2015_4/ug939-vivado-designing-with-ip-tutorial.pdf
Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
Visitor
Posts: 7
Registered: ‎01-17-2016

Re: How to use scripts to generate memories in VIVADO

Thanks a lot @balkris , it's very helpful. And I also refer to Ch6. UG896.

 

For example, we can use perl to generate "fpga_tp_128x64_dm8.tcl", and then 

"vivado -mode tcl -source fpga_tp_128x64_dm8.tcl"

 

set_part xc7v2000tflg1925-1
create_ip -name blk_mem_gen -module_name fpga_tp_128x64_dm8
set_property CONFIG.Memory_Type {True_Dual_Port_RAM} [get_ips fpga_tp_128x64_dm8]
set_property CONFIG.Use_Byte_Write_Enable {true} [get_ips fpga_tp_128x64_dm8]
set_property CONFIG.Byte_Size {8} [get_ips fpga_tp_128x64_dm8]
set_property CONFIG.Write_Width_A {64} [get_ips fpga_tp_128x64_dm8]
set_property CONFIG.Write_Depth_A {128} [get_ips fpga_tp_128x64_dm8]
set_property CONFIG.Read_Width_A {64} [get_ips fpga_tp_128x64_dm8]
set_property CONFIG.Write_Width_B {64} [get_ips fpga_tp_128x64_dm8]
set_property CONFIG.Read_Width_B {64} [get_ips fpga_tp_128x64_dm8]

# other property can use default
generate_target all [get_ips fpga_tp_128x64_dm8]

Teacher
Posts: 3,055
Registered: ‎01-23-2009

Re: How to use scripts to generate memories in VIVADO

As an alternative to generating these RAMs, you might want to consider inferring them (instead of instantiating them).

 

Synthesis tools can infer resources into BRAMs if the format of the RTL code matches the functionality of the BRAM. Xilinx even provides templates for the inference of RAMs - In Vivado use "Windows -> Language Templates", then expand

 

Verilog or VHDL -> Synthesis Constructs -> Coding Examples -> RAM -> Block RAM

 

You will see language templates for inferring different types of RAM. Since these can be inferred, you can infer any width/depth of RAM - the tools will use the appropriate number of RAMs to implement what you want (well, at least most of the time...). You can even write a single module/entity with parameters/generics that allow you to customize the width and depth of the RAM, and instantiate that with the correct parameters/generics to get the RAM you want.

 

With this, there is no mucking around with the IP catalog and/or scripts to generate multiple different flavors of RAMs - you just infer what you want directly in RTL, or instantiate your paramaterized module/entity...

 

Avrum

Visitor
Posts: 7
Registered: ‎01-17-2016

Re: How to use scripts to generate memories in VIVADO

Hi @avrumw

Thanks for your suggestion, It's very nice, and I'm using your method now.