Re: Newbie strugling with a lookup (look-up) table in VHDL (or AHDL)
- From: Shannon <lglcc-electronics.removethis@xxxxxxxxx>
- Date: Fri, 30 Jun 2006 06:40:08 -0700
Thanks everyone. I knew I'd get some great answers!
I think there would be too many (hundreds) of case statements to use
that method however.
I guess I'll have to keep digging. There must be a way to write some
logic to find the nearest value. Something like:
Find index where index<count and next index>count then take the value
at table(next index).
or the HDL equivalent of:
temp=count
while notFound
index==temp++
end while
result=table(temp)
On Tue, 27 Jun 2006 16:09:52 -0700, Shannon
<lglcc-electronics.removethis@xxxxxxxxx> wrote:
hello all. Big time newbie here..
Hardware: Cyclone
Software: Quartus II
Problem: I have to implement a lookup table of sorts and I have no
idea what I'm doing.
A counter is counting the duration of an external event. When the
event ends I need to take the final count and retreive a value from a
lookup table and assign it to another variable.
A) I assume I will use the 'table' construct. but what if the table
is huge?
B) It's a 24bit counter so the possilbe values are quite large. The
table will contain the same value for large ranges of counts. I.E. if
count is anywhere between 10 and 100 the lookup value is the same. Is
there a way to minimize the table so that I only have to list index
ranges? In other words it would be nice if the index isn't found, to
take the 'nearest' index.
C) Is there some entirely different way to code the lookup table?
Thanks in advance for any help you can give,
Shannon
- Follow-Ups:
- Re: Newbie strugling with a lookup (look-up) table in VHDL (or AHDL)
- From: Mike Treseler
- Re: Newbie strugling with a lookup (look-up) table in VHDL (or AHDL)
- References:
- Prev by Date: Re: VHDL jpeg image processing
- Next by Date: Re: Stupid Newby Question: VHDL/CPLD Shift Register Reset Problem
- Previous by thread: Re: Newbie strugling with a lookup (look-up) table in VHDL (or AHDL)
- Next by thread: Re: Newbie strugling with a lookup (look-up) table in VHDL (or AHDL)
- Index(es):
Relevant Pages
|