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

struct -> how to add to SignalTap ?

amildm
重要分销商 I
4,849 次查看

Hi All,

Is it possible to add the struct signals to SignalTap? I did a search for the struct signals in the SignalTap GUI, but nothing was returned...

Thanks!

0 项奖励
1 解答
sstrell
名誉分销商 III
4,763 次查看

Yes, so as I said, why don't you just tap the right hand side signals?

在原帖中查看解决方案

25 回复数
sstrell
名誉分销商 III
4,105 次查看

What is a struct signal?  Do you mean like a structure in C code?

amildm
重要分销商 I
4,104 次查看

yes, I used this struct:

typedef struct packed {
  logic clk;  
  logic rst;  
  logic de;  
  logic hsync;  
  logic vsync;  
} hdmi_if_s;

here are the declared signals:

hdmi_if_s hdmi_rx_if;
hdmi_if_s hdmi_tx0_if;
hdmi_if_s hdmi_tx1_if;

here are the signal assignments:

assign hdmi_rx_if.rst   = reset;
assign hdmi_rx_if.clk   = hdmi_rx_vid_clk;
assign hdmi_rx_if.de    = hdmi_rx_de;
assign hdmi_rx_if.hsync = hdmi_rx_hsync;
assign hdmi_rx_if.vsync = hdmi_rx_vsync;

assign hdmi_tx0_if.rst   = reset;
assign hdmi_tx0_if.clk   = hdmi_tx0_vid_clk;
assign hdmi_tx0_if.de    = hdmi_tx0_de;
assign hdmi_tx0_if.hsync = hdmi_tx0_hsync;
assign hdmi_tx0_if.vsync = hdmi_tx0_vsync;

assign hdmi_tx1_if.rst   = reset;
assign hdmi_tx1_if.clk   = hdmi_tx_vid_clk;
assign hdmi_tx1_if.de    = hdmi_tx_de;
assign hdmi_tx1_if.hsync = hdmi_tx_hsync;
assign hdmi_tx1_if.vsync = hdmi_tx_vsync;

In SignalTap, I searched for the signals with the "SignalTap: pre-synthesis" option, but they did not appear there ...

0 项奖励
sstrell
名誉分销商 III
4,102 次查看

I've never tried this, but maybe the tool just sees them as busses.  Can you tap hdmi_rx_if but not the individual bits by unique name?

amildm
重要分销商 I
4,101 次查看

tried... did not work...

0 项奖励
sstrell
名誉分销商 III
4,098 次查看

What's your filter for the search?  Did you try simply "*hdmi*"?

And I'm assuming you've performed at least Analysis & Elaboration on the project.

amildm
重要分销商 I
4,096 次查看

yes, I searched for "*hdmi*" and yes I performed the Analysis & Elaboration stage previously

0 项奖励
sstrell
名誉分销商 III
4,094 次查看

Does the filter show the signals on the right side of your assignments like hdmi_rx_de?

amildm
重要分销商 I
4,093 次查看

yes.... only the struct is not shown ....

0 项奖励
sstrell
名誉分销商 III
4,092 次查看

So can't you just tap those?  The structure is just providing organization in your code.  It's clearly not the physical names of the signals that get synthesized.

amildm
重要分销商 I
4,085 次查看

yes.... cannot tap ....

0 项奖励
sstrell
名誉分销商 III
4,083 次查看

I don't understand.  So the right hand side signals from your assignments appear in the Node Finder but you can't tap them?  What happens when you try to tap them?

amildm
重要分销商 I
4,074 次查看

probably I've misled you ... the right-side signals (declared as logic or wire) do appear in the search, but the left-side signals (declared as struct) do not appear...

0 项奖励
sstrell
名誉分销商 III
4,764 次查看

Yes, so as I said, why don't you just tap the right hand side signals?

RichardTanSY_Altera
4,032 次查看

Do you able to get the result you wanted by following sstrell's suggestion in tapping the right hand side signals?

 

Best Regards,

Richard Tan 

 

p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey.

amildm
重要分销商 I
4,020 次查看

yes, the right-hand signals could be tapped... but the struct itself cann't ...

0 项奖励
sstrell
名誉分销商 III
4,018 次查看

So doesn't that solve your problem?  They're the same thing.

amildm
重要分销商 I
4,017 次查看

no, the issue is still open... The signals, which have been declared as structs, could not be seen by SignalTap ...

 
 

 

 

0 项奖励
sstrell
名誉分销商 III
4,013 次查看

I don't understand.  You can tap the exact signals that are in your struct, so why is it still an issue that you can't tap the struct itself?  The signals are physical.  The struct is for organizing in the code with no specific relation to the hardware.

If you go into the Technology Map Viewer, I will bet you will not see the struct names there either, further confirming they are not physical.  Signal Tap can only tap actual signals.

amildm
重要分销商 I
4,004 次查看

"why is it still an issue that you can't tap the struct itself" - I don't know why... this is why I'm asking

Here is a simple example - the struct named 'ab' could not be seen/tapped in the 'top' hierarchy by SignalTap (only signals i0 and i1 could be tapped/seen):

 

////////////////////////////////////////////////////////////////////////////////////////////////////
package pkg;
typedef struct packed {
  logic a;  
  logic b;  
} ab_s;  
endpackage 

////////////////////////////////////////////////////////////////////////////////////////////////////
module top 
import pkg::*;
  (
  input i0,      
  input i1 
);

ab_s ab;

assign ab.a = i0;
assign ab.b = i1;

sub sub_i (
  .ab (ab),
  .out()
  );

endmodule 


////////////////////////////////////////////////////////////////////////////////////////////////////
module sub 
import pkg::*;
(
  input ab_s ab, 
  output logic out
);
assign out = ab.a^ab.b; 
endmodule 

 

But inside of the 'sub' hierarchy, the signals ab.a and ab.b could be tapped/seen by the SignalTap.

 
 

 

 

0 项奖励
sstrell
名誉分销商 III
4,006 次查看

Based on your example, I can only guess that physical signal names normally take priority (i0 and i1 are identical to ab.a and ab.b, respectively), but across a hierarchical boundary, if there is no physical signal name, the tool uses the struct because it has no choice.  Try adding wires and assign statements inside sub to test this theory.

回复