propeller
sanket
Posts: 28
Hello every one.
I am sanket shah and i am doing project on propeller.
I have some confusion regarding the operation of propeller.
1) who places the address on the address bus and who uses that data?
2) Is the destination address is always a cog-RAM or it can be HUB-RAM also?
3) What data are in HUB-ROM and HUB-RAM?
4) Do the HUB assign every new instruction to the other COG next to the COG assigned the previous instruction?
For ex. in machine language
I1 : ADD R1, R2
I2 : SUB R3, R1
In the program above, does I1 assigned to COG-1 and I2 assigned to cog-2?
If so then in such a case of data dependency, how can R1 be fetched from cog-1 into cog-2?
Does each cog in the propeller do communication with each other?
5) what if two cog wanna share the common port?
6)what are the use of I/O direction and I/O registers?
I have a request while any one sending me the answer. If possible, please send me the answer by the sequence number as i have asked them.
Thank You
Regards
Sanket Shah
I am sanket shah and i am doing project on propeller.
I have some confusion regarding the operation of propeller.
1) who places the address on the address bus and who uses that data?
2) Is the destination address is always a cog-RAM or it can be HUB-RAM also?
3) What data are in HUB-ROM and HUB-RAM?
4) Do the HUB assign every new instruction to the other COG next to the COG assigned the previous instruction?
For ex. in machine language
I1 : ADD R1, R2
I2 : SUB R3, R1
In the program above, does I1 assigned to COG-1 and I2 assigned to cog-2?
If so then in such a case of data dependency, how can R1 be fetched from cog-1 into cog-2?
Does each cog in the propeller do communication with each other?
5) what if two cog wanna share the common port?
6)what are the use of I/O direction and I/O registers?
I have a request while any one sending me the answer. If possible, please send me the answer by the sequence number as i have asked them.
Thank You
Regards
Sanket Shah
Comments
A cog can communicate with another cog by using the hub. The hub is shared memory. There are special instructions to read and write hub memory.
2) Both the source and destination addresses of the Propeller's instructions refer to the cog's memory. The HUB memory is treated somewhat like an I/O device in that it uses special instructions for access to it and it's a completely different address space (and memory system) from the cog's memory.
3) The Propeller Manual and the Propeller Datasheet describe what's in HUB-ROM. Basically, it's some trig function tables, a display font used by some I/O routines, the boot loader, and the Spin interpreter.
4) Cogs do not communicate directly with each other. They all share the I/O pins and they share the HUB memory. There is an instruction that copies 496 long (32-bit) words from a specified HUB memory location to a specific or assigned cog's memory and starts that cog after the copy is complete. At that point, any sharing is under complete control of the program that's just been loaded into the cog.
5) Each cog has an I/O direction register and an I/O data register. There is logic connecting the cogs and the I/O pins that combines the 8 direction registers and 8 data registers to control the 32 I/O pins. The Propeller Manual and the Propeller Datasheet shows how that works, but essentially they're all logically or'd together.
6) See the description in the Propeller Manual
2. The destination address is always a cog "register". (Even for HUB load/store instructions. The source register / immediate value contains the HUB address.)
3. HUB RAM is user defined. See the manuals for HUB ROM contents.
4. No. Each cog executes a separate instruction stream in parallel.
5. & 6. Each cog has a DIRection register where each bit maps to a pin. If any cog sets a pin as an output, then the pin is an output. Each cog has an OUTput register where each bit maps to a pin. If any cog sets a pin as an output and sets it high, then it is set high.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: Forum
NTSC & PAL driver templates: ObEx Forum
OnePinTVText driver: ObEx Forum
Thank You for your immediate reply (really appreciated)
Regarding the answer you gave me for Q-4, If both the instruction go in cog-1 then when does the remaining cogs employed?
And can u please elaborate that how each cog communicate with each other indirectly?
Again thank you for your positive response.
Regards
Sanket Shah
Thank you for your response.
1) As shown in figure of propeller block diagram, all cogs put 16-bit address on address bus and probably Hub uses that address specially in load/store instruction. Am i right? what are these 16-bit address bus used for? How this 16-bit address bus play role?
for ex. I1: WRByte D,S
where does this byte written ? in hub memory or in cog memory?
2)If cog do not communicate with each other directly? then how do we provide instructions to individual cogs?
for ex. we have sequence of instructions when we fetch the first instruction it means we put the 32 bit instruction stored in HUB memory on 32-bit data bus. so which cog will take this instruction?
I1 : add R1, R2
I2 : sub R3, R1
I3 : load R4, r3
I4 : shr R1, #1
I5 : ror R3, #2
Does all the instruction executed by cog0?
if no, then what happened in the case of data dependency?
if yes, then when the other cogs are employed for the program to execute?
Thank You
Regards
Sanket Shah
Thank you for your response.
I have still doubt. can u please help me with it?
1) According to your first two answers, do u mean that HUB memory's data never changed once it downloaded from the boot loader?
Cause u said that even it load/store instruction, destination address is always cog. can u tell me where exactly the instructions set are stored? In hub-memory or in cog memory? if it is in hub memory they how can't the hub RAM data changed even by the write instruction?
2)what do u mean by each cog executes a separate instruction stream? can u please give me an example?
Thank You
Regards
Sanket Shah
2. Each cog executes the instruction stream stored in the first 496 cog registers. (These same registers may be used for code or data and self modifying code is possible and often required.) The cog registers are loaded from HUB RAM via the COGNEW/COGINIT instructions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Composite NTSC sprite driver: Forum
NTSC & PAL driver templates: ObEx Forum
OnePinTVText driver: ObEx Forum
Mr. ericball,
The answer to posted me recently cleared my doubt.
I have one more Question, i hope u are not tired of me yet.
Does the hub memory only affected during load and store operation? is there any instruction that uses the hub- memory?
Regards
Sanket shah
I appreciated with your previous answer.
are there any more instruction who access or use cog memory.
Because, i think all the instruction who takes 7-22 cycles access the hub memory, right?
But i did not understand that how CLKSEL, COGID, COGINIT etc. take 7-22 cycles?
how does these instruction takes 7-22 cycles? cause according to the instruction given in prop data sheet, it doee not seem that they access HUB RAM or ROM. and if they are not accesing HUB ROM or RAM then why they take 7-22 cycles?
Thank You
Regards
Sanket Shah
If you look at the instruction set, any instruction you see marked as 7-22 cycles uses the hub round-robbin access control mechanism, but only the RDxxx/WRxxx instruction read/write the hub memory.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheus & Mem+dual Prop SBC w/ 512KB kit $119.95, 2MB memory IO board kit $89.95, both kits $189.95
www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
The system clock generation hardware for example is a shared resource so any attempt to change the system clock by a cog will only be done by the hub during that cog's assigned time slot.
Notice that the I/O registers are not a hub-managed resource.· There's special logic connecting each cog's direction and output registers with the I/O pin drivers so that the cogs can change the I/O pins at any time and the result will be well-defined.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
You really need to read the Propeller Datasheet and the introductory portions of the Propeller Manual.· These will answer many of the questions you've asked.
Multiple framed questions like these are usually academic in nature, are you a student and is this an assignment? There are many helpful people on this forum but we can be more helpful when the OP if upfront so we understand the nature of your enquiry.
*Peter*
i dont have any due assignments.
i am working my final project and its due is in December.
I would like to thank all of the members who participated and spared their important time to reply me.
regards
Sanket Shah
http://forums.parallax.com/showthread.php?p=647408
Or just·really genuinely·does not·understand.
Post Edited (hover1) : 9/21/2009 11:45:25 PM GMT
The standard of this forum is very high and active members are also very helpful, but we are not vending machines. You may have answered correctly in saying you do not have any assignments due (yet). You are right in stating that they (and even I) have given important time to reply. We don't charge to give information, we give it willingly and freely, but we are not cheap in that we value the information and the benefit that others receive when we share it with them. Sometimes this information would normally be locked away due to it's commercial value, but not so here. Such is the quality and "spirit" of this forum.
The barrage of academic questions is frustrating to us as we are serious in wanting to help those who are serious. Assignments/projects count too, but allow us the dignity of being informed as to the nature of your questions so that we can discern how best to answer.
Perhaps if you are so appreciative of the help you have received you might also give of your important time and answer some questions yourself.
1. What is the nature of your project?
2. Are you a student?
3. Have you READ the Propeller Manual
4. Is there something specific you are trying to do
5. What hardware are you using?
6. What would you like to do with the Propeller chip?
Remember, we and including you are all "Propeller buddies" here.
*Peter*