-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
37 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,11 @@ | ||
#ifndef _ROCKET_VERILATOR_H | ||
#define _ROCKET_VERILATOR_H | ||
|
||
#include "verilated_vcd_c.h" | ||
#include "verilated_fst_c.h" | ||
#include <stdlib.h> | ||
#include <stdio.h> | ||
|
||
extern bool verbose; | ||
extern bool done_reset; | ||
|
||
class VerilatedVcdFILE : public VerilatedVcdFile { | ||
public: | ||
VerilatedVcdFILE(FILE* file) : file(file) {} | ||
~VerilatedVcdFILE() {} | ||
bool open(const std::string& name) override { | ||
// file should already be open | ||
return file != NULL; | ||
} | ||
void close() override { | ||
// file should be closed elsewhere | ||
} | ||
ssize_t write(const char* bufp, ssize_t len) override { | ||
return fwrite(bufp, 1, len, file); | ||
} | ||
private: | ||
FILE* file; | ||
}; | ||
|
||
#endif | ||
#endif |