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

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

Add a New Comment Rich Markup
   

Wed 04 Dec 2019 03:35:59 PM UTC, comment #1: 

Solved with upcoming release.

Thomas K. <tomk>
Group administrator
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)

Anonymous

 

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

Attach Files:
   
   
Comment:
   

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

 

Carbon-Copy List
  • -email is unavailable- added by tomk (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-04 tomk StatusNone Fixed
        Assigned toNone tomk
        Open/ClosedOpen Closed
    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.13-f8d8.
    Corresponding source code