Skip to content

Memory requirement for new test framework #157

@stnolting

Description

@stnolting

I'm trying to port the new test framework to a custom RISC-V core.

While testing each of the new tests I came across the jump/branch tests - for example the I/jal-01.S test:

inst_0:
// rd==x21, imm_val < 0, 
// opcode: jal; dest:x21; immval:0x55556; align:0
TEST_JAL_OP(x13, x21, 0x55556, 1b, x2, 0,0)

As far as I can see the "immval" (=0x55556) in this test case defines the "distance" or offset of the jump-and-link target by inserting NOPs. Thus, the generated program requires more than 400kB of program memory - mainly consisting of NOPs.

My question - part 1:
What is the purpose of this large offset? I think the actual functionality could also be tested even with smaller offsets.
Or is the intention to test all/most of JAL's 20-bit offset capabilities?

My question - part 2:
Is there any option to globally reduce these large offsets to generate a smaller program? For example if the targeted processor is memory-limited (let's say a small microcontroller with only a few kB of memory)?
Or is this not possible as the reference results include data words that are based on these (fixed?) large offsets?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions