How to create a look up table for a RAM application

Dear Sir or Madame,

I have a data packet which has a 13 bit field for an USB application(7bit + 4bit + 1bit + 1bit).

Because of lack of memory I do create a RAM which has a data input width of only 10 bit. The write address of the RAM is [4..0], i.e. 32 words á 10 bit. The words which are written into the RAM are searched for later (CAM-like function).

The problem: I have to reduce 13 bit to 10 bit without losing the significance of the 13 bit. But it is not possible to leave out for example two bits of the 7bit (usb address) because the enumeration by the host is not predictable.

How could I solve this problem?

Thank you very much.

Best regards

Andres Vazquez G&D System Development

Reply to
Vazquez
Loading thread data ...

You can use a one way hash function to do the reduction. A CRC is a good example, one can think of others. It will probably not solve your space problem though.

Erez.

Reply to
Erez Birenzwig

Assuming the max number of endpoints is known, make another RAM

7 x (max number of endpoints). Use this ram to store the actual endpoint numbers and change the 7 bit endpoint field in the primary ram to a bit count in accordance with the max number of endpoints.

For example, if only 4 endpoints, then change the 7 bit field to a 2 bit field and, at enumeration, store the numbers in the smaller ram.

Hul

Vazquez wrote: : Dear Sir or Madame, : : I have a data packet which has a 13 bit field for an USB : application(7bit + 4bit + 1bit + 1bit). : : : Because of lack of memory I do create a RAM which : has a data input width of only 10 bit. The write address of : the RAM is [4..0], i.e. 32 words ? 10 bit. : The words which are written into the RAM : are searched for later (CAM-like function). : : The problem: I have to reduce 13 bit to 10 bit without losing the : significance of the 13 bit. But it is not possible to leave out for : example : two bits of the 7bit (usb address) because the enumeration by the host : is not : predictable. : : How could I solve this problem? : : Thank you very much. : : Best regards : : Andres Vazquez : G&D System Development

--
- for email, put the word "keep" in subject line -
Reply to
Hul Tytus

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.