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.

[SOLVED] for generate with step other than one

Status
Not open for further replies.

Mai89

Junior Member level 2
Joined
Jun 5, 2019
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
134
How can I use statement " For - Generate" in VHDL with step other than one ?
 

Just multiply the index, e.g. step size of 3 instead of 1

Code VHDL - [expand]
1
2
3
my_loop: for i in 0 to 7 generate
    my_assignment(3*i) <= my_signal(3*i);
end generate;

 
  • Like
Reactions: Mai89

    Mai89

    Points: 2
    Helpful Answer Positive Rating
The nested for-generate statement

How can I use statement " For - Generate" in VHDL with step other than one ?

The outer generate statement generates the rows. The inner generate statement generates the units in each of the rows as columns.

Code:
...
architecture generations of your_entity is
-- make component declaration(s) for structural here
-- make signal declaration(s) here
-- make other declaration(s) here

begin

    outer(row)_generate_label : for row_index in row_width_start to row_width_stop generate
    begin

         inner(column)_generate_label : for column_index in column_width_start to column_width_stop generate
               -- make possible declarations here
         begin

               -- code for unit here (behavioural or structural)

         end generate inner(column)_generate_label;

    end generate outer(row)_generate_label;

end architecture generations;
 
Last edited:
  • Like
Reactions: Mai89

    Mai89

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top