- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum.
Principally a Verilog solution would work, but a 16 input logic would require a switch statement with 65000 cases which with 16 outputs would result in a 130 kB memory requirement. This will even not fit into a C-language programmed LUT in a PSoC.
What is exactly your problem, what do you want to perform, what frequency is required?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much Bob.
I have binary words generated by Pseudo random sequence (PRS) generator. I'd like to create table where each PRS word will be equivalent to decimal numbers. And then to search decimal number by PRS binary word or vice versa by decimal number to search PRS binary word. PRS words will come by SPI and decimal number(of course in binary ) will return by SPI.
For example: 12-bit PRS table, in total 4095 binary word. First PRS binary word 000000000001 = 1, ..., 101000100000 = 123,... etc.
I have thought that if to create table PRS word = decimal number (of course, decimal means binary) and will write verilog code. it must work faster at UDB than and Cortex-M3 CPU.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot access memory through UDB, neither sram nor flash.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, i'm just started to deal with UDB. I didn't think about sram or flash. I thought to create some array or range with PRS binary words in Verilog, up to 15 bit. I thought that once it created with Verilog it must be inside UDB. Then need to write function that get PRS word received by SPI and return array index of this PRS word. Or to create lookup table 15 x 15.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
"to create some array " This array will need a place to store it, ram or rom. Not possible for a UDB.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok. Could you advice the fastest way for PSoC 5LP, where need to place array of constants (32768 constants) that then get array index of constant? Array of constants must be created once while compiling.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use
const uint16 YourArray[] = { your 32k values go here, comma separated};
hoping the compiler doesn't get a hiccup 😉
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Bob, i know how to create array. My question about where to place array? Or it is mean that i can't control where it will be placed, can't to point for compiler where to place array? For example, how to place in RAM?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot place your array in ram. Max sram for PSoC5 is 64k.
Better use a raspberry pi. PSoCs are really good for embedded applications as controllers etc, not for larger data.
For placing data at defined addresses consult the GCC manuals.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks. And last question. 🙂 For example I take 14-bit array and will place it in 32 KB SRAM in SRAM region ( Data Address Map)
What do you think, how many time need to search array index by 14bit word. I understand that it will be simple sorting, one by one. Or how to count it? How many MCU cycle need to search in SRAM?