Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - What is the best way to generate 6 set 3-bit address

 
Thread Tools Search this Thread
Old 06-16-2008, 09:54 PM   #1
Default What is the best way to generate 6 set 3-bit address


Hi,
I know that an FSM can do the work, but I would like to know whether
it is the best way. The problem is to generate 6 addresses, each is a
3-bit set : 000, 001, 010, 100, 101, 110. Thanks a lot.


fl
  Reply With Quote
Old 06-16-2008, 10:12 PM   #2
Mike Treseler
 
Posts: n/a
Default Re: What is the best way to generate 6 set 3-bit address
fl wrote:

> I know that an FSM can do the work, but I would like to know whether
> it is the best way. The problem is to generate 6 addresses, each is a
> 3-bit set : 000, 001, 010, 100, 101, 110. Thanks a lot.


I would declare and use a constant vector array.





Mike Treseler
  Reply With Quote
Old 06-17-2008, 03:18 PM   #3
Andy
 
Posts: n/a
Default Re: What is the best way to generate 6 set 3-bit address
On Jun 16, 4:12 pm, Mike Treseler <mike_trese...@comcast.net> wrote:
> fl wrote:
> > I know that an FSM can do the work, but I would like to know whether
> > it is the best way. The problem is to generate 6 addresses, each is a
> > 3-bit set : 000, 001, 010, 100, 101, 110. Thanks a lot.

>
> I would declare and use a constant vector array.


It depends on what is important about how the addresses are generated.
Are they necessarily in increments of one, skipping every 4th one, or
is that just a coincidence? For something simple (few resources, and
shouldn't take much time), think about coding it such that the
requirements are most clear. If they are supposed to increment, code
an adder with some skip logic. If they are (or could be) arbitrary,
Mike's suggestion of a constant lookup table is excellent. A good
synthesis tool would probably implement the same circuit with either
description for something this small. If not, a constant lookup table
can be initialized via a function that illustrates the algorithm. That
way, you get the illustrative benefits of an algorithm, with the
resource/performance benefits of a look-up table. Another advantage of
an algorithm is that it can usually be expanded easily if more
addresses are needed in the same pattern.

Also, depending on your application, it is sometimes easier to mask
off unused addresses such that nothing happens when they are accessed
(i.e. AND the data being stored with a constant mask that is set to
zeroes for the unused addresses, and apply the same mask when reading
the registers), rather than going to the trouble to avoid them. If
properly done, the masking will result in the resources for those
unused addresses being optimized away.

Andy


Andy
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
I have become rich in 30 days lemony-snicket A+ Certification 2 09-07-2009 03:01 PM
This is incredible! jc_ice DVD Video 1 08-13-2006 10:47 AM
Address Bus and External Data Bus Confusion LoXodonte A+ Certification 1 04-18-2006 10:09 PM
Nearest netflix shipping facility address is wrong ics83 DVD Video 13 12-07-2005 03:15 AM
21st Century E-Commerce Money Making Formula NeoOne DVD Video 0 01-04-2005 03:25 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46