vhdl syntax problem

Status
Not open for further replies.

rourabpaul

Member level 3
Joined
Aug 14, 2010
Messages
67
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
kolkata
Activity points
1,747
i have a signal 'S' of n bits in vhdl , and n is any positive value defined in a generic,
say in that case n=8,
i write
if n="11111111" then
(some data)
end if;

but when i change the generic value then i have to manipulate the if condition also,i dnt want to do it, i only want to change the value of n,
what will be my syntax in the 'if' condition
 

if u change the n ..its value automatically change...or u can define n and its value in generic...or chk in if statement n is true or false
 

if S = (S'range => '1') then

I'm assuming the example used S, as n = "11111111" isn't valid if n is an integer.
 
Reactions: FvM

    FvM

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

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…