PDA

View Full Version : C lines To VHDL


08-13-2005, 05:53 AM
Hi, suppose I have these lines in C:
//=====================

int N = 5;
int sr0 [N] = {0};
int start = 0;
int end = 0;
int num_ones_each_col[5] ={0};
int Matrix[5] = {100, 300, 500, 10, 30};


for (j = 0 ; j < N ; j++)
{
end += num_ones_each_col[j];
start = end - Matrix[j];
Store_the_Start_Mul_End(sr0,start,end,j); //this function store teh
result of start*end in sr0;
}
//=====================


How can I program them in VHDL ?
Thnaks

Hubble
08-13-2005, 06:07 PM
> How can I program them in VHDL ?

Just learn VHDL. The translation is rather straight forward.

Hubble.

08-14-2005, 05:29 AM
Hi, Hubble I have started with VHDL for a month, but I have problem
with the sequence above? so how can I do it? thanks.

08-15-2005, 08:00 AM
[email protected] schrieb:

> Hi, Hubble I have started with VHDL for a month, but I have problem
> with the sequence above? so how can I do it? thanks.

You could post the part of your VHDL code you have already written.

Rgds
André