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.

VHDL for: generate vs loop

Status
Not open for further replies.

robmar

Newbie level 3
Joined
Apr 2, 2016
Messages
4
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
29
Hello, I'm a beginner at VHDL. I couldn't find an answer to this online:
What is the difference between using the for generate and for loop when performing signal assignments?

EX:
Code:
for i in 0 to 7 generate
   a(i) <= b(i);
end generate;

for i in 0 to 7 loop
   a(i) <= b(i);
end loop;

Thank you!
 

The loop statement has to be used in a process. If it's a combinatorial process and the assignment is executed unconditionally it works like the generate statement, just copying the signal. If it's used under an edge sensitive condition like if rising_edge(clk), the assignment generates registers.
 

Thank you for your prompt response.
The generated registers you mentioned in case of an edge condition are generated automatically by the synthesizer, correct?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top