Skip to content

Commit

Permalink
fix: preserve ui_in state after reset
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed May 21, 2024
1 parent a36d76b commit 8487c60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ let jmod = new HDLModuleWASM(res.output.modules['TOP'], res.output.modules['@CON
await jmod.init();

function reset() {
const ui_in = jmod.state.ui_in;
jmod.powercycle();
jmod.state.ena = 1;
jmod.state.rst_n = 0;
jmod.state.ui_in = ui_in;
jmod.tick2(10);
jmod.state.rst_n = 1;
}
Expand Down

0 comments on commit 8487c60

Please sign in to comment.