- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is probably very simple, but what does "f_gp_timer(f_gp_timer'high - 4)" in f_led_n <= (others => f_gp_timer(f_gp_timer'high - 4)) ; actually do, please? Could someone explain this to me please? Thank you.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
f_gp_timer'high means the highest bit number in a vector, eg., for signal "f_gp_timer : std_logic_vector(31 downto 0);" f_gp_timer'high is 31, so f_gp_timer(f_gp_timer'high - 4) just means the 4th bit from the MSB or in the case of the 32-bit vector example I just gave, bit 31-4=27. So the code is setting all bits in f_led_n to the state of the f_gp_timer MSB-4 bit.
Cheers, Dave- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much, Dave!!!!

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