From ff11673a9c3f1017ab1b3ba410414f04836a6af4 Mon Sep 17 00:00:00 2001 From: Edmond Cote Date: Sat, 13 Jan 2018 13:29:22 -0800 Subject: [PATCH 1/2] remove string type ambiguity in header I ran into a compilation issue. This link explains the problem well: https://stackoverflow.com/a/5499222/3736700 For example, in a header file, it is generally not considered a good idea to put the line using namespace std; (or to use any namespace, for that matter) because it can cause names in files that include that header to become ambiguous. In this setup, you would just #include in the header, then use std::string to refer to the string type. --- csrc/verilator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csrc/verilator.h b/csrc/verilator.h index b4cd0659..d5ada6c0 100644 --- a/csrc/verilator.h +++ b/csrc/verilator.h @@ -12,7 +12,7 @@ class VerilatedVcdFILE : public VerilatedVcdFile { public: VerilatedVcdFILE(FILE* file) : file(file) {} ~VerilatedVcdFILE() {} - bool open(const string& name) override { + bool open(const std::string& name) override { // file should already be open return file != NULL; } From 80ca018e3ad923f39476edec5b6e7d8a780e7210 Mon Sep 17 00:00:00 2001 From: Jacob Chang Date: Mon, 15 Jan 2018 18:00:29 -0800 Subject: [PATCH 2/2] Add cover points for BusErrorUnit (#1193) --- src/main/scala/rocket/BusErrorUnit.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/scala/rocket/BusErrorUnit.scala b/src/main/scala/rocket/BusErrorUnit.scala index cb922ee2..b9834d70 100644 --- a/src/main/scala/rocket/BusErrorUnit.scala +++ b/src/main/scala/rocket/BusErrorUnit.scala @@ -12,6 +12,7 @@ import freechips.rocketchip.diplomacy._ import freechips.rocketchip.regmapper._ import freechips.rocketchip.tilelink._ import freechips.rocketchip.interrupts._ +import freechips.rocketchip.util.property._ trait BusErrors extends Bundle { def toErrorList: List[Option[Valid[UInt]]] @@ -59,6 +60,7 @@ class BusErrorUnit[T <: BusErrors](t: => T, params: BusErrorUnitParams)(implicit cause := i value := s.get.bits } + cover(en, s"BusErrorCause_$i", s"Core;;BusErrorCause $i covered") } }