Jump to content

IP-XACT: How to define a memory including some context about the meaning of the data words?


Ralf Hildebrandt

Recommended Posts

When defining a <memory map> one can define an <address block> with some range and a <usage> of e.g. <register> or <memory>. If a true memory (e.g. an SRAM) needs to be modeled, the <usage> is obviously <memory>.

Now such a memory may store some data with some meaning: e.g. the memory may store an Ethernet frame and the first 6 bytes are the <dst> (the destination = the MAC address of the destination (receiver of the frame)).

With IP-XACT such a meaning of the memory content could be modeled as a <register> inside the <address block>. The context-sensitive help of the <Kactus2> tool says: "Memory ... Registers and register files within will be considered virtual."

My question is: Is it correct to model words / bytes inside some real memory as <register> / <field> using IP-XACT or should definitions as <register> / <field> limited to flip-flops (real registers)? Are there any better way to describe the meaning of memory words using IP-XACT?

Many thanks in advance
Ralf

Edited by Ralf Hildebrandt
a more precise title
Link to comment
Share on other sites

  • Ralf Hildebrandt changed the title to IP-XACT: How to define a memory including some context about the meaning of the data words?

Hello Ralf,

In IEEE Std. 1685-2014 the concept of virtual registers was introduced:

Quote

virtual register: A collection of fields, overlaid on top of a memory, usually in an array. The semantics and
layout of virtual registers come from an agreement between the software and hardware. Virtual registers are
modeled in IP-XACT by creating register instances within addressBlocks with usage memory. The child
elements of a virtual register are restricted to a subset of the overall register element.
NOTE—See 6.11.2.
virtual register file: A grouping of virtual registers. A virtual register file is modeled using the registerFile
element in an addressBlock element with usage of memory. The children of virtual register files shall be
virtual.
NOTE—See 6.11.6.

So if you set the usage attribute to memory, then you indicate that your registers are virtual.

Does that address your question?
Best regards,
Erwin

Link to comment
Share on other sites

2 minutes ago, kock said:

So if you set the usage attribute to memory, then you indicate that your registers are virtual.

Does that address your question?

Ok, understood and many thanks for this.

But the main question was: Is this the correct way of modeling a meaning of data words inside some memory (by using virtual registers)?

I am asking this, because I am a beginner to IP-XACT and am not sure if all tools will understand this, if I do model memories in that way. (I am a hardware designer, who needs to model an IP-XACT decription of some peripheral and want to make sure, that tools and users that will use this description will understand it.)

Kind regards
Ralf

Link to comment
Share on other sites

Yes, this is the correct way. Not sure which tools you have in mind but if you are referring to tools that generate software header files, then these will typically generate a C/C++ structure from your IP-XACT descriptions. You have to make sure that such a structure makes sense in C/C++ so you want to have your registers byte/word aligned.

Best regards,
Erwin

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...