Skip to content

Commit 02e406b

Browse files
working on memory
1 parent 2dfbeb6 commit 02e406b

3 files changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import chisel3._
2+
import chisel3.util._
3+
import _root_.circt.stage.ChiselStage
4+
5+
class Dispatcher extends Module {
6+
val io = IO(new Bundle {
7+
val read_requested = Output(Bool());
8+
val read_address = Output(UInt(8.W));
9+
val read_ready = Input(Bool());
10+
val read_data = Input(UInt(8.W));
11+
});
12+
13+
val memory = SRAM(1024, UInt(8.W), 2, 2);
14+
}

src/main/scala/main/Memory.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import chisel3._
2+
import chisel3.util._
3+
import _root_.circt.stage.ChiselStage
4+
5+
class Memory extends Module {
6+
val io = IO(new SRAMInterface(1024, UInt(8.W), 1, 1));
7+
8+
val memory = SRAM(1024, UInt(8.W), 1, 1);
9+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import chisel3._
2+
import chiseltest._
3+
import org.scalatest.flatspec.AnyFlatSpec
4+
5+
class DispatcherTest extends AnyFlatSpec with ChiselScalatestTester {
6+
"Dispatcher" should "work" in {
7+
test(new Dispatcher) { dut =>
8+
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)