Skip to content

Enable SW optimzation O1#549

Open
engdoreis wants to merge 7 commits into
lowRISC:mainfrom
engdoreis:optimize_sw
Open

Enable SW optimzation O1#549
engdoreis wants to merge 7 commits into
lowRISC:mainfrom
engdoreis:optimize_sw

Conversation

@engdoreis
Copy link
Copy Markdown
Collaborator

@engdoreis engdoreis commented May 13, 2026

I also resolved some tests that failed due to timing issues triggered by the optimization.
Opensbi load before:

     Start  2: opensbi_with_opensbi_test_payload_fpga_genesys2
1/37 Test  #2: opensbi_with_opensbi_test_payload_fpga_genesys2 .......   Passed   31.02 sec

After:

      Start  2: opensbi_with_opensbi_test_payload_fpga_genesys2
 1/37 Test  #2: opensbi_with_opensbi_test_payload_fpga_genesys2 .......   Passed   25.27 sec

fix #550

engdoreis added 6 commits May 13, 2026 11:00
Signed-off-by: Douglas Reis <doreis@lowrisc.org>
Signed-off-by: Douglas Reis <doreis@lowrisc.org>
This makes sure that bootrom logs don't interfer with tests.
Also make sure that test logs are printed before the simulation is
finished.

Signed-off-by: Douglas Reis <doreis@lowrisc.org>
The test was sensitive to timing, when optimization was enabled it would
fails as the loop back transmission would not have finished in time for
checking.

Signed-off-by: Douglas Reis <doreis@lowrisc.org>
Signed-off-by: Douglas Reis <doreis@lowrisc.org>
The error manifest when optimization is enabled

Signed-off-by: Douglas Reis <doreis@lowrisc.org>
@engdoreis engdoreis force-pushed the optimize_sw branch 2 times, most recently from f4b15db to 7fb7881 Compare May 13, 2026 12:40
This makes binaries smaller and faster to run tests

Signed-off-by: Douglas Reis <doreis@lowrisc.org>
@engdoreis engdoreis requested review from marnovandermaas and ziuziakowska and removed request for ziuziakowska May 13, 2026 12:51
Copy link
Copy Markdown
Contributor

@ziuziakowska ziuziakowska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

void *dv_test_status = mocha_system_dv_test_status();

uart_init(console);
//Flush the uart
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//Flush the uart
// Flush the uart

Comment on lines +82 to +89
while (!uart_status_any(console, uart_status_txidle)) {
};
DEV_WRITE(dv_test_status, TEST_STATUS_IN_TEST);

bool result = test_main(console);
//Flush the uart
while (!uart_status_any(console, uart_status_txidle)) {
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this could be a uart_flush function in the HAL? Seems useful, and should maybe be called by uart_init too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable SW optimization

2 participants