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: 
Observer josephg
Observer
1,504 Views
Registered: ‎05-29-2018

can vivado use system verilog

hi

 

i have the following code segment in a system verilog file:

 

    AXI_BUS
     #(
       .AXI_ADDR_WIDTH (AXI_ADDRESS_W),
       .AXI_DATA_WIDTH (AXI_DATA_W   ),
       .AXI_ID_WIDTH   (AXI_ID_IN    ),
       .AXI_USER_WIDTH (AXI_USER_W   )
     )
     axi_slave[N_SLAVE_PORT]();

apparently vivado does not like this very much. it looks like it is missing a flie in the hierarchy treeview.

 

how can i fix this?

0 Kudos
9 Replies
Adventurer
Adventurer
1,478 Views
Registered: ‎04-24-2012

Re: can vivado use system verilog

Hi,

Vivado does support SystemVerilog, but I haven't see anything similar in SystemVerilog as what you mention, the syntax is:

 

module_name parameters instace_identifier (port connections);

I have no data about if your ports are already declared and so you want to use implicit connection (.*);, and what exactly are you trying to do with this instruction axi_slave[N_SLAVE_PORT], by thinking axi_slave is the module identifier. If you are trying to instantiate a bunch of axi slaves, I would suggest you to use a for...generate instead.

Please check SystemVerilog LRM.

AXI_BUS
     #(
       .AXI_ADDR_WIDTH (AXI_ADDRESS_W),
       .AXI_DATA_WIDTH (AXI_DATA_W   ),
       .AXI_ID_WIDTH   (AXI_ID_IN    ),
       .AXI_USER_WIDTH (AXI_USER_W   )
     )
     axi_slave (.*);

 

/* Don't forget to give kudos and/or accept as a solution */
Scholar markcurry
Scholar
1,465 Views
Registered: ‎09-16-2009

Re: can vivado use system verilog

 

Actually, I think your code should work fine with Vivado.  I'm guessing "AXI_BUS" is a SystemVerilog interface. Vivado supports these.  

 

It looks like you're trying to create an ARRAY of Interfaces(N_SLAVE_PORT) elements deep.  Vivado does support arrays of interfaces too.

 

May I suggest changing to use a range for the interface array instead of the number of elements and see if this works?  i.e.

AXI_BUS
     #(
       .AXI_ADDR_WIDTH (AXI_ADDRESS_W),
       .AXI_DATA_WIDTH (AXI_DATA_W   ),
       .AXI_ID_WIDTH   (AXI_ID_IN    ),
       .AXI_USER_WIDTH (AXI_USER_W   )
     )
     axi_slave[N_SLAVE_PORT - 1 : 0]();

We use this type of thing ALL the time (with the exact same interface parameters (slightly different parameter names, but still).  It works fine in Vivado.  

 

Regards,

 

Mark

 

Scholar markcurry
Scholar
1,464 Views
Registered: ‎09-16-2009

Re: can vivado use system verilog

@diego73

And I disagree with the implicit connection suggestion (.*) 

 

Those are NEVER required, and IMHO should NEVER be used.  That feature of the SystemVerilog language should be gutted, burned and never thought of again...  Such a bad idea.

 

But that's just my 2 cents.

 

Regards,

 

Mark

 

 

0 Kudos
Observer josephg
Observer
1,439 Views
Registered: ‎05-29-2018

Re: can vivado use system verilog

@diego73i have not found anything like this either searching the internet. i would like to avoid having to go in depth with system verilog as i would like to use the code as an ip core and not change anything in the process. usually it is easy to figure out what something does, but not in this instance.

 

@markcurryi  will try this, thanks for the tip.

 

EDIT:

sadly neither suggestion worked.

 

the code should be fine though. it is the ariane cpu ( https://github.com/pulp-platform/ariane ) so i assume the problem is with vivado. i have attached a screenshot of treeview. no idea if this helps.

vivado_system_verilog.png
0 Kudos
Scholar markcurry
Scholar
1,426 Views
Registered: ‎09-16-2009

Re: can vivado use system verilog

@josephg - The code you posted is fairly straightforward SystemVerilog that should be supported fine in Vivado.  Can you post the exact error message that you are receiving during synthesis?  That should help narrow down the issue.

 

Regards,

 

Mark

Observer josephg
Observer
1,419 Views
Registered: ‎05-29-2018

Re: can vivado use system verilog

this is the error:

[Synth 8-470] no interface 'AXI_BUS' found
[Synth 8-285] failed synthesizing module 'axi_node_wrap_with_slices' ["/home/shuemer/soc/xilinx_projects/ip_core_projects/ariane/ariane.srcs/sources_1/imports/ariane/src/axi_node/axi_node_wrap_with_slices.sv":43]
[Common 17-69] Command failed: Vivado Synthesis failed
0 Kudos
Adventurer
Adventurer
1,415 Views
Registered: ‎04-24-2012

Re: can vivado use system verilog

@josephg hullo!, now that's clear ... data is very valuable. If you describe your problem as much as possible, it is faster for everyone to help and for you to have an answer.

 

Vivado does support SystemVerilog, and support interfaces but there are limitations in some scenarios like packaging the IP, this tools does not work with SystemVerilog interfaces at all, you need to convert those to plain ports, but I mention this only for you to know, it may be useful or not.

 

In the issue side, the answer is that there is no such issue :), you only miss the required files: axi_node_wrap.sv and axi_slice_wrap.sv, as soon as you add those guys, you will be ready to go.  Here's the proof, I'm using old version of Vivado just to make things more clear. It should work better in 2017.x and beyond.

Untitled.png

Pulp guys are great, but the project organization is not as good as his risc-v cores, you will need to dig into old commits to find some files.

 

@markcurry my dear friend, I could not agree more with you, and to be honest I mentioned implicit connection because I was as puzzled as you, but I not wanted to create more confusion to this problem. You are right, and we should tell beginners in SystemVerilog to follow some good practices as that one. Thank you for your input here.

/* Don't forget to give kudos and/or accept as a solution */
0 Kudos
Observer josephg
Observer
1,376 Views
Registered: ‎05-29-2018

Re: can vivado use system verilog

@diego73so i have to dig around to find some files that are required? is that a joke? maybe i should try another soft core CPU. do you have any suggestions?

0 Kudos
Adventurer
Adventurer
1,371 Views
Registered: ‎04-24-2012

Re: can vivado use system verilog

If you want to try RISC-V, maybe you would like PicoRV32, which is formally proven, has multiple bus interfaces (simple memory, AXI, Wishbone) and is packed as Vivado IP by someone else:

https://github.com/cliffordwolf/picorv32

 

The Vivado IP:

https://github.com/GuzTech/vivado-picorv32

 

But is just a recommendation on RISC-V cores, of course you can use what is better for you. 

/* Don't forget to give kudos and/or accept as a solution */
0 Kudos