bugSimulavr: an AVR simulator - Bugs: bug #51223, VCD trace of PINx register not...


bug #51223: VCD trace of PINx register not updated when driven from other port/device

Submitted by:  None
Submitted on:  Sun 11 Jun 2017 05:07:33 PM UTC  
Category:  Simulation Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Component Version:  simulavrxx

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 11 Jun 2017 05:07:33 PM UTC, original submission:  

The PINx register is not correctly updated in the (VCD) traceer, when a pin is driven by a different portpin or even another device (multicore simulation). (Assuming #51222 applied: it is correctly traced, when the source is a portpin of the same HWPort.)

In the attached example, PB1 is periodically toggled and it is connected to PD2, thus the PIND register should change. Compile and run the example like so:

> avr-gcc -g -mmcu=atmega644 -std=gnu11 -O2 -Wall -Wextra -Werror -o main.elf main.c
> ./run_simulator.py

The attached patch fixes this issue by adding an additional member to Pin, that points to the IOReg<HWPort> owning that Pin. This allows to report-back/update the tracer when the pin changes. (much like pinOfPort does)



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #40905:  fail.png added by None (5KiB - image/png)
file #40902:  pass.png added by None (6KiB - image/png)
file #40903:  main.c added by None (151B - text/x-csrc)
file #40904:  run_simulavr.py added by None (1KiB - text/x-python)


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2017-06-11 None Attached File- => Added fail.png, #40905
2017-06-11 None Attached File- => Added 0001-fix-trace-of-PINx-register-when-driven-from-another-.patch, #40901
    Attached File- => Added pass.png, #40902
    Attached File- => Added main.c, #40903
    Attached File- => Added run_simulavr.py, #40904

Back to the top

Powered by Savane 3.5