Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

matrix(5x5) with vhdl

Status
Not open for further replies.

azadehasadi

Newbie level 4
Joined
Jun 18, 2015
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
41
hi i want define matrix 5x5 and (it must: std_logic_vector(7 downto 0))
plz help me. i need it for project in my university
 

So, you want to define a matrix of 5x5 elements with every element being 8 bits long ?
 

Try this:
Code:
subtype element is std_logic_vector(7 downto 0);
type memory_cube is array(integer range 0 to 4, integer range 0 to 4) of element;

It should compile - but I'm not sure whether it would synthesize...
 
hi i want define matrix 5x5 and (it must: std_logic_vector(7 downto 0))
plz help me. i need it for project in my university

Code:
type mat1 is array (0 to 4) of std_logic_vector(7 downto 0);
type mat is array (0 to 4) of mat1;
signal matrix_5x5  : mat;
Your 5x5 matrix is signal matrix_5x5 where each element is std_logic_vector(7 downto 0).
 

i use ISE for vhdl code,
Code:
type matrix5x5_8 is array(4 downto 0,4 downto 0) of std_logic_vector(7 downto 0);

thanks very much, i must use uart(its for serial input) to receive data, can u help me for it.
 

Why would you need a 3D array to design a UART ???
 

i use ISE for vhdl code,
Code:
type matrix5x5_8 is array(4 downto 0,4 downto 0) of std_logic_vector(7 downto 0);

thanks very much, i must use uart(its for serial input) to receive data, can u help me for it.

There are many exmaples of uart out there
Just search for "uart vhdl" in your favourite search engine.
 

my project is:
pc send elements of matrix 5x5 then fpga(VHDL code) must compute sum of element of this matrix(sum of 25 element)
 

tnx, do u know how can access to each element? for example i assign a signal to certain element?
 

Why not go and code something, and we will help with any problems.
Hint: if all you are doing is summing a 5x5 matrix, you probably dont want a 5x5 matrix in VHDL (because each element arrives serially, you can sum them in the time domain).
 

u mean i define a matrix 1D(liner)? with 25 element?
tnx, if i want sum of two matrix rival of element what do i do?
 

No, you dont need a matrix at all. You just have a single value that adds the new values to the previous sum as they arrive.
 

ok, i think i understand,
and if i receive element of two matrix,how can i stored and sum of element with each others?
 

send the data as a raster scan. I assume your input from pc through UART should be an image. So send the pixel data from top left to bottom right through UART port in a raster fashion i.e first pixel and then second pixel serially. Your receiver system on the fpga side should also be the same.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top