diff --git a/modules/genrams/altera/generic_async_fifo.vhd b/modules/genrams/altera/generic_async_fifo.vhd index 346f44dcb337208301478d2b57128c4ec7233b9a..33508b55ac10ea13dcbd16d20a4f2d1c42fdb6d8 100644 --- a/modules/genrams/altera/generic_async_fifo.vhd +++ b/modules/genrams/altera/generic_async_fifo.vhd @@ -170,44 +170,15 @@ begin -- syn wrusedw => wrusedw, rdusedw => rdusedw); - gen_with_wr_count : if(g_with_wr_count) generate - wr_count_o <= wrusedw; - end generate gen_with_wr_count; - - gen_with_rd_count : if(g_with_rd_count) generate - rd_count_o <= rdusedw; - end generate gen_with_rd_count; - - gen_with_wr_empty : if(g_with_wr_empty) generate - wr_empty_o <= wrempty; - end generate gen_with_wr_empty; - - gen_with_rd_empty : if(g_with_rd_empty) generate - rd_empty_o <= rdempty; - end generate gen_with_rd_empty; - - gen_with_wr_full : if(g_with_wr_full) generate - wr_full_o <= wrfull; - end generate gen_with_wr_full; - - gen_with_rd_full : if(g_with_rd_full) generate - rd_full_o <= rdfull; - end generate gen_with_rd_full; - - gen_with_wr_almost_empty : if(g_with_wr_almost_empty) generate - wr_almost_empty_o <= '1' when unsigned(wrusedw) < to_unsigned(g_almost_empty_threshold, wrusedw'length) else '0'; - end generate gen_with_wr_almost_empty; - - gen_with_rd_almost_empty : if(g_with_rd_almost_empty) generate - rd_almost_empty_o <= '1' when unsigned(rdusedw) < to_unsigned(g_almost_empty_threshold, rdusedw'length) else '0'; - end generate gen_with_rd_almost_empty; - - gen_with_wr_almost_full : if(g_with_wr_almost_full) generate - wr_almost_full_o <= '1' when unsigned(wrusedw) > to_unsigned(g_almost_full_threshold, wrusedw'length) else '0'; - end generate gen_with_wr_almost_full; - - gen_with_rd_almost_full : if(g_with_rd_almost_full) generate - rd_almost_full_o <= '1' when unsigned(rdusedw) > to_unsigned(g_almost_full_threshold,rdusedw'length) else '0'; - end generate gen_with_rd_almost_full; + wr_count_o <= wrusedw; + rd_count_o <= rdusedw; + wr_empty_o <= wrempty; + rd_empty_o <= rdempty; + wr_full_o <= wrfull; + rd_full_o <= rdfull; + wr_almost_empty_o <= '1' when unsigned(wrusedw) < to_unsigned(g_almost_empty_threshold, wrusedw'length) else '0'; + rd_almost_empty_o <= '1' when unsigned(rdusedw) < to_unsigned(g_almost_empty_threshold, rdusedw'length) else '0'; + wr_almost_full_o <= '1' when unsigned(wrusedw) > to_unsigned(g_almost_full_threshold, wrusedw'length) else '0'; + rd_almost_full_o <= '1' when unsigned(rdusedw) > to_unsigned(g_almost_full_threshold,rdusedw'length) else '0'; end syn; diff --git a/modules/genrams/altera/generic_sync_fifo.vhd b/modules/genrams/altera/generic_sync_fifo.vhd index a13c1134450b2d511e2b3162727dcfcc5119d51a..c3de0e04c83350142afbe2a59bec05bcb0e8365f 100644 --- a/modules/genrams/altera/generic_sync_fifo.vhd +++ b/modules/genrams/altera/generic_sync_fifo.vhd @@ -144,27 +144,10 @@ begin -- syn data => d_i, rdreq => rd_i); - - - gen_with_count : if(g_with_count) generate - count_o <= usedw; - end generate gen_with_count; - - - gen_with_empty : if(g_with_empty) generate - empty_o <= empty; - end generate gen_with_empty; - - gen_with_full : if(g_with_full) generate - full_o <= full; - end generate gen_with_full; - - gen_with_almost_empty : if(g_with_almost_empty) generate - almost_empty_o <= almost_empty; - end generate gen_with_almost_empty; - - gen_with_almost_full : if(g_with_almost_full) generate - almost_full_o <= almost_full; - end generate gen_with_almost_full; + count_o <= usedw; + empty_o <= empty; + full_o <= full; + almost_empty_o <= almost_empty; + almost_full_o <= almost_full; end syn;