Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

System Console and monitor service

I'm testing the monitor service from system console.

Below the example code (from help in system console) with modified registers. 0x00004014 is a register with is changing at 2 hz and 0x00004024 at 1 hz. With some C code I verified that the registers are indeed changing.

See attached for code

I expect something like:

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

But I get:

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x01 (100 ms) 0x00004024: 0x01 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

0x00004014: 0x00 (100 ms) 0x00004024: 0x00 (100 ms)

As you can see, the 0x00004024 is a copy of 0x00004014. I now for sure the values of the register are correct and changing.

I tested this two way's, one with an C application and two with system console with 20 bytes read on the callback function.

Output of C:

0x00004014: 0x00 0x00004024: 0x00

0x00004014: 0x00 0x00004024: 0x00

0x00004014: 0x00 0x00004024: 0x00

0x00004014: 0x00 0x00004024: 0x00

0x00004014: 0x00 0x00004024: 0x00

0x00004014: 0x01 0x00004024: 0x00

0x00004014: 0x01 0x00004024: 0x00

0x00004014: 0x01 0x00004024: 0x00

0x00004014: 0x01 0x00004024: 0x00

0x00004014: 0x01 0x00004024: 0x00

0x00004014: 0x00 0x00004024: 0x01

0x00004014: 0x00 0x00004024: 0x01

0x00004014: 0x00 0x00004024: 0x01

0x00004014: 0x00 0x00004024: 0x01

0x00004014: 0x00 0x00004024: 0x01

0x00004014: 0x01 0x00004024: 0x01

0x00004014: 0x01 0x00004024: 0x01

0x00004014: 0x01 0x00004024: 0x01

0x00004014: 0x01 0x00004024: 0x01

0x00004014: 0x01 0x00004024: 0x01

0x00004014: 0x00 0x00004024: 0x00

0x00004014: 0x00 0x00004024: 0x00

0x00004014: 0x00 0x00004024: 0x00

0x00004014: 0x00 0x00004024: 0x00

0x00004014: 0x00 0x00004024: 0x00

Code:

monitor_add_range $monitor_path $master_path 0x00004014 20

#TCL callback procedure for the monitor service

proc example_callback_proc {monitor_path master_path} {

set w1 [monitor_read_data $monitor_path $master_path 0x00004014 20]

set i1 [monitor_get_read_interval $monitor_path $master_path 0x00004014 20]

puts "0x00004014: $w1 ($i1 ms)"

}

Output of system console with change of size in read action:

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 (100 ms)

0x00004014: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 (100 ms)

0x00004014: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 (100 ms)

0x00004014: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 (100 ms)

0x00004014: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 (100 ms)

0x00004014: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

0x00004014: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 (100 ms)

From the documantion: "More ranges can be added. with monitor_add_range". This is also shown in the example. So I don't understand why this is not working.

Do some of you have an idea?

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I'm having the exact same issue with some code I wrote for system console. Has anyone figured this out? Should I start an Altera SR?