diff options
| author | Henry Cook | 2015-10-12 11:46:07 -0700 |
|---|---|---|
| committer | Henry Cook | 2015-10-12 11:46:07 -0700 |
| commit | a95c922b904ed6c564f1b19f75337128c9cd0d1f (patch) | |
| tree | 320c26aa2e2559fd40d5f3843c0f0bbc2659878d | |
| parent | 6a5a13e20fcf41fd146d05cc72ef2cea54757568 (diff) | |
| parent | 37bfa06ae7e1dba3c55a1da84b9390d347446953 (diff) | |
Merge pull request #15 from ucb-bar/readme
Update README with Mem(seqRead) -> SeqMem()
| -rw-r--r-- | README.md | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -17,6 +17,21 @@ modifications are: val wire = Wire(Bits(width = 15)) ``` + - Sequential memories: + ``` + val addr = Reg(UInt()) + val mem = Mem(UInt(width=8), 1024, seqRead = true) + val dout = when(enable) { mem(addr) } + ``` + becomes (in Chisel3): + ``` + val addr = UInt() + val mem = SeqMem(1024, UInt(width=8)) + val dout = mem.read(addr, enable) + ``` + Notice the address register is now internal to the SeqMem(), but the data + will still return on the subsequent cycle. + ## Getting Started ### Overview |
