simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] VCD record 4x faster than need


From: Thomas K
Subject: Re: [Simulavr-devel] VCD record 4x faster than need
Date: Mon, 21 Mar 2016 19:52:34 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

Hi,

You have to set clock frequency in simulation with command line option -F! Default is 4MHz! And you will get at least a small difference: simulavr time unit is 1ns and period for 16MHz is 62.5ns!

cu, Thomas


Am 21.03.2016 um 10:08 schrieb Valber:
Attached program send 'A' word an UART(F_CPU=16MHz, Baudrate=9600), delay between Word 50ms.

Start record, launch:
simulavr -c vcd:tracein.txt:trace.vcd -f uart_clear_c_tx.elf -d atmega16

After that, I view file in GTKWave and Pulseview(Sigrok) [attached image]

Decoded Baudrate = 2400 = 9600/4
And delay between Word 'A' ~=200 = 50*4

Dirty Hack solved this problem, change in VCD file
from
$timescale 1ns $end
to
$timescale 250ps $end


_______________________________________________
Simulavr-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/simulavr-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]