[SOLVED] How to change the generic parameters at run time

Status
Not open for further replies.

verylsi

Full Member level 2
Joined
Mar 12, 2012
Messages
123
Helped
16
Reputation
32
Reaction score
16
Trophy points
1,308
Visit site
Activity points
2,130
Hello All,

I want to change the generic parameters i.e. width of address and data at the run time.
just for explaining purpose I am posting few lines -

if master_select = '1' and slave_select = '1' then
MAX_ADDR_WIDTH <= 7;
MAX_DATA_WIDTH <= 28;
else
MAX_ADDR_WIDTH <= 10;
MAX_DATA_WIDTH <= 32;
end if;

MAX_ADDR_WIDTH and MAX_DATA_WIDTH are the generics , I know I cannot do like this..
Does anyone have any solution to this problem.

Thanx in advance ..
 
Last edited:

Your question suggests ignorance of elementary logic hardware principles. Changing generics at runtime is like converting your compact car into a van and vice versa by pushing a button.

The solution is however simple, provide the necessary hardware for the maximum required address and data width and utilize it according to the current need.
 
Reactions: verylsi

    verylsi

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…