B
Brandon
Guest
I'm receiving a synthesis error from XST for my modulo up counter.
ERROR:Xst:1775 - Unsupported modulo value 3 found in expression at line
304. The modulo should be a power of 2.
I found this, but it doesn't specifiy what the modulus may be.
http://toolbox.xilinx.com/docsan/xilinx7/books/data/docs/xst/xst0018_5.html
Here is my code:
cnt_seq_proc: process(clk, rst_n_a)
begin
if (rst_n_a = '0') then
-- active low asynchronous reset
cnt <= 0;
elsif (rising_edge(clk) ) then
if cnt_en = '1' then
cnt <= (cnt+1) mod modfactor_g;
else
cnt <= cnt;
end if; -- if cnt_en = '1' then
end if; -- if (rst_n_a = '0') then
end process cnt_seq_proc;
Is there an easy way to do this with a generic that is synthesizeable?
Thanks,
-B
ERROR:Xst:1775 - Unsupported modulo value 3 found in expression at line
304. The modulo should be a power of 2.
I found this, but it doesn't specifiy what the modulus may be.
http://toolbox.xilinx.com/docsan/xilinx7/books/data/docs/xst/xst0018_5.html
Here is my code:
cnt_seq_proc: process(clk, rst_n_a)
begin
if (rst_n_a = '0') then
-- active low asynchronous reset
cnt <= 0;
elsif (rising_edge(clk) ) then
if cnt_en = '1' then
cnt <= (cnt+1) mod modfactor_g;
else
cnt <= cnt;
end if; -- if cnt_en = '1' then
end if; -- if (rst_n_a = '0') then
end process cnt_seq_proc;
Is there an easy way to do this with a generic that is synthesizeable?
Thanks,
-B