- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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.
コピーされたリンク
2 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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