cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
3,573 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,354 Views
Registered: ‎01-04-2008

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

View solution in original post

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

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

View solution in original post

0 Kudos