Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.
15811 Discussions

struct -> how to add to SignalTap ?

amildm
Valued Contributor I
568 Views

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 Kudos
1 Solution
sstrell
Honored Contributor III
482 Views

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

View solution in original post

25 Replies
sstrell
Honored Contributor III
507 Views

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

amildm
Valued Contributor I
506 Views

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 ...

sstrell
Honored Contributor III
504 Views

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
Valued Contributor I
503 Views
sstrell
Honored Contributor III
500 Views

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
Valued Contributor I
498 Views

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

sstrell
Honored Contributor III
496 Views

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

amildm
Valued Contributor I
495 Views

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

sstrell
Honored Contributor III
494 Views

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
Valued Contributor I
487 Views

yes.... cannot tap ....

sstrell
Honored Contributor III
485 Views

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
Valued Contributor I
476 Views

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...

sstrell
Honored Contributor III
483 Views

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

RichardTanSY_Intel
434 Views

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
Valued Contributor I
422 Views

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

sstrell
Honored Contributor III
420 Views

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

amildm
Valued Contributor I
419 Views

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

 
 

 

 

sstrell
Honored Contributor III
415 Views

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
Valued Contributor I
406 Views

"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.

 
 

 

 

sstrell
Honored Contributor III
408 Views

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.

Reply