Pipelining and other things..


Closed Thread
Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2006
    Posts
    12

    Default Pipelining and other things..

    Hey,

    I've been using pbp pro for a while, however I have for the first time found a need to optimise code within a loop (software PWM) and in doing so have a few questions I was wondering if anyone knew the answer to:

    1: In addition to the obvious performance penalty from having an interrupt check between PBP statements, would these interrupt branches cause a significant performance decrease by causing the pipeline to be cleared after every check? I believe the branches are followed by default, and given that these branches will be taken on very few checks, it seems like it would happen a lot (between almost every PBP statement). Is there a way to change the default behavior? Have I misunderstood pipelining?

    2: Is there any difference between byte[50] and byte(50)?

    3: Is there any way to have PBP output a nice assembly version of the code instead of going to binary? I've noticed the .asm file produced but it seems messy and its full of macros(?) rather than assembly statements.. I'm trying to convert the following statement to assembly, but it would be much easier if I could see the what the compiler comes up with: 'If Counter = dLEDX(1) Then dLED.1 = 0'

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by breesy View Post
    .....it would be much easier if I could see the what the compiler comes up with: 'If Counter = dLEDX(1) Then dLED.1 = 0'
    if you compile
    Code:
     If Counter = dLEDX[1] Then dLED.1 = 0
    then you come up with something like

    Code:
    	CMPNE?BBL	_Counter, _dLEDX + 00001h, L00001
    	MOVE?CT	000h, _dLED??1
    	LABEL?L	L00001
    Was this the question?
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    1. Polling interrupt flag will decrease the execution speed. The best efficient way will be to create an interrupt routine, ASM or with Darrel's instant interrupts.

    2. not suppose to.

    3.unfortunatley, PBP create a Macro based ASM, it's looking hard at first, but once you understand the Macro syntax, it's faster to read than real ASM. Let's see Sayzer snips.

    Code:
    	CMPNE?BBL	_Counter, _dLEDX + 00001h, L00001
    	MOVE?CT	000h, _dLED??1
    	LABEL?L	L00001
    CMPNE?BBL : Compare not equal a byte against a byte and branch to a label if result is false
    It will compare Counter against dLEDX+1 (which is dLED[1]), it they are different, it will jump to label L00001

    MOVE?CT : Move a Constant into a specific BIT
    this will move 0 to dLED.1. Something like BCF

    If you want a full assembler list, the only way is to import the .HEX fil in MPLAB and read the disassembly list, without label, without comments, without nothing.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default 11th july 2004, nice date to remember

    This one gave me the right kick in the but...
    http://www.picbasic.co.uk/forum/show...09&postcount=3

    Thanks Darrel!
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Talking some salmon fishing would be welcome ...

    Quote Originally Posted by mister_e View Post

    If you want a full assembler list, the only way is to import the .HEX fil in MPLAB and read the disassembly list, without label, without comments, without nothing.
    Hi, Steve ...

    Too more beers once more ...

    Starting from a PbP source and using MPLAB ... the Program Window ( w/right tab enabled ...!!! ) shows this nice ASM listing our friend would like to see !!!

    With aliases, labels ans so on ... I can follow: that's a reference ( LOL ! )

    But building the project from a PbP source is compulsory ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    ah merde...
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Talking Tu l'as dit bouffi ...

    Ou encore : Bout Filtre ...

    Scuzi à tutte por l' à parte ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    LMAO! And the RTFSoftware of the day goes to me ... WOOOHOOO!

    You know i'm not a big MPLAB fan/user anyway? Case not, proofs are there

    at least this feature was unknown...

    ah pis mange... maudit francais
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts