UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor allsey_1987
Visitor
3,472 Views
Registered: ‎10-27-2009

Using Arrays, Records, Integers etc as ports IO of custom IP cores of microblaze design

Jump to solution


I'm integrating a soft-core microblaze cpu into a design for a control system. I have created a custom IP core for the microblaze system which contains a number of registers with variable behaviour. the custom IP core makes use of the following array/data structure to group together 16 12bit unsigned numbers to make it easier to move this in and out of the entities.

I have used the definitions as follows inside a package file to group these common signals into an array:

library ieee;
use ieee.numeric_std.all;

package custom_signals is
type cosine_wave is record
period, amplitude : unsigned(11 downto 0);
end record;

type cosine_waves is array (natural range 0 to 7) of cosine_wave;
end package custom_signals;

package body custom_signals is
end package body custom_signals;

 

 
 Now the problem is when I integrate this hardware back into the microblaze design, and that into my top level design and view the Hardware Instiation Template for my microblaze, the object which should be of type cosine_waves shows up as a std_logic_vector(0 to 7)... array dimensions are correct but the rest i wacked...
 
and on top of this all of my signals which were of type either natural or integer have been converted to 1 bit std_logic in the Hardware Instiation Template.
what to do...???

Any knowledge regarding working with records and arrays as ports will also be greatly appreciated.
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Adventurer
Adventurer
4,253 Views
Registered: ‎01-04-2008

Re: Using Arrays, Records, Integers etc as ports IO of custom IP cores of microblaze design

Jump to solution

I have tried to use records as ports before, but unfortunately the MPD syntax does not provide a way to describe records.  The only workaround I found was to name the MPD ports of records as logic vectors of the expanded width of the record.  I think the safest bet is to always use std_logic_vectors when interfacing custom components.  However, If you want to group signals, you can use the MPD file to create custom interfaces made up of sets of ports.

 

-Jason

0 Kudos
1 Reply
Highlighted
Adventurer
Adventurer
4,254 Views
Registered: ‎01-04-2008

Re: Using Arrays, Records, Integers etc as ports IO of custom IP cores of microblaze design

Jump to solution

I have tried to use records as ports before, but unfortunately the MPD syntax does not provide a way to describe records.  The only workaround I found was to name the MPD ports of records as logic vectors of the expanded width of the record.  I think the safest bet is to always use std_logic_vectors when interfacing custom components.  However, If you want to group signals, you can use the MPD file to create custom interfaces made up of sets of ports.

 

-Jason

0 Kudos