Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17259 Discussions

Passing array as a port via hw.tcl file

Altera_Forum
Honored Contributor II
2,107 Views

Hello, 

 

System Verilog supports using array as a port. We are creating our own component which uses System Verilog. That component is going to be used in Qsys. So, we will need to use hw.tcl file to tell Qsys about our component.  

 

Let me try to elaborate it with one example,  

 

If my port is simply vector ( output logic [31:0] my_data_o ), then I could use following in hw.tcl: add_interface_port my_conduit my_data_o export Output 32. 

 

But if my port is array ( output logic [31:0] my_data__arr_o[1:0] ), how can I declare it in hw.tcl file? 

 

Thank you for your time. 

 

Regards, 

Bhaumik
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
1,244 Views

 

--- Quote Start ---  

Hello, 

 

System Verilog supports using array as a port. We are creating our own component which uses System Verilog. That component is going to be used in Qsys. So, we will need to use hw.tcl file to tell Qsys about our component.  

 

Let me try to elaborate it with one example,  

 

If my port is simply vector ( output logic [31:0] my_data_o ), then I could use following in hw.tcl: add_interface_port my_conduit my_data_o export Output 32. 

 

But if my port is array ( output logic [31:0] my_data__arr_o[1:0] ), how can I declare it in hw.tcl file? 

 

Thank you for your time. 

 

Regards, 

Bhaumik 

--- Quote End ---  

 

 

Unfortunately, but understandably, Qsys only handles 'simple' vectors. You will have to concatenate the two 32 bit elements of your array signal and drive this as a 'output logic [63:0]'. A receiving component then will have to 'unpack' this into an array.
0 Kudos
Altera_Forum
Honored Contributor II
1,244 Views

Hello, 

 

Thank you for your reply. 

 

Yes, we can use the method which you have mentioned. 

 

Cheers, 

Bhaumik
0 Kudos
Reply