Simulation problem with F(1) macrocell on SLG46880V

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
Matthew H.
Offline
Last seen: 9 months 1 week ago
Joined: 2020-09-28 19:36
Simulation problem with F(1) macrocell on SLG46880V

I'm using the F(1) computational macrocell on a SLG46880V device. It looks like when computations are performed using the cell on inputs coming from the dedicated analog comparator pins, and the outputs of the F(1) block are routed to the FSM transition inputs, the states don't transition correctly in the simulation.

When routing inputs from the general connection matrix it seems to work OK. Please see links to images and exaple file:

https://imgur.com/a/liAV0ZG

https://imgur.com/a/PkO0luS

https://www.dropbox.com/s/l8loe30ldw3pf7g/F%281%29%20error%20example.gp6?dl=0

Keywords: 
Device: 
Device Number: 
SLG46880V
ssaravan
Offline
Last seen: 9 months 1 week ago
Staff
Joined: 2019-10-01 13:53
Hi Matthew,

Hi Matthew,

Thanks for reaching out. The only time the f(1) Computation Macrocell will begin to execute instructions is when the ASM Macrocell first enters a new state.(You can also find some more useful information in the F(1) macrocell section of the Datasheet)

So when the input voltage is less than the reference volatge of the ACMP, the ACMP goes low and the F(1) block stops and ASM remains in State 0. Hence you donot see a transition. Could you please try using the Loop with Delay command in the command sequence in addition to OUT0? So that every time the iteration goes through the loop, the threshold is monitored and the there is a transition.

Please let me know if this helps

Kind Regards,
Shivani

 

Matthew H.
Offline
Last seen: 9 months 1 week ago
Joined: 2020-09-28 19:36
Ok Shivani I see what you

Ok Shivani I see what you mean. I will try adding the loop and see if it changes anything, thank you.

Matthew H.
Offline
Last seen: 9 months 1 week ago
Joined: 2020-09-28 19:36
Hi again Shivani. I'm still

Hi again Shivani. I'm still not having any luck accomplishing what I'm trying to do, which is monitor the analog inputs continuously while in a gven state, performing a running computation using the F(1) macrocell, and the firing a state transition when a certain condition of the computation is met. An example would be to continously convert a thermometer code from the four analog comparators associated with the F(1) cell inputs, to three bit Gray code using the stack machine, and then fire a state transition when a particular bit in the three-bit F(1) output is set. For the F(1) code I have something like:

LOAD4 //push LOAD4 input bit onto stack
OUT2 //copy top bit of stack to OUT2, MSB
LOAD2 //push LOAD2 input bit onto stack
OUT1 //copy top bit of stack to OUT1, middle bit
LOAD1 
LOAD3
INV //invert top bit of stack, LOAD3
AND //top two bits on stack, push result back to top
OUT0 //copy top bit to OUT0
PUSH0 //top bit of stack must be 0 to trigger loop instruction
LOOP w DELAY // back to start

As you say without a loop statement the F(1) computation is only performed one time on entry to the state. With a loop & delay it looks like in simulation the stack machine enters an infinite loop, the outputs of the F(1) change continously but control is then never returned to the ASM and the transition never happens. Is it possible to do this? Do you have a working example you could share if so? Thank you

ssaravan
Offline
Last seen: 9 months 1 week ago
Staff
Joined: 2019-10-01 13:53
Hi Matthew,

Hi Matthew,

Please find attached a working example of the F(1) macrocell. The command sequences are a bit different than yours

Kind Regards

Shivani

Attachment: 
Matthew H.
Offline
Last seen: 9 months 1 week ago
Joined: 2020-09-28 19:36
Thank you for your example

Thank you for your example Shivani and sory for the delay in my reply, unfortunately the issue I'm experiencing still remains. The F(1) cell enters the loop and computes the 4-input AND of the ACMP inputs continuously not a problem in your example. However if I take say the OUT0 of the F(1) cell and connect it to a state transition input on the ASM it looks like it never triggers, the loop continues infinitely and control is never returned back to the ASM in that situation, where state transition inputs are only coming from the outputs of the F(1).

If I connect the OUT0 of the F(1) to both the ASM transition input and the "interrupt" pin on the F(1) then the transition is triggered when OUT0 goes high, I assume because control is returned back and the loop breaks out concurrently with the ASM recieving the transition signal, but this seems like a race hazard and not a partiuclarly useful configuration, anyway, as that connection then persists across all states and all four possible F(1) configurations. I'm assuming this is correct behavior though, once the F(1) enters an infinite loop in a particular state the only way to break out is via an external input to the ASM or using the interrupt pin to force a return of control to the ASM?