myif not used in two parallel statements (byte range 4..8) Topic is solved

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
aclassifier
Respected Member
Posts: 332
Joined: Wed Apr 25, 2012 8:52 pm

myif not used in two parallel statements (byte range 4..8)

Postby aclassifier » Wed Jan 18, 2017 8:01 am

"'my_interface' not used in two parallel statements (byte range 4..8)"

What does the last part about byte range mean? When the server picks out a client to talk with then it's as [int index_of_client] like

Code: Select all

case i_i2c_external_server[int index_of_client].command (const i2c_command_external_t command): {..
Does it reflect some immediate field in the asm that's like 4 bits? I tend not to think that since it's talking about "byte range". 4 to 8 bytes? Value 4 to 8 of a byte?

What can I use this "byte range" info for?
View Solution
henk
Respected Member
Posts: 346
Joined: Wed Jan 27, 2016 5:21 pm

Postby henk » Wed Jan 18, 2017 9:19 am

It runs a check on the array to verify that no parts are written to in two threads; and at the same time it can spot whether there are parts that are not used by any, or just by one.

The byte range can be divided by the size of the array element (typically 4), to get to the index of the array that is unused. Is your array at least 2 elements long, and is index 1 used in only one thread?

Cheers,
Henk
User avatar
aclassifier
Respected Member
Posts: 332
Joined: Wed Apr 25, 2012 8:52 pm

Postby aclassifier » Wed Jan 18, 2017 9:45 am

henk

Thanks! When I comment a task away from the placed par, like this:

Code: Select all

// on tile[0].core[0]: temperature_heat_controller (i_temperature_heat_commands, i_i2c_external_commands[1], i_port_heat_light_commands[1]);
I get the following warning report:

Code: Select all

`i_temperature_heat_commands' not used in two parallel statements ...
`i_port_heat_light_commands' not used in two parallel statements (byte range 4..8) ...
`i_i2c_external_commands' not used in two parallel statements (byte range 4..8) ...
The last two interfaces arrays are size 2 and it's [1] that's not used for both.

If I switch the ends of the first interface array (the middle parameter: i_i2c_external_commands) and comment it away:

Code: Select all

// on tile[0].core[0]: temperature_heat_controller (i_temperature_heat_commands, i_i2c_external_commands[0], i_port_heat_light_commands[1]); 
I get the following warning report:

Code: Select all

`i_temperature_heat_commands' not used in two parallel statements ...
`i_port_heat_light_commands' not used in two parallel statements (byte range 4..8) ...
`i_i2c_external_commands' not used in two parallel statements (byte range 0..4) ...
The last two interfaces arrays are size 2 and it's [0] that's not used in the first and [1] that's not used in the second.

Array size: 2
Not used [0]: byte range 0..4 (formula?: range first value 0 divided by size 2 = index 0 not used)
Not used [1]: byte range 4..8 (formula?: range first value 4 divided by size 2 = index 1 not used)

Is this correct? Is this internal info only nice to know for me?

Still don't really understand the figures 0..4 and 4..8 and the the term "byte range"...

Who is online

Users browsing this forum: No registered users and 1 guest