A forum for Spin users
You are not logged in.
I need to declare 2D arrays but using "short datatype" the verification is not proceeding and on run following is displayed
State-vector 1028 byte, depth reached 27, errors: 1
1 states, stored
0 states, matched
1 transitions (= stored+matched)
27 atomic steps
hash conflicts: 0 (resolved)
2.539 memory usage (Mbyte)
I can't able to understand this
I am making 2D array as follows
typedef VECTOR1{
short vector1[c];
}
VECTOR free[r];
VECTOR used[r];
Please have a look at code and propose some solution
Offline
When I use byte the complete model is working ok. but when I change it to short it gives the result as mentioned. I need actually 12 bits. I think 12 bits will work in my model.
By 16 bits(short) even the execution cannot proceed from the start.
By 8 bits(byte) everything is ok but there is truncation when I use simulation/run.
Please give me some reason for this. I think it is state explosion. I do not know whether I am right or wrong.
I need a solution for how to make a 12 bit 2-D array to avoid this problem.
Offline
Is there any way to declare 12 bit array or not.
Is this a problem of state explosion.
Offline
[u]Here when I am sending the complete model. It gives me the following errer.[/u]
406 not acceptable
An appropriate representation of the requested resource /fluxbb/post.php could not be found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Offline
Can u plz tell me how to declare a 12 bit 2 d array
Offline
typedef U {
unsigned v : 12;
};
typedef Vector {
U w[5];
};
Vector f[2];
init {
f[1].w[2].v = 3
}
this is one way to define it. note though that how the compiler will represent
these data structures during verification is not defined: so if you want to use
the 12-bit quantity in an effort to reduce memory use, this may not have the
desired effect. (the compiler will likely pad the 12-bit structure to 16 or 32 bits
to achieve proper word alignment -- but all that would be beyond the control
of spin and the model)
Offline