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

Exporting the qsys address map

Altera_Forum
Honored Contributor II
3,582 Views

Does anyone know a way of exporting the 'address map' information from qsys (eg as a .csv file) so that it can be analysed in a sensible tool?

7 Replies
Altera_Forum
Honored Contributor II
2,542 Views

I've gone looking for such things in the past myself. I think it doesn't exist. I just went digging through all the build products of this morning's generation, the only thing that seems to have any finished address information in it is the memory map table in the HTML. I suppose a sufficiently desperate man could try to scrape that with BeautifulSoup or something, but it would be held together pretty touchily. 

 

There's definitely this idea with all the Qsys stuff that whatever tools Altera is willing to provide, in whatever beta state they may be, are all the tools anyone might ever want, and that there's no reason to have any sort of external API to it.
0 Kudos
Altera_Forum
Honored Contributor II
2,542 Views

The address map is exported in the .sopcinfo file, which is XML. Look for the string 'baseAddress' and 'span' to get your bearings.

0 Kudos
Altera_Forum
Honored Contributor II
2,542 Views

XML is not parseable by humans.

0 Kudos
Altera_Forum
Honored Contributor II
2,542 Views

AFAICT a lot of the tools are designed to make the tutorials (and courses) easy - but not really useful.

0 Kudos
Altera_Forum
Honored Contributor II
2,542 Views

28 masters and 54 slaves is not readable in qsys

0 Kudos
Altera_Forum
Honored Contributor II
2,542 Views

Your first request was for the information to be "analysed in a sensible tool", which I think XML fits that description. 

 

Human readable? I think the answer to that question is "no, it is not available" and your best bet would be creating a fake BSP and pulling the system.h that gets generated. 

 

Getting the information you asked about out of the XML is pretty easy, even if you don't know anything about XML or scripting with XML by following a random tutorial. 

 

Here is an XSLT that dumps comma-delimited baseAddress and span of all the slaves connected to 'jtag_avalon_master_0'. 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:for-each select="/EnsembleReport/module/interface/memoryBlock"> <xsl:value-of select="name"/>, <xsl:value-of select="baseAddress"/>, <xsl:value-of select="span"/>, </xsl:for-each> </xsl:template> </xsl:stylesheet>
0 Kudos
Altera_Forum
Honored Contributor II
2,542 Views

Open an emdedded shell and type 

sopc-create-header-files soc_system.sopcinfo --module hps_0 --single system.h 

 

will create a header file with the qsys components except the hps.
Reply