int rd_ports = cell->getParam("\\RD_PORTS").as_int();
int wr_ports = cell->getParam("\\WR_PORTS").as_int();
- decls.push_back(stringf("; yosys-smt2-memory %s %d %d %d %d\n", get_id(cell), abits, width, rd_ports, wr_ports));
-
bool async_read = false;
if (!cell->getParam("\\WR_CLK_ENABLE").is_fully_ones()) {
if (!cell->getParam("\\WR_CLK_ENABLE").is_fully_zero())
async_read = true;
}
+ decls.push_back(stringf("; yosys-smt2-memory %s %d %d %d %d %s\n", get_id(cell), abits, width, rd_ports, wr_ports, async_read ? "async" : "sync"));
+
string memstate;
if (async_read) {
memstate = stringf("%s#%d#final", get_id(module), arrayid);
mem_trace_data = dict()
for mempath in sorted(smt.hiermems(topmod)):
- abits, width, rports, wports = smt.mem_info(topmod, mempath)
+ abits, width, rports, wports, asyncwr = smt.mem_info(topmod, mempath)
expr_id = list()
expr_list = list()
else:
buf[k] = tdata[i][k]
- tdata.append(data[:])
+ if not asyncwr:
+ tdata.append(data[:])
for j_data in wdata[i]:
if j_data["A"] != addr:
if M[k] == "1":
data[k] = D[k]
+ if asyncwr:
+ tdata.append(data[:])
+
assert len(tdata) == len(rdata)
netpath = mempath[:]
mems = sorted(smt.hiermems(vlogtb_topmod))
for mempath in mems:
- abits, width, rports, wports = smt.mem_info(vlogtb_topmod, mempath)
+ abits, width, rports, wports, asyncwr = smt.mem_info(vlogtb_topmod, mempath)
addr_expr_list = list()
data_expr_list = list()
mems = sorted(smt.hiermems(constr_topmod))
for mempath in mems:
- abits, width, rports, wports = smt.mem_info(constr_topmod, mempath)
+ abits, width, rports, wports, asyncwr = smt.mem_info(constr_topmod, mempath)
addr_expr_list = list()
data_expr_list = list()
self.modinfo[self.curmod].wsize[fields[2]] = int(fields[3])
if fields[1] == "yosys-smt2-memory":
- self.modinfo[self.curmod].memories[fields[2]] = (int(fields[3]), int(fields[4]), int(fields[5]), int(fields[6]))
+ self.modinfo[self.curmod].memories[fields[2]] = (int(fields[3]), int(fields[4]), int(fields[5]), int(fields[6]), fields[7] == "async")
if fields[1] == "yosys-smt2-wire":
self.modinfo[self.curmod].wires.add(fields[2])