23 lines
766 B
Plaintext
23 lines
766 B
Plaintext
// A loop which can NOT be dynamically unrolled breaks longnail
|
|
// the increment of the loop variable errors as "out of region"
|
|
|
|
InstructionSet Zbb {
|
|
architectural_state {
|
|
unsigned int XLEN=32;
|
|
const register unsigned<32> XLEN_R = 32;
|
|
register unsigned<XLEN> X[32] [[is_main_reg]];
|
|
}
|
|
instructions {
|
|
TEST {
|
|
encoding: 12'b011000000000 :: rs1[4:0] :: 3'b001 :: rd[4:0] :: 7'b0010011;
|
|
assembly: "{name(rd)}, {name(rs1)}";
|
|
behavior: {
|
|
unsigned int count = XLEN_R;
|
|
for(unsigned int i=0; i<=rs1; i++){
|
|
count = 1;
|
|
}
|
|
X[rd] = count;
|
|
}
|
|
}
|
|
}
|
|
} |