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

Reply

VHDL - Generic Comparator using VHDL

 
Thread Tools Search this Thread
Old 11-06-2009, 05:39 AM   #1
Wink Generic Comparator using VHDL


Hi all,

I ve designed a generic VHDL comparator in two ways. Total number of Inputs are N, which is always be 2^n (n=2,3,4..).

1.Comparing the first and second input and the result is compared with the third input,this result is compared with the four input and so on. So for 8 inputs, 7 levels of comparison was used.

This method increased the delay of my design, so I redesigned the code as explained below.

2. At the first level, compare the inputs1 and 2, 3 and 4, 5 and 6. At the next level, result of 1&2, 3&4 are compared and so on. This decreased the number of logic levels to 3 and gives me better performance.

One Problem with the second method is, I ve declared two dimensional array of size (N,Logic levels) to store the result of each comparision.First level outputs are stored at location (0 to N,1). Note at next levels outputs are stored are locations (0 to N/2,2).Similary next level outputs are stored at locations (0 to N/4,3).

See at each level, my number of results stored are reducing, But VHDL doesn't allow an array to be created like this. So I declared an array of size N for all logic levels. This gives me warning for the unaltered array location ,ex, (N/2 to N) at logic level 2. I want warning-free synthesis. Can you help me?

Note: If the questions seems to be weird, please let know. I can elobrate more!!


sridar
sridar is offline   Reply With Quote
Old 11-07-2009, 12:26 AM   #2
joris
Member
 
Join Date: Jan 2009
Posts: 31
Default
You might use recursion for this; that way, you can define the one dimensional array needed for that invocation - either a recursive function, or recursion on entity level - both should work equally well;

If everything is right, that should render what you want


joris
joris is offline   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
USB ports reporting all installs as Generic USB Hubs jmcgovern Computer Support 3 03-05-2007 12:30 AM
DVD super multi drive cd write problem.. ashjas Computer Support 0 07-16-2006 06:14 AM
Serial to usb generic driver? =?Utf-8?B?aWFuc2lja282NjY=?= Windows 64bit 3 03-07-2006 05:21 PM
Re: Generic Host Process Error Message on Startup Wizard Computer Information 0 03-14-2005 09:08 AM
generic ink epson C82? Jethro Bodine Computer Information 0 11-22-2003 03:59 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