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 syntax for a loop

Status
Not open for further replies.

Binome

Full Member level 3
Joined
Nov 16, 2009
Messages
152
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Location
Lyon, France
Activity points
2,405
Hi,
I've noticed the "for...generate" statement need a "begin" but my designs work without it.
What is the difference?
Thanks.
 

adding the begin allows you to declare signals local to that loop iteration:

Code:
some_gen : for i in 0 to N generate
  signal internal : std_logic;
begin

  internal <= ip(i) and enable;

  inst : my_entity
  port map (
    enable => internal
  );
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top