yield dut.x_st_data_i.eq(value)
yield dut.x_st_i.eq(1)
yield dut.x_mask_i.eq(-1)
- yield dut.x_valid_i.eq(1)
+ yield dut.x_i_valid.eq(1)
yield dut.x_stall_i.eq(1)
- yield dut.m_valid_i.eq(1)
+ yield dut.m_i_valid.eq(1)
yield
yield
yield dut.x_stall_i.eq(0)
yield
+ yield
yield dut.x_st_i.eq(0)
while (yield dut.x_busy_o):
yield
def read_from_addr(dut, addr):
yield dut.x_addr_i.eq(addr)
yield dut.x_ld_i.eq(1)
- yield dut.x_valid_i.eq(1)
+ yield dut.x_i_valid.eq(1)
yield dut.x_stall_i.eq(1)
yield
yield dut.x_stall_i.eq(0)
yield Settle()
while (yield dut.x_busy_o):
yield
- assert (yield dut.x_valid_i)
+ assert (yield dut.x_i_valid)
return (yield dut.m_ld_data_o)
yield dut.x_st_i.eq(1)
yield dut.x_mask_i.eq(1 << offset)
print("write_byte", addr, bin(1 << offset), hex(val << (offset*8)))
- yield dut.x_valid_i.eq(1)
- yield dut.m_valid_i.eq(1)
+ yield dut.x_i_valid.eq(1)
+ yield dut.m_i_valid.eq(1)
yield
yield dut.x_st_i.eq(0)
offset = addr & 0x3
yield dut.x_addr_i.eq(addr)
yield dut.x_ld_i.eq(1)
- yield dut.x_valid_i.eq(1)
+ yield dut.x_i_valid.eq(1)
yield
yield dut.x_ld_i.eq(0)
yield Settle()
while (yield dut.x_busy_o):
yield
- assert (yield dut.x_valid_i)
+ assert (yield dut.x_i_valid)
val = (yield dut.m_ld_data_o)
print("read_byte", addr, offset, hex(val))
return (val >> (offset * 8)) & 0xff
pspec = TestMemPspec(ldst_ifacetype=ifacetype,
imem_ifacetype='', addr_wid=64,
mask_wid=4,
- wb_data_wid=32,
- reg_wid=64)
+ wb_data_wid=16,
+ reg_wid=32)
dut = ConfigLoadStoreUnit(pspec).lsi
vl = rtlil.convert(dut, ports=[]) # TODOdut.ports())
with open("test_loadstore_%s.il" % ifacetype, "w") as f:
def process():
- values = [random.randint(0, 255) for x in range(16*4)]
+ values = [random.randint(0, 255) for x in range(0)]
for addr, val in enumerate(values):
yield from write_byte(dut, addr, val)
x = yield from read_from_addr(dut, addr << 2)