Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Tools
Old 7th April 2007, 02:38 PM   #1
Default help in vhdl for loop

please help me with the following coding...

for(j=0; j<10; j++)
{
for(i=0; i<5; i++)
{
A <= D;
A = A+4;
}
A = A + 10;
}


D value changes for every change in A.... it will be given externally..... D will be different for diffent A... how can i implement this in vhdl.... i am using xilinx 6.1 n modelsim to see d output.... also tel me how can i see the out put...

thanks a lot...
with regards...
abilash is offline  
Old 7th April 2007, 08:05 PM   #2
Default code

No one writes and give you the ready made code. Instead you write something and check out, refer here if you got doubts. if you dont know the coding better refer to some beginner books,,not here

I am giving hints.try a code yourself and post the MODELSIM outputs.

[label :] [iteration_scheme] loop
{ sequential_statement }
{ next [ label ] [ when condition ] ; }
{ exit [ label ] [ when condition ] ; }
end loop [label];

That is the syntax in loop equatios. try out now

And to view the output in modelsim is pretty simple. I didnt understand where have you got the doubt
__________________
Dont leave anything untill you get it
srimannarayanakarthik is offline  
Old 8th April 2007, 08:54 AM   #3
Default

for j in 1 to 16 loop -- length = 16

for i in 1 to 8 loop
a <= d;
a <= a+4;
end loop;
a <= a + 16;
end loop;

here a and d are 32 bits length.... this is the code i hav written..... how can i see the output..... plz help...
abilash is offline  
Reply

Tags
loop, vhdl

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
VHDL and VLSI bklim Electronic Projects Design/Ideas/Reviews 3 27th October 2009 11:00 AM
Vhdl shermaine General Electronics Chat 10 28th March 2007 05:09 PM
Global variables in VHDL s.balasubramanian General Electronics Chat 2 10th March 2007 06:07 PM
Help in VHDL cooding mus3na Electronic Projects Design/Ideas/Reviews 3 1st May 2004 10:11 AM
Schmitt Trigger in VHDL? Snowman Electronic Projects Design/Ideas/Reviews 9 26th November 2003 06:19 PM



All times are GMT. The time now is 05:19 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker