Skip to content

Commit 36f4b68

Browse files
committedMar 2, 2015
mibuild/sim: style fixes
1 parent 7d68ecb commit 36f4b68

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed
 

‎mibuild/sim/dut_tb.cpp

+11-7
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,19 @@ int getch(void)
6262
}
6363

6464
vluint64_t main_time = 0;
65-
double sc_time_stamp () {
65+
double sc_time_stamp()
66+
{
6667
return main_time;
6768
}
6869

6970
Vdut* dut;
7071
VerilatedVcdC* tfp;
7172
unsigned int tick;
7273

73-
/* ios */
7474
/* ios */
7575

76-
int console_service() {
76+
int console_service()
77+
{
7778
/* fpga --> console */
7879
SERIAL_SOURCE_ACK = 1;
7980
if(SERIAL_SOURCE_STB == 1) {
@@ -100,15 +101,17 @@ int console_service() {
100101
return 0;
101102
}
102103

103-
void sim_tick() {
104+
void sim_tick()
105+
{
104106
SYS_CLK = tick%2;
105107
dut->eval();
106108
if (trace)
107109
tfp->dump(tick);
108110
tick++;
109111
}
110112

111-
void sim_init() {
113+
void sim_init()
114+
{
112115
int i;
113116
tick = 0;
114117
#ifdef SYS_RST
@@ -120,7 +123,8 @@ void sim_init() {
120123
#endif
121124
}
122125

123-
int main(int argc, char **argv, char **env) {
126+
int main(int argc, char **argv, char **env)
127+
{
124128

125129
clock_t start;
126130
clock_t end;
@@ -150,7 +154,7 @@ int main(int argc, char **argv, char **env) {
150154

151155
speed = (tick/2)/((end-start)/CLOCKS_PER_SEC);
152156

153-
printf("averate speed: %3.3f MHz\n\r", speed/1000000);
157+
printf("average speed: %3.3f MHz\n\r", speed/1000000);
154158

155159
tfp->close();
156160

0 commit comments

Comments
 (0)
Please sign in to comment.