- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello guys,
I instantiate a bunch of the same module with a for generate statement. I dont know how to store the hcu_id of the module( I need it in an another part of the system); with ID I mean the variable i of the for generate. I would need something like a constant input equal to the i variable of the for generate. Any ideas?? ThanksLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
not quite sure I get the problem? it would be easy to pass in the loop value into a signal of the instatiation inside the generate, giving each instance access to it's ID number.
Why not post some code so we have a better idea of what you are trying to do.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok this is the top entity. I instantiate this module like this:
g_upd_req_conn : FOR i IN 0 TO MAX_H_TILES - 1 GENERATE u_upd_req_conn : ENTITY work.upd_req_conn(beh) PORT MAP( rst_n => rst_n, clk => clk, ID => ??? ); END GENERATE g_upd_req_conn; I need to give an ID to each module equal to the variable i, like a constant input. Any ideas?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Ok this is the top entity. I instantiate this module like this: g_upd_req_conn : FOR i IN 0 TO MAX_H_TILES - 1 GENERATE u_upd_req_conn : ENTITY work.upd_req_conn(beh) PORT MAP( rst_n => rst_n, clk => clk, ID => ??? ); END GENERATE g_upd_req_conn; I need to give an ID to each module equal to the variable i, like a constant input. Any ideas? --- Quote End --- if ID is integer:
g_upd_req_conn : FOR i IN 0 TO MAX_H_TILES - 1 GENERATE
u_upd_req_conn : ENTITY work.upd_req_conn(beh)
PORT MAP(
rst_n => rst_n,
clk => clk,
ID => i
);
END GENERATE g_upd_req_conn;

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page