 |
|
 |
| Parallax Forums > Public Forums > Propeller Chip > Regarding propeller | Forum Quick Jump
|
|  sanket Registered Member
        Date Joined Aug 2009 Total Posts : 28 | Posted 10/30/2009 2:48 AM (GMT -8) |   | Hi all, I asked you guys about the carry flag and zero flag set during the instruction execution. I am sorry, but i still have some doubt about it or probably, i misunderstood. I was informed that, for ROR operation, the carry bit should be set before the instruction executes. So, the question is does this phenomenon remains same for the other instructions? Because, I went through propeller manual (page - 380) ,MINS operation. And its written that "carry flag is set if signed Svalue1 is less than signed Svalue2" So, In this case, the carry flag should be set after the execution of the instruction. So, i am confused. I will be really thankful to you, if i will be directed right. Thank You
Regards Sanket Shah | | Back to Top | | |
  |  sanket Registered Member
        Date Joined Aug 2009 Total Posts : 28 | Posted 10/30/2009 4:21 AM (GMT -8) |   | Hello Ale, Thank You very much for your instant response. So, did you mean that, in ROR, there is no need to write the carry flag before the instruction is executed? carry flag of the result is only written if 24th bit in the instruction is 1? Is that u mean to say? For example- ROR D,S = 001000 0010 1111 000000001 000000010 First, i will fetch the destination and source value (both are 32 bits). suppose, S value says to rotate the D value by 5'b00010 Now, i am rotating the D value by 2. So, as per the instruction, carry flag is not set, so i dont have to set the 24th bit of the result i got in D. and, if carry flag in the instruction (24th bit) in set, then i will have to set the 24th bit of the result (which is carry bit). Can you please, let know about my understanding for the upper ROR instruction. And in RCR operation what happens to the same instruction given above (assume with RCR's opcode).
Thank You once again for your reply.
Regards Sanket Shah | | Back to Top | | |
   |  sanket Registered Member
        Date Joined Aug 2009 Total Posts : 28 | Posted 10/30/2009 6:01 AM (GMT -8) |   | Hello Ale, But what if i dont know about the next instruction.
Regards Sanket Shah | | Back to Top | | |
 |  Ale Registered Member

       Date Joined May 2007 Total Posts : 1267 | Posted 10/30/2009 6:25 AM (GMT -8) |   | | | |
  |  jazzed _oOo_(^^)_oOo_
        Date Joined Jan 2008 Total Posts : 2114 | Posted 11/2/2009 2:26 PM (GMT -8) |   | sanket said... Dear Ale, Here is some confusion. I thought that, i am suppose to modify the C flag and Z flag in 32 bit in the instruction itself (25th and 24th bit), because there is C and Z field in 32 bit instruction also. But, as per your answer, C and Z flag are the global flags for one processor, and 25th and 24th bit of the instruction indicates to change the global C and Z flags depends on the operation. So, the instruction which takes C flag as an argument that is the global C flag, not the C field in the instruction. Can u please let me know if i am in right direction?? Thank You very much for your guidance.
Regards Sanket Shah
As Ale has explained this already, I thought you might benefit from a different but equivalent answer.
Bit 24/25 of an instruction are commands to the instruction from the user to set or not set the state of the carry/zero flag to the global bit.
If the instruction bits are not set, the global bits will not be changed. Else if the instruction bits are set as indicated by WC,WZ in the source, the global bits will be set to whatever/however the instruction evaluates.
I hope this helps clear your doubts. | | Back to Top | | |
 |  sanket Registered Member
        Date Joined Aug 2009 Total Posts : 28 | Posted 11/2/2009 4:51 PM (GMT -8) |   | Dear jazzed, Thank you very much for your reply. This will help me a lot. Now, I think i am pretty much cleared with the doubt i had. Thanx a lot once again. It would have been difficult without your support to move forward.
Regards Sanket Shah | | Back to Top | | |
 |  StefanL38 Registered Member
        Date Joined Sep 2006 Total Posts : 958 | Posted 11/2/2009 10:15 PM (GMT -8) |   | Hello Sanket,
as far as I understand it the C-flag and the Z-flag are only modified if an instruction has a certain result. Different instructions set or clear one or both flags on different results. You can change the predefined behavour of the commands by specifying effects. See Effects ( WC, WZ, WR, NR ) in the propeller-manual on page 291.
So one kind to set or clear a flag is to execute a operation which you select to just get the flag set or cleared. To your question I think so.
But I would like to ask a complete different question. In your project is it excplicit forbidden to use a REAL Propeller to find out how it works ? Do have to do EVERYTHNG theoretically ? What do you think about using a simulator like GEAR ?
best regards
Stefan | | Back to Top | | |
 |  sanket Registered Member
        Date Joined Aug 2009 Total Posts : 28 | Posted 11/2/2009 11:29 PM (GMT -8) |   | Hello stefan, Thank you for your reply. Yes, it is necessary to know the exact operation of the propeller. Because i am making multi-core architecture based on the propeller operation and also based on its instructions sets only. i am working on such architecture which can execute all the instruction provided in datasheet of the propeller. So, I am making the hardware which can execute the assembly or spin program. So whatever the code we write in assembly or spin language, the hardware will perform the same operation specified. I hope you have got my point now. If no, then please ask me. I will be thankful to inform you guys about my project.
Best regards Sanket Shah | | Back to Top | | |
  |  StefanL38 Registered Member
        Date Joined Sep 2006 Total Posts : 958 | Posted 11/3/2009 1:38 AM (GMT -8) |   | Yes I have to ASK again
is it forbidden for you to BUY a Propeller-Chip + EEPROM + 5MHz-Chrystal + MAX232 + some Capacitors to have a SECOND possability to ANALYSE how the propeller works ? (this would be an amount of around 20 dollars without shipping)
is it forbidden for you to USE a simulator like GEAR to have a THIRD possability how the propeller works ?
best regards
Stefan | | Back to Top | | |
 |  MagIO2 Registered Member
        Date Joined Mar 2009 Total Posts : 596 | Posted 11/3/2009 2:25 AM (GMT -8) |   | | Don't you see any legal issues in re-engeneering the propeller? | | Back to Top | | |
    |  Mike Green Registered Member

       Date Joined Oct 2004 Total Posts : 13558 | Posted 11/3/2009 4:01 PM (GMT -8) |   | | This has been discussed on this forum before. What I gather is that the general solution to IP protection for Parallax is to use service, innovation and trade secrets where appropriate (hence the lack of disclosure for the Basic Stamp bytecodes) for protection from duplication and openness and innovation for protection from claims by others to the same IP. | | Back to Top | | |
  |  sanket Registered Member
        Date Joined Aug 2009 Total Posts : 28 | Posted 11/3/2009 11:31 PM (GMT -8) |   | Hello all, It seems like hot environment created because of me. first of all, I would like to thank you all guys who helped me out and who spent time for replying me. let me tell you the whole story. I am the student of electrical engineering and its my final project going on with propeller architecture. The purpose for choosing propeller is just to learn the basic programming skills (in verilog HDL) to design hardware. In my final project, i wanted to design processor and i made search in google regarding the architecture of the processor. Finally, I changed my mind to design the multi-core architecture (which, the propeller is). So, this is just a school project, nothing much. I think, to design the whole propeller chip clone, i need spin interpreter, boot loader and propeller kit as well. Even, I am not using any software given by you. So, its not possible for me to design the whole architecture alone including boot loader, spin interpreter etc. Even, I am not dealing with video part in the project. I am not doing any research or something else or I don't even want to copy your design for the future use. This is just a part of learning programming skill by using your design. I hope, now you guys get my point clearly. If no then , feel free to ask me. Because, i have an unpaid debt for you guys. Cause i would not have came to know about many fundamentals of the processor design without your technical support.
Best regards Sanket Shah | | Back to Top | | |
  |  Ale Registered Member

       Date Joined May 2007 Total Posts : 1267 | Posted 11/4/2009 1:36 AM (GMT -8) |   | | | |
  | Forum Information | Currently it is Saturday, November 21, 2009 11:25 AM (GMT -8) There are a total of 393,853 posts in 55,536 threads. In the last 3 days there were 84 new threads and 704 reply posts. View Active Threads
| | Who's Online | This forum has 17692 registered members. Please welcome our newest member, old guy. 55 Guest(s), 17 Registered Member(s) are currently online. Details Siri, MichelB, Kenny Gardner, Peter Jakacki, keith_kw, Jay Kickliter, Mike Green, Shawn Lowe, Luis Digital, dMajo, Harley, Rick Brooks, Beau Schwabe (Parallax), SRLM, Tubular, ERM, Toby Seckshund |
Forum powered by dotNetBB v2.42EC SP2.02 dotNetBB © 2000-2009 |
|
|