Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

How to send a matrix to a lower entity

Altera_Forum
Honored Contributor II
1,249 Views

Hello,  

 

i've got a easy problem, how can you send a matrix from the main vhd of a project to a lower level entity inside the main?. 

 

The fact is that creating a filetype image to name the matrix my code can't read it in the entity. i've both included in the main and in the lower level vhd architecture the declaration of the new type "image", as follows: 

 

type image is array (1 to 110) of sfixed (1 downto -16); 

 

Error (10482): VHDL error at CNN.vhd(14): object "image" is used but not declared 

 

May I have to declare image as a package or something like this, for the compiler to read it correctly? 

 

Thank you!! 

 

PS: if I substitute image for "array (1 to 110) of sfixed (1 downto -16)", it says "array reserved keyword..."  

 

 

component cnn is 

port ( 

nreset : in std_logic; --reset global 

imagentmp: in image; 

flagimag : in std_logic  

); 

end component; 

 

0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
610 Views

I would suggest a package file. I forget off hand how to implement it, but a little searching around should yield results. You will need to declare your type in the package, and then use your package in the top level and your sub-levels.

0 Kudos
Altera_Forum
Honored Contributor II
610 Views

It worked! i managed to solve this issues by using a package  

 

Thank you!
0 Kudos
Reply