• 0

Logic: Custom Decoder from Zynq example stuck in decimal?


Question

I did a cursory search and didn't see anything related to this. Short version of the question is "How to get Hex decode on the logic tab when looking at QSPI?" 

Longer version: 

I want to look at the initialization of an Intel FPGA over QSPI, so I exactly copied the code from the tutorial "Using the Digital Discovery to look at Zynq boot sequence - Digilent Reference" and hooked up my wires exactly as described. My issue is that the QSPI decoder renders everything in decimal. In the pictures on the webiste it's all in hex but on my end I get hex values for SPI MODI and SPI  MISO then decimal values for QSPI. 

Again, cut and paste, no changes to the website code. 

 

Any idea how to get hex out of a custom analyzer protocol? 

 

Simon 

 

Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi @Simon Miller,

I have moved your question to a more appropriate section of the Forum where the engineer most familiar with the WaveForms software will be able to see and respond to your question; to confirm, the tutorial you are referring is this one, https://digilent.com/reference/test-and-measurement/digital-discovery/demos/zynq-qspi-boot?

I don't have a setup ready, but I believe you can adjust the Value-to-text tab (visible while editing the custom protocol) to the following:

// value: value sample
// flag: flag sample

function Value2Text(flag, value){
  switch(flag){
    case 0: return "X";
    default: return "0x"+value.toString(16)
  }
}
Value2Text(1,66)

as per the bottom of this specific forum comment:

I don't personally know what the "Value2Text(1,66)" line at the end is doing in the Value-to-Text tab specifically, but the function should work, or at least I verified the basic functionality in a separate Script window with the following:

var test, test2;
test = Value2Text(1,66);
test2 = Value2Text(1,240);

print(test, test2);

function Value2Text(flag, value){
  switch(flag){
    case 0: return "X";
    default: return "0x"+value.toString(16)
  }
}

Let me know how it goes.

Thanks,
JColvin

Link to post
Share on other sites
  • 0

Thank you both for the help. I was able to copy the code that JColvin put in his comment into my value to text field and now I'm getting Hex so that's great. 

Oddly, I completely lost the breakout of the actual lines, instead of having the line at the top saying "Custom" and then 6 data lines that I can see toggle I just have the analyzer with what looks like the correct hex at the top and nothing else. I went back to the tutorial that JColvin linked again (that was the correct one) and recopied the code in case I'd accidentally modified it but no luck. 

I was able to manually add the lines and modify the naming to work so that's not an issue I just thought they didn't interact like that. 

Simon

 

 

Edited by Simon Miller
Link to post
Share on other sites
  • 0

Hi @Simon Miller,

I'm not certain what you are referring to, but I know the tutorial briefly mentions at the end of step 2 that they individually added SPI MISO and SPI MOSI analyzers to run co-currently with the custom analyzer to get those extra data lines (you can rename the custom analyzer from it's edit tab).

Let me know if you have any questions.

Thanks,
JColvin

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now