Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

About logic analyzer‘s "base time step" property.

2 posters

Go down  Message [Page 1 of 1]

royqh1979



I'm trying to translate the help file for logic analyzer.

And I'm not sure what "base time step" does.

It's mapped to variable "m_timeStep", which is used to calcuate a count "lastime". ( In LAnalyzer::dump() )
Code:

    uint64_t lastTime = (endTime-startTime)/m_timeStep;

And lasttime is used to control the samples retrieved from the channel's buffer.

Code:

        for( int i=0; i<m_bufferSize; ++i )
        {
            index++;
            double   val  = m_channel[ch]->m_buffer[index];
            uint64_t time = m_channel[ch]->m_time[index];
           ......
            time = (time-startTime)/m_timeStep;
           ......
            samples.insert( time, { val, ch } );
            if( time == lastTime ) break;            // All samples before endTime already registered
        }

What I'm not sure here is that, if the buffer's sample rate is not equal to m_timeStep ("base time step") , is the data retrieve count is correctly calculated?

arcachofo

arcachofo

And I'm not sure what "base time step" does.
That is the "timescale" value for the vcd file in picoseconds.
So all the values are based in that unit: if "timescale" = 1000 ps, then a time value of 50 means 50 ns.

What I'm not sure here is that, if the buffer's sample rate is not equal to m_timeStep ("base time step") , is the data retrieve count is correctly calculated?
Times in the buffer are always in picoseconds.
There is no actual sample rate, just a list of values and timestamps.
Logic analyzer and Oscilloscope work in a similar way than vcd files: it only stores changes in value and time when the change happens.
This way it always has ps resolution.

royqh1979



arcachofo wrote:
And I'm not sure what "base time step" does.
That is the "timescale" value for the vcd file in picoseconds.
So all the values are based in that unit: if "timescale" = 1000 ps, then a time value of 50 means 50 ns.

What I'm not sure here is that, if the buffer's sample rate is not equal to m_timeStep ("base time step") , is the data retrieve count is correctly calculated?
Times in the buffer are always in picoseconds.
There is no actual sample rate, just a list of values and timestamps.
Logic analyzer and Oscilloscope work in a similar way than vcd files: it only stores changes in value and time when the change happens.
This way it always has ps resolution.

en, I see. So "base time step" is the unit of the time values in the exported vcd file?

arcachofo

arcachofo

en, I see. So "base time step" is the unit of the time values in the exported vcd file?
Exactly.
For example: if "base time step" = 1000 ps.
Then the exported vcd file will look like this:

Code:
$timescale 1000ps $end

$var wire 1 * RASL $end
$var wire 1 " CASL $end
$var wire 1 # WEL $end
$var wire 1 $ DMA $end
$var wire 1 % IORQL $end
$var wire 1 & MREQL $end
$var wire 1 ( INTL $end
$var wire 1 ) PHICPU $end

$enddefinitions $end

$dumpvars
5$
0&
0)
$end

#112 1)
#132 1&
#255 0)
#289 94$
#398 1)
#418 0&
...
...

And there are value changes at 112 ns, 132 ns, 255 ns, ...

royqh1979



Thank you!

And one more question: what's the meaning of "auto step" property in the capacitor/incubator etc.

In help file it says:
Code:

- Auto Step: (0 steps)
  Resize Reactive step automatically.
  The value sets the number of sub-steps.
  0 to disable.

I can't understand what it mean.
What does "automatically" mean here? Is the step resized automatically? If it's resized automatically, why need a number here?

arcachofo

arcachofo

What does "automatically" mean here? Is the step resized automatically?
Yes, Reactive step is resized automatically to a value that can keep the speed of the voltage changes.

If it's resized automatically, why need a number here?
To set the number of sub-steps:
- If set to 0 then it deactivates the feature.
- If set to 1 then sub-steps = 1, it resizes the step to just keep the speed of the voltage changes.
- If set to 2 then sub-steps = 2, it divides the the resized step size by 2 , being more accurate (and slow).

In any case this feature is quite experimental and often harms more than help.

royqh1979



arcachofo wrote:
What does "automatically" mean here? Is the step resized automatically?
Yes, Reactive step is resized automatically to a value that can keep the speed of the voltage changes.

If it's resized automatically, why need a number here?
To set the number of sub-steps:
- If set to 0 then it deactivates the feature.
- If set to 1 then sub-steps = 1, it resizes the step to just keep the speed of the voltage changes.
- If set to 2 then sub-steps = 2, it divides the the resized step size by 2 , being more accurate (and slow).

In any case this feature is quite experimental and often harms more than help.

I see. Maybe a combobox is more convinient to set it?

arcachofo

arcachofo

I see. Maybe a combobox is more convinient to set it?
Maybe, but this feature is likely to be changed/removed.
Probably just a "Reactive step" specific for each component would be better.

royqh1979



arcachofo wrote:
I see. Maybe a combobox is more convinient to set it?
Maybe, but this feature is likely to be changed/removed.
Probably just a "Reactive step" specific for each component would be better.

I agree. It seems there's no reason to set this option for each comp individually.

arcachofo

arcachofo

I agree. It seems there's no reason to set this option for each comp individually.
Well... there is a reason to use some specific reactive step for some components.
For example if you have many capacitors at low frequency, these could use a long reactive step.
But if you add 1 or 2 that need to update very fast it is better to use a short reactive step only for these and a longer one for the others.
Ideally each capacitor/inductor should use the longer reactive step posible.
And in a perfect world each one should be resized dynamically to fit the changes.
The downside is that all these calculations add an overhead, and it's not easy to find an efficient solution for all cases.

The "Autostep" feature tries to solve this in one way, but has a lot of complications.
Using specific reactive step for some components is another option.

royqh1979



arcachofo wrote:
I agree. It seems there's no reason to set this option for each comp individually.
Well... there is a reason to use some specific reactive step for some components.
For example if you have many capacitors at low frequency, these could use a long reactive step.
But if you add 1 or 2 that need to update very fast it is better to use a short reactive step only for these and a longer one for the others.
Ideally each capacitor/inductor should use the longer reactive step posible.
And in a perfect world each one should be resized dynamically to fit the changes.
The downside is that all these calculations add an overhead, and it's not easy to find an efficient solution for all cases.

The "Autostep" feature tries to solve this in one way, but has a lot of complications.
Using specific reactive step for some components is another option.

Then maybe we can use a global option to control the default way to calc.

And component can change the way to calc use it's own option.

But this do make things complicated.



Last edited by royqh1979 on Sat Sep 09, 2023 5:15 pm; edited 1 time in total

arcachofo

arcachofo

Then maybe we can use a global option to control the default way to calc.

And component can change the way to calc it use it's own option.
That is the current implementation:
There is a global "Reactive step" and a "local Autostep" .

The idea is to change "local Autostep" to "local Reactive step".

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum