Shop OBEX P1 Docs P2 Docs Learn Events
Question on TRACE data — Parallax Forums

Question on TRACE data

ozpropdevozpropdev Posts: 2,792
edited 2014-03-30 07:59 in Propeller 2
Hi Chip,

A qurstion on the 32 bit mode of SETRACE

The docs show only 30 bits of data. The 2 bits above the 16 bit PC are not used?
The PC for hub exec is right shifted 2 bits to fit the 16 bit space.
The 32-bit trace output is comprised of the following signals, from MSB to LSB:

    TASK[1..0]   - the executing task, 0..3
    HUB          - hub cycle that comes once every 8 clocks
    FETCH        - pipeline stall due to hub instruction fetch
    GO           - pipeline not stalled and instruction done
    COND         - execution condition
    JUMP         - a jump is executing
    VID_ACK      - WAITVID able to execute
    CTRA_SYNC    - CTRA is rolling over
    CTRB_SYNC    - CTRB is rolling over
    SERA_RX_RDY  - SERA's receive buffer is full, ready for SERINA
    SERA_TX_RDY  - SERA's transmit buffer is empty, ready for SEROUTA
    SERB_RX_RDY  - SERB's receive buffer is full, ready for SERINB
    SERB_TX_RDY  - SERB's transmit buffer is empty, ready for SEROUTB
    not used
    not used
    PC[15..0]    - full 16 bits of the program counter

Possible candidates could be TLOCK,CNT rollover or the LIFO index.
Maybe the forumisters have some ideas for the spare 2 bits?

Comments

  • ozpropdevozpropdev Posts: 2,792
    edited 2014-03-17 07:13
    Hi Chip,
    I'm getting incorrect data on the VID_ACK and CTRA bits in 32 bit trace samples.
    So I set up CTRA and CTRB and they appear in the SERA_RX_RDY and SERA_TX_RDY bits.
    Are bits 24 and 23 allocated to something else?

    This appears to be the correct layout.
    Bit 24 ???
    Bit 23 ???
    Bit 22 VID_ACK
    Bit 21 CTRA_SYNC
    Bit 20 CTRB_SYNC
    Bit 19 SERA_RX_RDY
    Bit 18 SERA_TX_RDY
    Bit 17 SERB_RX_RDY
    Bit 16 SERB_TX_RDY
    
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-03-17 12:24
    ozpropdev,
    The counters (baud generators) in the SERA & SERB circuits do not use the counters as they have their own internal counters. Could this be why you are not seeing the CTRA/B bits change???
  • ozpropdevozpropdev Posts: 2,792
    edited 2014-03-17 16:37
    Cluso,
    That's right. The serial transceivers have their own counters. My test shows the CTRA and CTRB rollovers appearing in the wrong place.
    I am also seeing unidentified data in the VID_ACK and CTRA_SYNC bits.

    In my test I have CTRA and CTRB rolling over every 4 clocks. You can see the expected pattern appearing in SERA_RX_RDY (RXA) and SERA_TX_RDY (TXA) and junk in VID_ACK and CTRA_SYNC.
    BTW. I am not using VIDEO or SERA,SERB.
    R183 TASK0 --- ----- STALL ---- ---- ----- ---- ---- --- --- --- ---  | $0021 ----- ----- ----- 
    R184 TASK0 HUB ----- STALL ---- ---- ----- ---- ---- RXA --- --- ---  | $0021 ----- ----- ----- 
    R185 TASK0 --- ----- STALL ---- ---- ----- ---- ---- --- TXA --- ---  | $0021 ----- ----- ----- 
    R186 TASK0 --- ----- ----- ---- ---- ----- ---- ---- --- --- --- ---  | $0021 ----- ----- ----- 
    R187 TASK0 --- ----- ----- ---- JUMP ----- ---- ---- --- --- --- ---  | $0022 ----- ----- ----- 
    R188 TASK1 --- ----- ----- SKIP ---- ----- ---- ---- RXA --- --- ---  | ----- $002F ----- ----- 
    R189 TASK3 --- ----- ----- ---- ---- VIDEO ---- ---- --- TXA --- ---  | ----- ----- ----- $0895 
    R190 TASK0 --- ----- ----- SKIP ---- ----- ---- ---- --- --- --- ---  | $0023 ----- ----- ----- 
    R191 TASK2 --- ----- ----- ---- JUMP ----- CTRA ---- --- --- --- ---  | ----- ----- $0031 ----- 
    R192 TASK1 HUB ----- ----- ---- ---- ----- ---- ---- RXA --- --- ---  | ----- $002C ----- ----- 
    R193 TASK0 --- ----- STALL ---- ---- ----- ---- ---- --- TXA --- ---  | $0020 ----- ----- ----- 
    R194 TASK0 --- ----- STALL ---- ---- ----- ---- ---- --- --- --- ---  | $0020 ----- ----- ----- 
    R195 TASK0 --- ----- STALL ---- ---- ----- ---- ---- --- --- --- ---  | $0020 ----- ----- ----- 
    R196 TASK0 --- ----- ----- ---- ---- ----- ---- ---- RXA --- --- ---  | $0020 ----- ----- ----- 
    R197 TASK0 --- ----- STALL ---- ---- ----- ---- ---- --- TXA --- ---  | $0021 ----- ----- ----- 
    R198 TASK0 --- ----- STALL ---- ---- ----- ---- ---- --- --- --- ---  | $0021 ----- ----- ----- 
    R199 TASK0 --- ----- STALL ---- ---- ----- ---- ---- --- --- --- ---  | $0021 ----- ----- ----- 
    R200 TASK0 HUB ----- ----- ---- ---- ----- ---- ---- RXA --- --- ---  | $0021 ----- ----- ----- 
    R201 TASK1 --- ----- STALL ---- ---- ----- ---- ---- --- TXA --- ---  | ----- $002D ----- ----- 
    R202 TASK1 --- ----- STALL ---- ---- ----- ---- ---- --- --- --- ---  | ----- $002D ----- ----- 
    R203 TASK1 --- ----- ----- ---- ---- ----- ---- ---- --- --- --- ---  | ----- $002D ----- ----- 
    R204 TASK3 --- ----- ----- ---- JUMP VIDEO ---- ---- RXA --- --- ---  | ----- ----- ----- $0896 
    R205 TASK0 --- ----- ----- ---- ---- ----- ---- ---- --- TXA --- ---  | $0022 ----- ----- ----- 
    R206 TASK2 --- ----- ----- ---- JUMP ----- CTRA ---- --- --- --- ---  | ----- ----- $0031 ----- 
    R207 TASK1 --- ----- ----- ---- JUMP ----- ---- ---- --- --- --- ---  | ----- $002E ----- ----- 
    R208 TASK0 --- ----- STALL SKIP ---- ----- ---- ---- --- --- --- ---  | $0000 ----- ----- ----- 
    
    
  • jmgjmg Posts: 15,173
    edited 2014-03-17 16:59
    ozpropdev wrote: »
    My test shows the CTRA and CTRB rollovers appearing in the wrong place.
    I am also seeing unidentified data in the VID_ACK and CTRA_SYNC bits.

    I think you are saying this is a labeling/mapping document errata that Chip needs to check ?
  • ozpropdevozpropdev Posts: 2,792
    edited 2014-03-17 17:02
    jmg wrote: »
    I think you are saying this is a labeling/mapping document errata that Chip needs to check ?
    That appears to be the case. :)
  • cgraceycgracey Posts: 14,151
    edited 2014-03-17 19:16
    There might be some discrepancies in what bits do what. In the next release, The docs for SETRACE will certainly be in phase with the FPGA configuration.
  • ozpropdevozpropdev Posts: 2,792
    edited 2014-03-27 21:38
    Hi Chip
    Any chance of posting the new TRACE bit labels/definitions?
    Cheers
    Brian
  • cgraceycgracey Posts: 14,151
    edited 2014-03-27 22:04
    ozpropdev wrote: »
    Hi Chip
    Any chance of posting the new TRACE bit labels/definitions?
    Cheers
    Brian


    Nothing has changed there, yet, from the prior version. I'm going to get some sleep here, but I'll post this data when I get back to work. Tomorrow I should be into that part of Prop2_Docs.txt.
  • cgraceycgracey Posts: 14,151
    edited 2014-03-30 07:59
    Brian, here are the current-version trace outputs:
    wire [15:0] trace16 = {	t[1:0],
    			hub_sel[0],
    			go,
    			cond,
    			v,
    			jump,
    			p[8:0] };
    
    wire [31:0] trace32 = {	t[1:0],
    			hub_sel[0],
    			stall,
    			go,
    			cond,
    			v,
    			jump,
    			z,
    			c,
    			vid_ack,
    			ctra_sync,
    			ctrb_sync,
    			sera_rx_ready,
    			sera_tx_ready,
    			serb_rx_ready,
    			p[15:0] };
    


    t[1:0] - task number 0..3
    hub_sel[0] - hub cycle
    stall - high when loading icache (pipeline is stalled)
    go - high on last clock of current instruction
    cond - high when execution condition is true
    v - high when instruction is valid, low when instruction is cancelled (trailing a jump)
    jump - high when instruction is jumping
    z - z flag
    c - c flag
    p[15:0]/p[8:0] - program counter


    I'm not yet to this part of the documentation, but I can see that you need these right now.
Sign In or Register to comment.