Quantcast
Channel: Cadence Functional Verification Forum
Viewing all articles
Browse latest Browse all 1074

Generate min/max values on modified bitslice scalar

$
0
0

Hi,

How do i generate min/max values on modified bit slice scalar?

For example i trying to do the following and Specman fail during generation:

"

gen_address(alignment : u64_t) : u64_t is
{
var bits_to_zero : int;

case (alignment)
{
2 : { bits_to_zero = 0; };
4 : { bits_to_zero = 1; };
8 : { bits_to_zero = 2; };
16 : { bits_to_zero = 3; };
32 : { bits_to_zero = 4; };
64 : { bits_to_zero = 5; };
128 : { bits_to_zero = 6; };
256 : { bits_to_zero = 7; };
512 : { bits_to_zero = 8; };
1024: { bits_to_zero = 9; };
2048: { bits_to_zero = 10; };
4096: { bits_to_zero = 11; };
};

gen result keeping
{
it[read_only(bits_to_zero):0] == 0; 
soft it[read_only(bits_to_zero)] == select {
40: min;
40: max;
20: others;
};
soft it.la_address[63:32] == select {
40: 0xAAAAAAAA;
40: 0xBBBBBBBB;
20: others;
};
};

"


Viewing all articles
Browse latest Browse all 1074

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>