blob: b43421f5f22fe8a7340bf35fac625f61c6125f2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
#include "riscv_prelude.h"
#include "riscv_config.h"
#include "riscv_platform_impl.h"
unit print_string(sail_string prefix, sail_string msg)
{
printf("%s%s\n", prefix, msg);
return UNIT;
}
unit print_instr(sail_string s)
{
if (config_print_instr)
fprintf(trace_log, "%s\n", s);
return UNIT;
}
unit print_step(unit u)
{
if (config_print_step)
fprintf(trace_log, "\n");
return UNIT;
}
unit print_reg(sail_string s)
{
if (config_print_reg)
fprintf(trace_log, "%s\n", s);
return UNIT;
}
unit print_mem_access(sail_string s)
{
if (config_print_mem_access)
fprintf(trace_log, "%s\n", s);
return UNIT;
}
unit print_platform(sail_string s)
{
if (config_print_platform)
fprintf(trace_log, "%s\n", s);
return UNIT;
}
bool get_config_print_instr(unit u)
{
return (config_print_instr) ? true : false;
}
bool get_config_print_reg(unit u)
{
return (config_print_reg) ? true : false;
}
bool get_config_print_mem(unit u)
{
return (config_print_mem_access) ? true : false;
}
bool get_config_print_platform(unit u)
{
return (config_print_platform) ? true : false;
}
|