Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to select the ROI in prjxray's settings.sh #1

Open
hansfbaier opened this issue Feb 3, 2022 · 5 comments
Open

How to select the ROI in prjxray's settings.sh #1

hansfbaier opened this issue Feb 3, 2022 · 5 comments

Comments

@hansfbaier
Copy link
Contributor

hansfbaier commented Feb 3, 2022

Hi @unbtorsten and @jrrk2,
I am kind of new to the fuzzing business, and several things that still mystify me, and
which I could not yet find a sufficient answer for in the symbiflow/prjxray doc, and what I might
have missed in the maze of our discussions on gmail, is:

  1. What is the ROI supposed to be set to? The whole grid of the whole device?
  2. But the name ROI suggests it is only a part of that. If that is the case, then:
    • Why is selecting a part enough? How does the software figure out how to use the rest?
    • Where is the real geometry of the device specified?
    • How to select that specific region? Select a minimal rectangle, which contains every tile type to be fuzzed?
  3. The coordinates for eg. the DSP blocks don't seem to match up with the names in the device viewer in Vivado. They seem to be relative coordinates somehow, not the absolute ones of the tilegrid? But I need to look at that again, still very unsure.

Sorry for those newbie questions, if I failed to RTFM somehow,
please point me to the relevant documents to read.
Best regards,
Hans

@hansfbaier
Copy link
Contributor Author

I found the following mail from @unbtorsten, with a partial answer:

When inspecting the corresponding configuration for Artix7, I got the
impression that you can exclude the special areas (DSP etc) in the
subsequent line:
> export XRAY_EXCLUDE_ROI_TILEGRID=""
That is, you would be able to define a minimal rectangle to simplify
the value of 'XRAY_ROI_TILEGRID', but then have to define further
exclusions in 'XRAY_EXCLUDE_ROI_TILEGRID'. Vice versa, the 'exclude'-
list is shorter, if you specify the 'XRAY_ROI_TILEGRID' in more detail
to begin with.

@unbtorsten
Copy link

I haven't found much documentation on this aspect either. I'll post the question to symbiflow's slack channel in hope for some input.

@jrrk2
Copy link

jrrk2 commented Feb 3, 2022

As I understand it these environment variables are used to control possible placements in the tcl scripts that are used to generate the tile grid. If you specify an out of range value for the device, the fuzzers will fail, if you specify too small values, some of the device will be inaccessible. If you don’t specify a value at all, the tcl bombs out. All values you enter are validated by Vivado.

@hansfbaier
Copy link
Contributor Author

hansfbaier commented Feb 5, 2022

I have just had a major insight. The ROI coordinates of the different primitives are the site coordinates, not the tile coordinates.
For example in settings/artix7_50t, we find:

XRAY_ROI_TILEGRID="SLICE_X0Y0:SLICE_X65Y99 ..."

image
which is the lower left corner of the SLICE sites in the bottom half of the FPGA,
and:
image
which is the upper right corner of the SLICE sites in thee bottom half of the FPGA.
And subsequently we find:

[...] SLICE_X0Y100:SLICE_X57Y149

which are the corners of the top half:
image
image

@hansfbaier
Copy link
Contributor Author

I just completed the settings file for XC7K160T.
I created two Vivado blinkies, one for the XC7K70T and one for the XC7K160T.
Looked at what elements were selected in the 70t and selected anologous elements for the 160t.
Fuzzers running, fingers crossed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants