Page 2 of 2

Re: how to use viper decorator?

Posted: Sat Sep 28, 2019 7:00 am
by Roberthh
As far as I recall nop() uses two clock cycles. That is the delay caused by it. At 160MHz, this is 12.5 ns.
b.t.w. Just in case assembler is a little bit inconvenient: Viper code usually only takes twice as long as assembler.

Re: how to use viper decorator?

Posted: Sat Sep 28, 2019 7:28 am
by starter111
thank you so much, is it C module faster than assembly maybe not much?

Re: how to use viper decorator?

Posted: Sat Sep 28, 2019 7:45 am
by pythoncoder
starter111 wrote:
Sat Sep 28, 2019 7:28 am
thank you so much, is it C module faster than assembly maybe not much?
Interesting question. I think carefully optimised assembler will beat C. But see this forum thread which shows that in a real application C can be four times faster than assembler. In this instance the assembler was written for ease of coding but rewriting it to match (let alone exceed) the C performance would take a great deal of work.

Re: how to use viper decorator?

Posted: Sat Sep 28, 2019 8:01 am
by starter111
https://store.micropython.org/product/PYBD-SF6-W4F2

pybaord D?
is this mean can add 2MiB RAM?
2MiB external QSPI flash with execute capabilities to extend internal flash

Re: how to use viper decorator?

Posted: Sat Sep 28, 2019 8:19 am
by Roberthh
PYBD_SF6 has 2 MByte internal flash. All PYBD models have additionally 2 MByte external flash for program code, and another 2 MByte flash for the file system. There is no external RAM. The SF6 does not use the external flash for code at the moment. The SF2/SF3 do.

Re: how to use viper decorator?

Posted: Sat Sep 28, 2019 8:27 am
by pythoncoder
It has 512KiB of RAM: in the context of most embedded programming 512KiB is a lot of RAM: you'd need to be writing a large (many thousands of lines) program, or using big data structures, to run out of RAM on this board.

If it is not currently possible to use the external flash for program storage this feature will surely come with a firmware upgrade, as this is the chip's only purpose (AFAIK).

Re: how to use viper decorator?

Posted: Sat Sep 28, 2019 8:03 pm
by starter111
Is for data, I'm trying run test pattern. If I can load all to the ram at one time and run, it more close to actual. Most of them are short can execute them all in one, but few of them are huge, I need copy few hundred MB pattern to flash and have to stop in the middle which I'm not sure going work, the device might timeout.....