2014-09-13 00:31:38 +02:00
|
|
|
// See LICENSE for license details.
|
|
|
|
|
2013-11-08 00:42:10 +01:00
|
|
|
package uncore
|
2013-11-07 22:19:04 +01:00
|
|
|
|
|
|
|
import Chisel._
|
2015-07-23 23:58:46 +02:00
|
|
|
import Chisel.ImplicitConversions._
|
2015-10-06 06:41:46 +02:00
|
|
|
import junctions._
|
2016-02-18 06:29:29 +01:00
|
|
|
import junctions.NastiConstants._
|
2015-10-22 03:16:44 +02:00
|
|
|
import cde.{Parameters, Field}
|
2015-10-06 06:41:46 +02:00
|
|
|
|
|
|
|
case object HtifKey extends Field[HtifParameters]
|
|
|
|
|
2016-01-28 23:06:38 +01:00
|
|
|
case class HtifParameters(width: Int, nCores: Int, offsetBits: Int, csrDataBits: Int, nSCR: Int = 64)
|
2015-10-06 06:41:46 +02:00
|
|
|
|
|
|
|
trait HasHtifParameters {
|
|
|
|
implicit val p: Parameters
|
2016-01-28 23:06:38 +01:00
|
|
|
val htifExternal = p(HtifKey)
|
2015-10-14 08:42:28 +02:00
|
|
|
val dataBits = p(TLKey(p(TLId))).dataBitsPerBeat
|
|
|
|
val dataBeats = p(TLKey(p(TLId))).dataBeats
|
2016-01-28 23:06:38 +01:00
|
|
|
val w = htifExternal.width
|
|
|
|
val nSCR = htifExternal.nSCR
|
2015-10-14 08:42:28 +02:00
|
|
|
val scrAddrBits = log2Up(nSCR)
|
|
|
|
val scrDataBits = 64
|
|
|
|
val scrDataBytes = scrDataBits / 8
|
2016-01-28 23:06:38 +01:00
|
|
|
val csrDataBits = htifExternal.csrDataBits
|
|
|
|
val csrDataBytes = csrDataBits / 8
|
|
|
|
val offsetBits = htifExternal.offsetBits
|
|
|
|
val nCores = htifExternal.nCores
|
2014-08-25 04:27:58 +02:00
|
|
|
}
|
|
|
|
|
2015-10-06 06:41:46 +02:00
|
|
|
abstract class HtifModule(implicit val p: Parameters) extends Module with HasHtifParameters
|
|
|
|
abstract class HtifBundle(implicit val p: Parameters) extends ParameterizedBundle()(p)
|
|
|
|
with HasHtifParameters
|
2014-08-25 04:27:58 +02:00
|
|
|
|
2015-10-14 08:42:28 +02:00
|
|
|
class HostIO(w: Int) extends Bundle {
|
2013-11-07 22:19:04 +01:00
|
|
|
val clk = Bool(OUTPUT)
|
|
|
|
val clk_edge = Bool(OUTPUT)
|
|
|
|
val in = Decoupled(Bits(width = w)).flip
|
|
|
|
val out = Decoupled(Bits(width = w))
|
2016-03-14 22:12:21 +01:00
|
|
|
|
|
|
|
override def cloneType = new HostIO(w).asInstanceOf[this.type]
|
2013-11-07 22:19:04 +01:00
|
|
|
}
|
|
|
|
|
2015-10-06 06:41:46 +02:00
|
|
|
class HtifIO(implicit p: Parameters) extends HtifBundle()(p) {
|
2013-11-07 22:19:04 +01:00
|
|
|
val reset = Bool(INPUT)
|
2014-08-25 04:27:58 +02:00
|
|
|
val id = UInt(INPUT, log2Up(nCores))
|
2016-01-28 23:06:38 +01:00
|
|
|
val csr = new SmiIO(csrDataBits, 12).flip
|
2013-11-07 22:19:04 +01:00
|
|
|
}
|
|
|
|
|
2015-10-06 06:41:46 +02:00
|
|
|
class Htif(csr_RESET: Int)(implicit val p: Parameters) extends Module with HasHtifParameters {
|
2015-09-11 02:53:42 +02:00
|
|
|
val io = new Bundle {
|
2015-10-14 08:42:28 +02:00
|
|
|
val host = new HostIO(w)
|
2016-01-14 22:47:47 +01:00
|
|
|
val cpu = Vec(nCores, new HtifIO).flip
|
2015-04-18 01:55:20 +02:00
|
|
|
val mem = new ClientUncachedTileLinkIO
|
2016-01-12 01:18:44 +01:00
|
|
|
val scr = new SmiIO(scrDataBits, scrAddrBits)
|
2015-09-11 02:53:42 +02:00
|
|
|
}
|
2014-08-08 21:21:57 +02:00
|
|
|
|
2013-11-07 22:19:04 +01:00
|
|
|
val short_request_bits = 64
|
2014-12-07 12:02:20 +01:00
|
|
|
val long_request_bits = short_request_bits + dataBits*dataBeats
|
2013-11-07 22:19:04 +01:00
|
|
|
require(short_request_bits % w == 0)
|
|
|
|
|
|
|
|
val rx_count_w = 13 + log2Up(64) - log2Up(w) // data size field is 12 bits
|
|
|
|
val rx_count = Reg(init=UInt(0,rx_count_w))
|
|
|
|
val rx_shifter = Reg(Bits(width = short_request_bits))
|
|
|
|
val rx_shifter_in = Cat(io.host.in.bits, rx_shifter(short_request_bits-1,w))
|
|
|
|
val next_cmd = rx_shifter_in(3,0)
|
|
|
|
val cmd = Reg(Bits())
|
|
|
|
val size = Reg(Bits())
|
|
|
|
val pos = Reg(Bits())
|
|
|
|
val seqno = Reg(Bits())
|
|
|
|
val addr = Reg(Bits())
|
|
|
|
when (io.host.in.valid && io.host.in.ready) {
|
|
|
|
rx_shifter := rx_shifter_in
|
|
|
|
rx_count := rx_count + UInt(1)
|
|
|
|
when (rx_count === UInt(short_request_bits/w-1)) {
|
|
|
|
cmd := next_cmd
|
|
|
|
size := rx_shifter_in(15,4)
|
2014-04-02 02:14:45 +02:00
|
|
|
pos := rx_shifter_in(15,4+offsetBits-3)
|
2013-11-07 22:19:04 +01:00
|
|
|
seqno := rx_shifter_in(23,16)
|
|
|
|
addr := rx_shifter_in(63,24)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-08-04 22:15:17 +02:00
|
|
|
val rx_word_count = (rx_count >> log2Up(short_request_bits/w))
|
2013-11-07 22:19:04 +01:00
|
|
|
val rx_word_done = io.host.in.valid && rx_count(log2Up(short_request_bits/w)-1,0).andR
|
|
|
|
val packet_ram_depth = long_request_bits/short_request_bits-1
|
2015-09-30 23:36:49 +02:00
|
|
|
val packet_ram = Mem(packet_ram_depth, Bits(width = short_request_bits))
|
2013-11-07 22:19:04 +01:00
|
|
|
when (rx_word_done && io.host.in.ready) {
|
|
|
|
packet_ram(rx_word_count(log2Up(packet_ram_depth)-1,0) - UInt(1)) := rx_shifter_in
|
|
|
|
}
|
|
|
|
|
|
|
|
val cmd_readmem :: cmd_writemem :: cmd_readcr :: cmd_writecr :: cmd_ack :: cmd_nack :: Nil = Enum(UInt(), 6)
|
|
|
|
|
2015-10-06 06:41:46 +02:00
|
|
|
val csr_addr = addr(io.cpu(0).csr.req.bits.addr.getWidth-1, 0)
|
|
|
|
val csr_coreid = addr(log2Up(nCores)-1+20+1,20)
|
|
|
|
val csr_wdata = packet_ram(0)
|
2013-11-07 22:19:04 +01:00
|
|
|
|
2014-04-02 02:14:45 +02:00
|
|
|
val bad_mem_packet = size(offsetBits-1-3,0).orR || addr(offsetBits-1-3,0).orR
|
2013-11-07 22:19:04 +01:00
|
|
|
val nack = Mux(cmd === cmd_readmem || cmd === cmd_writemem, bad_mem_packet,
|
2016-01-14 22:47:47 +01:00
|
|
|
Mux(cmd === cmd_readcr || cmd === cmd_writecr, size =/= UInt(1),
|
2013-11-07 22:19:04 +01:00
|
|
|
Bool(true)))
|
|
|
|
|
|
|
|
val tx_count = Reg(init=UInt(0, rx_count_w))
|
|
|
|
val tx_subword_count = tx_count(log2Up(short_request_bits/w)-1,0)
|
|
|
|
val tx_word_count = tx_count(rx_count_w-1, log2Up(short_request_bits/w))
|
|
|
|
val packet_ram_raddr = tx_word_count(log2Up(packet_ram_depth)-1,0) - UInt(1)
|
|
|
|
when (io.host.out.valid && io.host.out.ready) {
|
|
|
|
tx_count := tx_count + UInt(1)
|
|
|
|
}
|
|
|
|
|
2016-01-14 22:47:47 +01:00
|
|
|
val rx_done = rx_word_done && Mux(rx_word_count === UInt(0), next_cmd =/= cmd_writemem && next_cmd =/= cmd_writecr, rx_word_count === size || rx_word_count(log2Up(packet_ram_depth)-1,0) === UInt(0))
|
2013-11-07 22:19:04 +01:00
|
|
|
val tx_size = Mux(!nack && (cmd === cmd_readmem || cmd === cmd_readcr || cmd === cmd_writecr), size, UInt(0))
|
|
|
|
val tx_done = io.host.out.ready && tx_subword_count.andR && (tx_word_count === tx_size || tx_word_count > UInt(0) && packet_ram_raddr.andR)
|
|
|
|
|
2015-10-06 06:41:46 +02:00
|
|
|
val state_rx :: state_csr_req :: state_csr_resp :: state_mem_rreq :: state_mem_wreq :: state_mem_rresp :: state_mem_wresp :: state_tx :: Nil = Enum(UInt(), 8)
|
2013-11-07 22:19:04 +01:00
|
|
|
val state = Reg(init=state_rx)
|
|
|
|
|
2015-03-24 10:06:53 +01:00
|
|
|
val (cnt, cnt_done) = Counter((state === state_mem_wreq && io.mem.acquire.ready) ||
|
|
|
|
(state === state_mem_rresp && io.mem.grant.valid), dataBeats)
|
2013-11-07 22:19:04 +01:00
|
|
|
val rx_cmd = Mux(rx_word_count === UInt(0), next_cmd, cmd)
|
|
|
|
when (state === state_rx && rx_done) {
|
2014-03-29 18:53:49 +01:00
|
|
|
state := Mux(rx_cmd === cmd_readmem, state_mem_rreq,
|
|
|
|
Mux(rx_cmd === cmd_writemem, state_mem_wreq,
|
2015-10-06 06:41:46 +02:00
|
|
|
Mux(rx_cmd === cmd_readcr || rx_cmd === cmd_writecr, state_csr_req,
|
2014-03-29 18:53:49 +01:00
|
|
|
state_tx)))
|
2013-11-07 22:19:04 +01:00
|
|
|
}
|
2014-12-07 12:02:20 +01:00
|
|
|
when (state === state_mem_wreq) {
|
|
|
|
when (cnt_done) { state := state_mem_wresp }
|
2013-11-07 22:19:04 +01:00
|
|
|
}
|
2014-12-07 12:02:20 +01:00
|
|
|
when (state === state_mem_rreq) {
|
|
|
|
when(io.mem.acquire.ready) { state := state_mem_rresp }
|
2013-11-07 22:19:04 +01:00
|
|
|
}
|
2015-03-24 10:06:53 +01:00
|
|
|
when (state === state_mem_wresp && io.mem.grant.valid) {
|
|
|
|
state := Mux(cmd === cmd_readmem || pos === UInt(1), state_tx, state_rx)
|
|
|
|
pos := pos - UInt(1)
|
|
|
|
addr := addr + UInt(1 << offsetBits-3)
|
2013-11-07 22:19:04 +01:00
|
|
|
}
|
2015-03-24 10:06:53 +01:00
|
|
|
when (state === state_mem_rresp && cnt_done) {
|
2013-11-07 22:19:04 +01:00
|
|
|
state := Mux(cmd === cmd_readmem || pos === UInt(1), state_tx, state_rx)
|
|
|
|
pos := pos - UInt(1)
|
2014-04-02 02:14:45 +02:00
|
|
|
addr := addr + UInt(1 << offsetBits-3)
|
2013-11-07 22:19:04 +01:00
|
|
|
}
|
|
|
|
when (state === state_tx && tx_done) {
|
|
|
|
when (tx_word_count === tx_size) {
|
|
|
|
rx_count := UInt(0)
|
|
|
|
tx_count := UInt(0)
|
|
|
|
}
|
2016-01-14 22:47:47 +01:00
|
|
|
state := Mux(cmd === cmd_readmem && pos =/= UInt(0), state_mem_rreq, state_rx)
|
2013-11-07 22:19:04 +01:00
|
|
|
}
|
|
|
|
|
2015-02-02 04:57:53 +01:00
|
|
|
val n = dataBits/short_request_bits
|
|
|
|
val mem_req_data = (0 until n).map { i =>
|
2016-05-26 05:39:53 +02:00
|
|
|
def addr(offset: UInt) =
|
|
|
|
if (dataBits == short_request_bits) offset
|
|
|
|
else Cat(offset, UInt(i, log2Up(n)))
|
2014-03-29 18:53:49 +01:00
|
|
|
when (state === state_mem_rresp && io.mem.grant.valid) {
|
2016-05-26 05:39:53 +02:00
|
|
|
packet_ram(addr(io.mem.grant.bits.addr_beat)) :=
|
2015-03-24 10:06:53 +01:00
|
|
|
io.mem.grant.bits.data((i+1)*short_request_bits-1, i*short_request_bits)
|
2013-11-07 22:19:04 +01:00
|
|
|
}
|
2016-05-26 05:39:53 +02:00
|
|
|
packet_ram(addr(cnt))
|
2015-02-02 04:57:53 +01:00
|
|
|
}.reverse.reduce(_##_)
|
|
|
|
|
2015-08-04 22:15:17 +02:00
|
|
|
val init_addr = addr.toUInt >> (offsetBits-3)
|
2014-12-07 12:02:20 +01:00
|
|
|
io.mem.acquire.valid := state === state_mem_rreq || state === state_mem_wreq
|
2015-03-10 00:34:59 +01:00
|
|
|
io.mem.acquire.bits := Mux(cmd === cmd_writemem,
|
2015-03-01 02:02:13 +01:00
|
|
|
PutBlock(
|
2015-02-02 04:57:53 +01:00
|
|
|
addr_block = init_addr,
|
|
|
|
addr_beat = cnt,
|
|
|
|
client_xact_id = UInt(0),
|
2015-05-14 21:37:35 +02:00
|
|
|
data = mem_req_data),
|
2015-03-01 02:02:13 +01:00
|
|
|
GetBlock(addr_block = init_addr))
|
2015-03-24 10:06:53 +01:00
|
|
|
io.mem.grant.ready := Bool(true)
|
2013-11-07 22:19:04 +01:00
|
|
|
|
2015-10-06 06:41:46 +02:00
|
|
|
val csrReadData = Reg(Bits(width = io.cpu(0).csr.resp.bits.getWidth))
|
2014-08-08 21:21:57 +02:00
|
|
|
for (i <- 0 until nCores) {
|
2013-11-07 22:19:04 +01:00
|
|
|
val my_reset = Reg(init=Bool(true))
|
|
|
|
|
|
|
|
val cpu = io.cpu(i)
|
2015-10-06 06:41:46 +02:00
|
|
|
val me = csr_coreid === UInt(i)
|
2016-01-14 22:47:47 +01:00
|
|
|
cpu.csr.req.valid := state === state_csr_req && me && csr_addr =/= UInt(csr_RESET)
|
2015-10-06 06:41:46 +02:00
|
|
|
cpu.csr.req.bits.rw := cmd === cmd_writecr
|
|
|
|
cpu.csr.req.bits.addr := csr_addr
|
|
|
|
cpu.csr.req.bits.data := csr_wdata
|
2013-11-07 22:19:04 +01:00
|
|
|
cpu.reset := my_reset
|
|
|
|
|
2015-10-06 06:41:46 +02:00
|
|
|
when (cpu.csr.req.fire()) { state := state_csr_resp }
|
2015-09-01 23:47:18 +02:00
|
|
|
|
2015-10-06 06:41:46 +02:00
|
|
|
when (state === state_csr_req && me && csr_addr === UInt(csr_RESET)) {
|
2013-11-07 22:19:04 +01:00
|
|
|
when (cmd === cmd_writecr) {
|
2015-10-06 06:41:46 +02:00
|
|
|
my_reset := csr_wdata(0)
|
2013-11-07 22:19:04 +01:00
|
|
|
}
|
2015-10-06 06:41:46 +02:00
|
|
|
csrReadData := my_reset.toBits
|
2013-11-07 22:19:04 +01:00
|
|
|
state := state_tx
|
|
|
|
}
|
|
|
|
|
2015-10-06 06:41:46 +02:00
|
|
|
cpu.csr.resp.ready := Bool(true)
|
|
|
|
when (state === state_csr_resp && cpu.csr.resp.valid) {
|
|
|
|
csrReadData := cpu.csr.resp.bits
|
2013-11-07 22:19:04 +01:00
|
|
|
state := state_tx
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-10-06 06:41:46 +02:00
|
|
|
io.scr.req.valid := (state === state_csr_req && csr_coreid.andR)
|
2015-09-01 23:47:18 +02:00
|
|
|
io.scr.req.bits.addr := addr(scrAddrBits - 1, 0).toUInt
|
2015-10-06 06:41:46 +02:00
|
|
|
io.scr.req.bits.data := csr_wdata
|
2015-09-01 23:47:18 +02:00
|
|
|
io.scr.req.bits.rw := (cmd === cmd_writecr)
|
|
|
|
io.scr.resp.ready := Bool(true)
|
|
|
|
|
2015-10-06 06:41:46 +02:00
|
|
|
when (io.scr.req.fire()) { state := state_csr_resp }
|
|
|
|
when (state === state_csr_resp && io.scr.resp.valid) {
|
|
|
|
csrReadData := io.scr.resp.bits
|
2013-11-07 22:19:04 +01:00
|
|
|
state := state_tx
|
|
|
|
}
|
|
|
|
|
|
|
|
val tx_cmd = Mux(nack, cmd_nack, cmd_ack)
|
|
|
|
val tx_cmd_ext = Cat(Bits(0, 4-tx_cmd.getWidth), tx_cmd)
|
|
|
|
val tx_header = Cat(addr, seqno, tx_size, tx_cmd_ext)
|
|
|
|
val tx_data = Mux(tx_word_count === UInt(0), tx_header,
|
2015-10-06 06:41:46 +02:00
|
|
|
Mux(cmd === cmd_readcr || cmd === cmd_writecr, csrReadData,
|
2013-11-07 22:19:04 +01:00
|
|
|
packet_ram(packet_ram_raddr)))
|
|
|
|
|
|
|
|
io.host.in.ready := state === state_rx
|
|
|
|
io.host.out.valid := state === state_tx
|
|
|
|
io.host.out.bits := tx_data >> Cat(tx_count(log2Up(short_request_bits/w)-1,0), Bits(0, log2Up(w)))
|
|
|
|
}
|
2016-02-18 06:29:29 +01:00
|
|
|
|
|
|
|
class NastiIOHostIOConverter(htifW: Int)(implicit val p: Parameters)
|
|
|
|
extends Module with HasNastiParameters {
|
|
|
|
val io = new Bundle {
|
|
|
|
val nasti = (new NastiIO).flip
|
|
|
|
val host = new HostIO(htifW).flip
|
|
|
|
val reset = Bool(OUTPUT)
|
|
|
|
}
|
|
|
|
|
2016-03-14 22:12:21 +01:00
|
|
|
def cloneType = new NastiIOHostIOConverter(htifW).asInstanceOf[this.type]
|
|
|
|
|
2016-02-18 06:29:29 +01:00
|
|
|
val raddr = io.nasti.ar.bits.addr(6, 2)
|
|
|
|
val waddr = io.nasti.aw.bits.addr(6, 2)
|
|
|
|
|
|
|
|
|
|
|
|
val DCOUNT_ADDR = 0x00
|
|
|
|
val RFIFO_ADDR = 0x01
|
|
|
|
|
|
|
|
val WFIFO_ADDR = 0x00
|
|
|
|
val RESET_ADDR = 0x1f
|
|
|
|
|
|
|
|
val FIFO_DEPTH = 32
|
|
|
|
|
|
|
|
val fifo_ren = Reg(init = Bool(false))
|
|
|
|
val fifo_wen = Reg(init = Bool(false))
|
|
|
|
|
|
|
|
val fifo_rd_len = Reg(UInt(width = nastiXLenBits))
|
|
|
|
val fifo_rd_id = Reg(UInt(width = nastiXIdBits))
|
|
|
|
val fifo_wr_id = Reg(UInt(width = nastiXIdBits))
|
|
|
|
val fifo_wr_ack = Reg(init = Bool(false))
|
|
|
|
|
|
|
|
val rd_count = Reg(init = Bool(false))
|
|
|
|
val wr_reset = Reg(init = Bool(false))
|
|
|
|
|
|
|
|
when (io.nasti.ar.fire()) {
|
|
|
|
fifo_rd_len := io.nasti.ar.bits.len
|
|
|
|
fifo_rd_id := io.nasti.ar.bits.id
|
|
|
|
when (raddr === UInt(RFIFO_ADDR)) {
|
|
|
|
fifo_ren := Bool(true)
|
|
|
|
} .elsewhen (raddr === UInt(DCOUNT_ADDR)) {
|
|
|
|
rd_count := Bool(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
when (io.nasti.r.fire()) {
|
|
|
|
when (io.nasti.r.bits.last) {
|
|
|
|
fifo_ren := Bool(false)
|
|
|
|
rd_count := Bool(false)
|
|
|
|
} .otherwise { fifo_rd_len := fifo_rd_len - UInt(1) }
|
|
|
|
}
|
|
|
|
|
|
|
|
when (io.nasti.aw.fire()) {
|
|
|
|
fifo_wr_id := io.nasti.aw.bits.id
|
|
|
|
when (waddr === UInt(WFIFO_ADDR)) {
|
|
|
|
fifo_wen := Bool(true)
|
|
|
|
} .elsewhen (waddr === UInt(RESET_ADDR)) {
|
|
|
|
wr_reset := Bool(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
when (io.nasti.w.fire() && io.nasti.w.bits.last) {
|
|
|
|
fifo_wen := Bool(false)
|
|
|
|
wr_reset := Bool(false)
|
|
|
|
fifo_wr_ack := Bool(true)
|
|
|
|
}
|
|
|
|
|
|
|
|
when (io.nasti.b.fire()) { fifo_wr_ack := Bool(false) }
|
|
|
|
|
|
|
|
io.nasti.ar.ready := !fifo_ren
|
|
|
|
io.nasti.aw.ready := !fifo_wen && !fifo_wr_ack
|
|
|
|
io.nasti.b.valid := fifo_wr_ack
|
|
|
|
io.nasti.b.bits := NastiWriteResponseChannel(id = fifo_wr_id)
|
|
|
|
|
|
|
|
io.reset := io.nasti.w.valid && wr_reset
|
|
|
|
|
|
|
|
val hn_fifo = Module(new MultiWidthFifo(htifW, nastiXDataBits, FIFO_DEPTH))
|
|
|
|
hn_fifo.io.in <> io.host.out
|
|
|
|
hn_fifo.io.out.ready := fifo_ren && io.nasti.r.ready
|
|
|
|
io.nasti.r.valid := (fifo_ren && hn_fifo.io.out.valid) || rd_count
|
|
|
|
io.nasti.r.bits := NastiReadDataChannel(
|
|
|
|
id = fifo_rd_id,
|
|
|
|
data = Mux(fifo_ren, hn_fifo.io.out.bits, hn_fifo.io.count),
|
|
|
|
last = (fifo_rd_len === UInt(0)))
|
|
|
|
|
|
|
|
val nh_fifo = Module(new MultiWidthFifo(nastiXDataBits, htifW, FIFO_DEPTH))
|
|
|
|
io.host.in <> nh_fifo.io.out
|
|
|
|
nh_fifo.io.in.valid := fifo_wen && io.nasti.w.valid
|
|
|
|
nh_fifo.io.in.bits := io.nasti.w.bits.data
|
|
|
|
io.nasti.w.ready := (fifo_wen && nh_fifo.io.in.ready) || wr_reset
|
|
|
|
|
|
|
|
assert(!io.nasti.w.valid || io.nasti.w.bits.strb.andR,
|
|
|
|
"Nasti to HostIO converter cannot take partial writes")
|
|
|
|
assert(!io.nasti.ar.valid ||
|
|
|
|
io.nasti.ar.bits.len === UInt(0) ||
|
|
|
|
io.nasti.ar.bits.burst === BURST_FIXED,
|
|
|
|
"Nasti to HostIO converter can only take fixed bursts")
|
|
|
|
assert(!io.nasti.aw.valid ||
|
|
|
|
io.nasti.aw.bits.len === UInt(0) ||
|
|
|
|
io.nasti.aw.bits.burst === BURST_FIXED,
|
|
|
|
"Nasti to HostIO converter can only take fixed bursts")
|
|
|
|
}
|