generate statement

C

crazyrdx

I need to represent the following in a generate statement

p(1) = y(0) * c(1)
p(3) = y(1) * c(3)
p(5) = y(2) * c(5)
p(i) = y(i-n) * c(i)
and so on...

I basically need to use two indices. How can I do this?

Thanks
 
R

Ralf Hildebrandt

crazyrdx said:
I need to represent the following in a generate statement

p(1) = y(0) * c(1)
p(3) = y(1) * c(3)
p(5) = y(2) * c(5)
p(i) = y(i-n) * c(i)
and so on...

I basically need to use two indices. How can I do this?

What about two for-generate outside (and nested) for the indices and
finally an if generate?

Ralf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top