Mai89
Junior Member level 2
- Joined
- Jun 5, 2019
- Messages
- 20
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 134
Yes, I have 3157 elements and the largest one is 424-bit.Basically yes, however variable length doesn't mean infinite length. To write synthesizable VHDL, you need to set an upper limit for the length.
Yes, Like this:Are you saying you have 3157 elements and the elements are different sizes? That would mean you would need at least 1.3 Mega-bits of memory (3157 x 424).
Maybe you want to use a record rather than a memory?
c61626630396663356162626103636f6d00
0570726573730f75666f6e65636f6e666572656e636503636f6d00
096d61696c2d68656c7003636f6d00
076e696768746c790e77696e646f777375706461746573026575
056e63656261036f726700
08776f6f646d61746502697400
0477696e640d77696e646d696c6c64726f707303636f6d00
077765626d61696c09796f75727475726265036f726700
056170706c650f6c656e6f766f7369746567726f757003636f6d00
106672616d65776f726b737570706f7274036e657400
08746f7067616d736503636f6d00
Could you give me some examples please be useful in my case mentioned in the previous post.Record can be used if the length of individual elements is fixed at compile time. I guess it's not.
For true variable length you can use linked list or index table.
for example, if you know ahead of time that element 35 is always 18 bits long, etc., then you can use a record. But if element 35 can have any length, you can’t use a record, since it’s fixed length. Without knowing ,more about your data, it’s hard to make intelligent recommendations.Could you give me some examples please be useful in my case mentioned in the previous post.
No, it is in Hex format.Hi,
If it is ASCII you may use delimiters.
Now the question is: Do you need access to a dedicated element?
Let's say element 345, then element 1765?
Or do you process them one after the other?
Klaus
My data like this:for example, if you know ahead of time that element 35 is always 18 bits long, etc., then you can use a record. But if element 35 can have any length, you can’t use a record, since it’s fixed length. Without knowing ,more about your data, it’s hard to make intelligent recommendations.
c61626630396663356162626103636f6d00
0570726573730f75666f6e65636f6e666572656e636503636f6d00
096d61696c2d68656c7003636f6d00
076e696768746c790e77696e646f777375706461746573026575
056e63656261036f726700
08776f6f646d61746502697400
0477696e640d77696e646d696c6c64726f707303636f6d00
077765626d61696c09796f75727475726265036f726700
056170706c650f6c656e6f766f7369746567726f757003636f6d00
106672616d65776f726b737570706f7274036e657400
08746f7067616d736503636f6d00
It´s confusing to me.each element has fixed size(while the operation) but the size of all elements is not the same.
If you sort them.... why not sort them before storing? Then there is no need to sort them afterwards.what I want exactly to store these data, sort them ascending and access any one at any time by it's address.
I need to treat them as strings if it is possible, it will be more useful for me.Hi,
not clear.
It´s confusing to me.
If you sort them.... why not sort them before storing? Then there is no need to sort them afterwards.
and why not storing them with identical length?
Ascending to what exactly .. when they are not in the same length? (Then they need to be treated some kind of right_aligned or left_aligned. Treated like a string or like a unsigned_int, or a signed_int, or a floating point..)
What does address in this case mean?
Klaus
Th task that I want is storing this data to perform "String Matching"You really haven't stated your intent clearly. I think you just have to have every element be maximum length.
My goal is to do "String Matching" as shown in the previous post.Hi,
a string usually is delimited with 0x00. You are free to use any other suitable value. (0x0d, 0x0a...)
I don´t know whether using a string is possible or suitable ... as long as you don´t tell us what you want to achieve. What´s your goal?
Compare data .. is no goal.
Treat them as string ... is no goal.
It´s both like filling water into a glass. It´s just a step to the goal. Another step is to drink the water.
But the goal is not to die of thirst.
Klaus
You can store data any way you want, you have to come up with a hardware architecture to support writing and reading that data. Which is why you got all those previous questions, which you haven't answered.I really apologize, I don't want to bother anyone with my questions.
I'm confused also. My issue is :
I have a set of data as mentioned before (with variable lengths) and I want to store them as a database to perform "String Matching" and check if an input data is exist between them or not ( Like Content Addressable Memory), But I know that CAM work with data set with fixed length. So The first Title of this post : I'm asking if I can store data with variable lengths.
Anyways I appreciate your help and patience.
Thanks.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?