I've lost the stack

A catchall for PSoC3 discussions not captured by the other forums.

Moderator: ericb

I've lost the stack

Postby psocExperimenter » Sat Mar 16, 2013 1:41 am

Does anyone know where the stack is in PSOC3?
Where are the settings for this?
all I found is ( from Keilstart.a51:
But where this small stack is?
?STACK SEGMENT IDATA
RSEG ?STACK
AND:
XBPSTACK EQU 1
XBPSTACKTOP EQU CYDEV_SRAM_SIZE - 3 ;Keep in mind additional variables declared above
if the stack is in xdata then it's not so small, as everybody complains ( at least 1kB)
Regards
PSOC
psocExperimenter
Cheese Wheel
Cheese Wheel
 
Posts: 109
Joined: Wed Oct 19, 2011 12:35 am

Re: I've lost the stack

Postby psocExperimenter » Sat Mar 16, 2013 1:59 am

In order to make anyone familiar with my problem:
My code is fairly complex with plenty of 4byte math.
However xdata stack used only 3bytes, and idata stack uses only 34 bytes.
it seems impossible, cause I frequently use 10 local variables of size 2 bytes
in many different functions.
Regards
donald
psocExperimenter
Cheese Wheel
Cheese Wheel
 
Posts: 109
Joined: Wed Oct 19, 2011 12:35 am

Re: I've lost the stack

Postby bobmarlowe » Sat Mar 16, 2013 3:30 am

Have a look at the Technical Reference Manual and look at "Internal Ram".
The 8051 is a rather old design (1975?) and that is reflected in the VERY small stack of 256 bytes shared(!!!) with some bit-addressable memory.
Since the stack is internal to the CPU (and so small) NO variables will be allocated on the stack, it is solely used to push/pop return addresses.
The complicated part is done by the compiler to allocate room for variables/parameters and so on. When all fails (as for reentrant functions) the compiler will manage a heap to have room for local variables.

Want something better than a 8051? Use a PSoC5 with an ARM Cortex3 Core. Its Downgrades? Well, you'll probably NEVER will use ARM assembly coding, it can be VERY complicated.
Want something cheaper than a PSoC5 but better than a PSoC3? Just wait a few weeks/days for the chip between...


Happy designing
Bob
User avatar
bobmarlowe
The Big Cheese
The Big Cheese
 
Posts: 1490
Joined: Thu Oct 06, 2011 2:03 am
Location: Germany

Re: I've lost the stack

Postby danadak » Sat Mar 16, 2013 4:49 am

Intel 8051 - http://en.wikipedia.org/wiki/Intel_MCS-51

PSOC 4.......

Regards, Dana.
Field Application Engineer
KB1RHB Mostly listen :)
Semi Retired
User avatar
danadak
The Big Cheese
The Big Cheese
 
Posts: 2008
Joined: Thu Dec 27, 2007 8:42 am
Location: New Hampshire

Re: I've lost the stack

Postby psocExperimenter » Sun May 05, 2013 10:34 pm

PSOC4 seems to go back in ages before PSOC3:
- much smaller Flash
- almost no hardware UDB's.
- much smaller ram.
I'm sure You disagree with Flash ( both have 32KB) but PSOC3 32KB in at least twice more eficient.
The same is with RAM. CORTEX M? needs much more RAM/FLASH.
I'm sure Cypress must shut dowm PSOC3 manufacturing to help PSOC4 to grow.
Regards
Robert
psocExperimenter
Cheese Wheel
Cheese Wheel
 
Posts: 109
Joined: Wed Oct 19, 2011 12:35 am

Re: I've lost the stack

Postby danadak » Mon May 06, 2013 3:44 am

Some thoughts on PSOC 4 -

1) PSOC 4 seems to be positioned, purposely, on the low end. Not a PSOC 3 replacement per se.
2) Flash on the roadmaps extends to 128K, SRAM to 16K.
3) UDBs = Die Area = Cost, so being low end 4 UDBs in 4200 seems about right.
Coupled with 4 channel TCPWM facility, that effectively in many designs adds a lot
more UDBs.
4)Core much better than PSOC 1, ~ 43 MIPs.
5) Single cycle 32 bit multiplier.
6) Cortex, with thumb, needs less RAM/FLASH for same application as PSOC 1/3.
7) $ 1- $ 2 for PSOC 4, $ 4 - $ 20 for PSOC 3.

RoadMap1.jpg

RoadMap2.jpg


So in short lower cost, better technology.

Regards, Dana.
Field Application Engineer
KB1RHB Mostly listen :)
Semi Retired
User avatar
danadak
The Big Cheese
The Big Cheese
 
Posts: 2008
Joined: Thu Dec 27, 2007 8:42 am
Location: New Hampshire

Re: I've lost the stack

Postby psocExperimenter » Wed Jul 31, 2013 1:47 am

6) Cortex, with thumb, needs less RAM/FLASH for same application as PSOC 1/3.

You went too far danadak. It a huge exaggeration
psocExperimenter
Cheese Wheel
Cheese Wheel
 
Posts: 109
Joined: Wed Oct 19, 2011 12:35 am

Re: I've lost the stack

Postby psocExperimenter » Wed Jul 31, 2013 1:49 am

3) UDBs = Die Area = Cost, so being low end 4 UDBs in 4200 seems about right.

UDB size It's not even half of PSOC1.
But price is.
psocExperimenter
Cheese Wheel
Cheese Wheel
 
Posts: 109
Joined: Wed Oct 19, 2011 12:35 am

Re: I've lost the stack

Postby psocExperimenter » Wed Jul 31, 2013 1:53 am

Code: Select all
4)Core much better than PSOC 1, ~ 43 MIPs.

Depends what You have in mind.
I'm very much interested in latency. And PSOC1 high latency areas can be replaced with UDB, which is almost missing in PSOC4
This make PSOC1 competing with PSOC4 easily.
psocExperimenter
Cheese Wheel
Cheese Wheel
 
Posts: 109
Joined: Wed Oct 19, 2011 12:35 am

Re: I've lost the stack

Postby bobsanjose » Sat Oct 12, 2013 8:22 pm

Joining the party very late here, so fwiw
PSoC 1 has a CPU that is so out of date it hurts, the CPU of PSoC 4 is light years better.
Code for PSoC 1 is smaller if you handle bits and bytes. As soon as your data outgrows 8-bit variables, you will find that PSoC 4 has more compact code for those algorithms. Porting code written for PSoC 1 to a PSoC 4 will usually let the code explode. That is also true the other way round. If you wrote code for a 32-bit CPU and run it without changes on an 8-bit CPU, that would be either PSoC 1 or PSoC 3, the code would usually increase in size.
It is a fact though that the vast majority of 32-bit programs will use more RAM than the somewhat equivalent 8-bit program.

PSoC 4 is not supposed to compete with PSoC 3 but mostly with PSoC 1. The programmable blocks are different and the statement that PSoC 1 offers more UDBs is incorrect because it has none. It has programmable logic that is different to the UDBs. There is something where I would concur that PSoC 1 outperforms PSoC 4, that is in programmable analog.

In a nutshell, PSoC 4 offers way more horsepower and it would take all programmable blocks of PSoC 1 to build a system similar to PSoC 4, still lagging performance. PSoC 4 has more build-in functions.

To be totally honest, PSoC 4 has a niche, so has PSoC 1 and they overlap to some degree.
Personally I like real microcontrollers much more, but that maybe just me on this forum.
bobsanjose
Newbie
Newbie
 
Posts: 7
Joined: Fri Aug 06, 2010 7:57 pm

Re: I've lost the stack

Postby danadak » Sun Oct 13, 2013 6:00 am

"UDB size It's not even half of PSOC1.
But price is."

Over the industry semiconductor costs are largely composed of -

Materials + Processing + Test + Package + Marketing.

In general EOL costs are dominated by the first 4. BOL costs are dominated by the
last cost, except for jellybean components, like logic, discrete.....

Regards, Dana.
Field Application Engineer
KB1RHB Mostly listen :)
Semi Retired
User avatar
danadak
The Big Cheese
The Big Cheese
 
Posts: 2008
Joined: Thu Dec 27, 2007 8:42 am
Location: New Hampshire

Re: I've lost the stack

Postby psocExperimenter » Wed Dec 04, 2013 11:04 pm

I more thing was not mentioned: POSC4 is new product, and as every product from any Manufacturer is full of problems.
If You look on 100 projects in element14 all of them are very simple, don't use all resources.
I made test myself.
One chip doesn't want to be programmed, although is identified by the programmer.
Another one gets programmed but one of timers don't start. And plenty of misleading info in rpt file.(ie pld used -1)
I'm in contact with tech support, but they are not smarter than me.
bob
psocExperimenter
Cheese Wheel
Cheese Wheel
 
Posts: 109
Joined: Wed Oct 19, 2011 12:35 am

Re: I've lost the stack

Postby orob » Thu Dec 05, 2013 7:03 pm

There are not many projects that use every single resource. Sounds like you need to design your own chip and start selling it.
orob
The Big Cheese
The Big Cheese
 
Posts: 606
Joined: Wed Sep 26, 2007 9:06 am
Location: US


Return to “%s” PSoC3 General

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron