Forum Discussion
Altera_Forum
Honored Contributor
11 years agoOk - had another read. Instead of making the read enable and "else if " against the write enable, just make it a stand alone "if". You would never expect the read port to be controlled by the write_enable - they should not be mutually exclusive.
always @ (posedge clk_a)
begin
// Port A
if (we_a)
begin
ram <= data_a;
end
if (re_a)
begin
q_a <= ram;
end
end