-
Notifications
You must be signed in to change notification settings - Fork 0
/
HDMIfeeder.scala
30 lines (25 loc) · 959 Bytes
/
HDMIfeeder.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package Core
import Chisel._
class HDMIfeeder(data_width: Int, address_width: Int) extends Module{
val io = new Bundle {
val sram_0_bus_control = Bool(INPUT)
val sram_1_bus_control = Bool(INPUT)
val read_address = UInt(INPUT, address_width)
val sram_0_bus_data = UInt(OUTPUT, data_width)
val sram_1_bus_data = UInt(OUTPUT, data_width)
val ram_request_accepted = Bool(OUTPUT)
}
// clock sources and reset?
// video_unit in has clock_sys, at least 25mhz+some, clock_25, clock_125, clock_125n and reset
when(io.sram_1_bus_control){
// set ram_request_accepted outside?
io.ram_request_accepted := True
io.sram_1_bus_data := sram1(io.read_address)
}
// sufficient with otherwise?
when(io.sram_0_bus_control){
// set ram_request_accepted outside?
io.ram_request_accepted := True
io.sram_0_bus_data := sram0(io.read_address)
}
}