Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
0
vhdl problem
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-28-2012 10:55 AM
Hi all
I am writing a vhdl code, I need to run a counter, I have seen a code segment that increments a 3 bit counter like this
counter <= ext(ext(counter,32) + 1,abs(2-0)+1)
can we write it
counter<= counter+'1' ??
why the ( ext and abs) are used??
thanks
0
Re: vhdl problem
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-28-2012 03:01 PM
You didn't post the declaration of "counter," but I'm guessing it was a std_logic_vector(2 downto 0).
Please see this post about counters in VHDL.
-- Gabor
-- Gabor
0
Re: vhdl problem
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-30-2012 10:59 AM
yah i think its right
Research Fellow
University of Calcutta, India
Research Fellow
University of Calcutta, India











