Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

IP address encoding for Memory

Status
Not open for further replies.

QMA

Member level 4
Joined
Apr 5, 2007
Messages
72
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,832
Dear All
Is there any way to encode IP addresses?
a 32 bit IP address yeilds 4G data to be stored in memory. I want to compress/encode the 32 bits to some optimum number of bits (for storing in memory).
 

why do you need a 4G address space? What data are you storing? Couldnt you build some sort of CAM?
 

of course. i am trying to use RAM as CAM
 

In that case - you need to store the IP address and data as a single memory entry.
Search through ram for specific IP address (32 bits) then act on data if IP address found.

So your memory Dword size needs to be 32bits + dword length.
 

then it would be greater than 4G

- - - Updated - - -

is there any way to interpret 32 bit IP address to smaller number of bits.

- - - Updated - - -

like 8 bits
 

then it would be greater than 4G

- - - Updated - - -

is there any way to interpret 32 bit IP address to smaller number of bits.

- - - Updated - - -

like 8 bits

Yeah, by using a CAM like has been previously mentioned. I get the impression you actually don't know what a CAM is.

CAM: Content Addressable Memory.
You give a CAM the stored content (32-bit IP address) and the CAM outputs the address location of that data. It's an associative array.

So if you want to have 256 (8-bits) 32-bit IP addresses then you would have a 256x32 memory if you want to store other information besides the IP address and return that instead of an address, then you would have a 256x(32+word_width_in_bits) memory array.
 
  • Like
Reactions: QMA

    QMA

    Points: 2
    Helpful Answer Positive Rating
Actually I used memory of 16x16 for the CAM as RAM(8 bit input date) using Xilinx Vertix-6. it returned the address by matching a given input. i want to extend it. i want to apply the concept for 32 bit input IP address for my project. so if i want to design a memory it will be 4G which is too huge. I want to know a method to compress 32 bits to a smaller number of bits. like for a given 32 bit IP address i get a 10 bit word. then the memory will be designed on the base of that 10 bit encoded IP address.
check the attached paper. if instead of giving 8 bit input word for searching I give 32 bit input IP address then i will have to map it in 232 memory. it can be a 216 X 216 combination or anyother. But it would be too large. That is why i need your help to guide me for a method that instead of designing a memory based on 32 bits i design a memory on smaller number of bits.
 

Attachments

  • Circuit to generate a sequential Index for an input number in a pre-defined list of numbers.pdf
    209.6 KB · Views: 36

This clearly shows you don't know what a cam is. It is content adressable memory. Ie. You provide the lookup data (ip adress) and it provides the rest of the data. The cam can have any number of locations you want (2, 128, 16k) and you use the whole 32 bit ip address.

There is no way to compress an ip adress to less bits unless you know ip adress bits you can ignore.
 

I want to know a method to compress 32 bits to a smaller number of bits. like for a given 32 bit IP address i get a 10 bit word. then the memory will be designed on the base of that 10 bit encoded IP address. check the attached paper.
The keyword in the patent title is pre-defined list of numbers.

If you have a known exclusive set out of all possible 32-bit numbers, you are able to compress the information. If the set isn't predefined, you need access to the full 32-bit number to know if a new number is different or identical to a previous used one. Apply common sense.

Creating a compressed hash can help you in some situations nevertheless, but you need to store the full number and to consider that several IP numbers can have the same hash.
 
  • Like
Reactions: QMA

    QMA

    Points: 2
    Helpful Answer Positive Rating
What is the requirements? How many clock cycles can it take to find the IP address in the "emulated CAM"?
How many entries do you need?
 

i was missing the point 'Pre Defined'. thank you

- - - Updated - - -

i am trying to use CAM as RAM. not the CAM exactly.
 

Using a CAM as ram would be an odd thing to do - though you can emulate a CAM with a RAM and some extra control logic.
You havent specified the things std_match asked for.
 

Using a CAM as ram would be an odd thing to do - though you can emulate a CAM with a RAM and some extra control logic.
You havent specified the things std_match asked for.

sorry it is RAM as CAM.........
 

You would only need a 4G RAM if you expected to store an entry for every IP address. But as you said this is too much.
You just need to work out how many entries you need at any one time.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top