bsp:lib:sim_ctrl: add dump wave api

Signed-off-by: liangkangnan <liangkangnan@163.com>
pull/4/head
liangkangnan 2021-08-20 11:51:49 +08:00
parent 92e1e5a77a
commit 08492931fc
2 changed files with 10 additions and 0 deletions

View File

@ -3,8 +3,10 @@
#define SIM_END_REG 0xE0000000 #define SIM_END_REG 0xE0000000
#define SIM_STDOUT_REG 0xE0000004 #define SIM_STDOUT_REG 0xE0000004
#define SIM_DUMP_REG 0xE0000008
void sim_ctrl_init(); void sim_ctrl_init();
void sim_end(); void sim_end();
void sim_dump_enable(uint8_t en);
#endif #endif

View File

@ -17,3 +17,11 @@ void sim_end()
{ {
*(volatile int *)SIM_END_REG = 1; *(volatile int *)SIM_END_REG = 1;
} }
void sim_dump_enable(uint8_t en)
{
if (en)
*(volatile int *)SIM_DUMP_REG = 1;
else
*(volatile int *)SIM_DUMP_REG = 0;
}