if wrt_wv_cs=idle_wvalid then という行があるが、wrt_wv_cs は、Writeデータを扱うステートマシンなので、awlen のタイミングが遅延してしまう。これを awvalid と同期して変化するように Verilog HDL ソースを変更する。(ZedBoard用CMOSカメラ回路の作製2(HDLソースの公開1)を後ほど修正します)-- write_count の処理 (pfifo_rd_data_count は当てにならない。使わないほうが良い)
pfifo_rd_dcount_dec <= unsigned(pfifo_rd_data_count) - 1;
process(ACLK) begin
if ACLK'event and ACLK='1' then
if reset='1' then
write_count <= (others => '0');
awlen <= (others => '0');
else
if wrt_wv_cs=idle_wvalid then
if pfifo_rd_data_count/=std_logic_vector(to_unsigned(0, 9)) then
write_count <= std_logic_vector(pfifo_rd_dcount_dec(7 downto 0));
awlen <= std_logic_vector(pfifo_rd_dcount_dec(7 downto 0));
end if;
elsif wrt_wv_cs=wvalid_assert and M_AXI_WREADY='1' and unsigned(write_count)/=0 then
write_count <= std_logic_vector(unsigned(write_count) - 1);
end if;
end if;
end if;
end process;
日 | 月 | 火 | 水 | 木 | 金 | 土 |
---|---|---|---|---|---|---|
- | - | - | - | - | 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | - | - | - | - | - | - |