Commit 4f4b361d authored by Dimitris Lampridis's avatar Dimitris Lampridis

hdl: [bugfix] fix message queue area selection during wb read cycles

This is a partial revert of fdc2c469, where the strobe signal was also
used to avoid double writes/reads (because the cycle signal lasts two cycles).

In practice this introduced a bug when doing a read cycle, where the data
is lost because it becomes available after the strobe is deasserted.

The solution is to stop looking at the strobe for area selection, but keep it
for defining the read/write cycle.
parent 1c12b54e
......@@ -64,17 +64,15 @@ architecture arch of mt_mqueue_wishbone_slave is
signal wb_write : std_logic;
signal wb_read : std_logic;
signal wb_en : std_logic;
begin -- arch
wb_en <= slave_i.cyc and slave_i.stb;
slot_num <= slave_i.adr(18 downto 16);
in_area_sel <= wb_en when slave_i.adr(15) = '0' else '0';
out_area_sel <= wb_en when slave_i.adr(15) = '1' else '0';
in_area_sel <= slave_i.cyc when slave_i.adr(15) = '0' else '0';
out_area_sel <= slave_i.cyc when slave_i.adr(15) = '1' else '0';
wb_write <= wb_en and slave_i.we;
wb_read <= wb_en and not slave_i.we;
wb_write <= slave_i.cyc and slave_i.stb and slave_i.we;
wb_read <= slave_i.cyc and slave_i.stb and not slave_i.we;
gen_slots : for i in 0 to g_CONFIG.slot_count-1 generate
incoming_o(i) <=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment