Calyx specifies that, for a seq_memory_d1 if the port write_en is driven then write_data must also be driven through the write_together spec.
However, when the port content_en is 1 and port write_en is 0, it implies a read, so write_data need not be driven.
Since write_together is a safety mechanism can we just tell the emitter to not drive write_en when it is 0 and content_en is 1.
For example:
Instead of emitting this (which papercut pass complains about):
group bb0_1 {
std_slice_10.in = for_2_induction_var_reg.out;
arg_mem_0.addr0 = std_slice_10.out;
arg_mem_0.content_en = 1'b1;
arg_mem_0.write_en = 1'd0; <- unnecessary
bb0_1[done] = arg_mem_0.done;
}
we emit:
group bb0_1 {
std_slice_10.in = for_2_induction_var_reg.out;
arg_mem_0.addr0 = std_slice_10.out;
arg_mem_0.content_en = 1'b1;
bb0_1[done] = arg_mem_0.done;
}
Since, by default the value will be set to 0, these two will be equivalent and will satisfy the write_together spec as well.
Calyx specifies that, for a
seq_memory_d1if the portwrite_enis driven thenwrite_datamust also be driven through thewrite_togetherspec.However, when the port
content_enis1and portwrite_enis0, it implies a read, sowrite_dataneed not be driven.Since
write_togetheris a safety mechanism can we just tell the emitter to not drivewrite_enwhen it is0andcontent_enis1.For example:
Instead of emitting this (which
papercutpass complains about):we emit:
Since, by default the value will be set to
0, these two will be equivalent and will satisfy thewrite_togetherspec as well.