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: SimulationSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Originator Email: -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)

Anonymous

 

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

Attach File(s):
   
   
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

 

CC list is empty

 

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

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 11 Jun 2017 05:08:45 PM UTCNoneAttached File-=>Added fail.png, #40905
Sun 11 Jun 2017 05:07:33 PM UTCNoneAttached 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.1-cleanup1