diff options
| author | ducky | 2015-11-03 12:57:58 -0800 |
|---|---|---|
| committer | ducky | 2015-11-03 12:59:27 -0800 |
| commit | 2ceb98ee2a203e2cb394f3f4b9cf0628e7485f6f (patch) | |
| tree | 5b5e9add278eb34f3aa08b484f37062a50532262 /src/main/scala/Chisel/Mem.scala | |
| parent | f9fe5da6f9ff79c17e57ef46dd9d885d51895535 (diff) | |
Add documentation on some non-intuitive parts
Diffstat (limited to 'src/main/scala/Chisel/Mem.scala')
| -rw-r--r-- | src/main/scala/Chisel/Mem.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/scala/Chisel/Mem.scala b/src/main/scala/Chisel/Mem.scala index 87f717b6..f4003c25 100644 --- a/src/main/scala/Chisel/Mem.scala +++ b/src/main/scala/Chisel/Mem.scala @@ -66,6 +66,9 @@ sealed abstract class MemBase[T <: Data](t: T, val length: Int) extends HasId wi * Writes take effect on the rising clock edge after the request. Reads are * combinational (requests will return data on the same cycle). * Read-after-write hazards are not an issue. + * + * @note when multiple conflicting writes are performed on a Mem element, the + * result is undefined (unlike Vec, where the last assignment wins) */ sealed class Mem[T <: Data](t: T, length: Int) extends MemBase(t, length) @@ -92,6 +95,9 @@ object SeqMem { * data on the rising edge after the request. Read-after-write behavior (when * a read and write to the same address are requested on the same cycle) is * undefined. + * + * @note when multiple conflicting writes are performed on a Mem element, the + * result is undefined (unlike Vec, where the last assignment wins) */ sealed class SeqMem[T <: Data](t: T, n: Int) extends MemBase[T](t, n) { def read(addr: UInt, enable: Bool): T = |
