Can we read and write from the same memory location in the same clock cycle. i.e., writing at the rising edge and reading at the falling edge from the same location. Is it possible to achieve?
regards
you cannot use dual edges inside an FPGA. But most FPGA memories are duel ported, so yet you can read and write on the same clock edge on the two different ports.
Does it mean I can access same memory location for reading and writing in the same clock cycle through different ports... Correct me if am wrong . Thank you.
such example is compiled by quartus without warnings and [quartus] netlist simulation
shows possibility of writing on rising edge and then reading the same location
on falling clock edge;
actually quartus inserts an inverter on the clock line and use
positive edges, like in the example, but it will accept also: always @(negedge clk) d_out <= ram[addr_out];