Quartus报错之Error (10028): Can't resolve multiple constant drivers for net "iCntRst" at one_wire_bus.vhd(78)

“信号不能在多个并发进程中赋值”这是个代码的可综合方面的要求,也就是说一般综合工具会对此报错的,但从仿真角度上说是没有问题的,除非多个赋值造成冲突导致仿真无法继续,modelsim是纯粹的仿真工具,它不会关心代码是否可综合;据我所知,采用波形输入在quartus下进行时序仿真是需要先综合的,这样工具就会检查代码在可综合性方面的问题,因此会报你上述错误.只要将复位操作分开到每个寄存器描述进程中表达就行了.

 1 -- 计数器

 2 counter:process (clk, rst)

 3 begin

 4     if rst = '1' then

 5         -- Asynchronous reset code

 6     iCntRst <= '1';--复位操作,将iCntRst置位

 7     iCount <= 0;

 8     state <= INIT;

 9     

10     elsif (clk' event and clk = '1') then

11         -- synchronous code

12     if(iCntRst = '1') then

13     iCount <= 0;

14     else

15     iCount <= iCount + 1;

16     end if;

17     end if;

18 end process;
 1 next_state_decoder : process(state,clk)

 2 

 3 variable next_state : states;

 4 variable iBits : integer range 0 to 8;

 5 

 6 begin

 7 if(clk'event and clk = '1') then

 8 case state is

 9       when INIT =>

10          iCntRst <= '0';--该处又出现对iCntRst的赋值操作

11 .......................

12 end process next_state_decoder;

 所以,在综合时出现了标题中的错误。解决办法,将复位操作放置到next_state_decoder中!

2012-12-12 11:28:24

你可能感兴趣的:(driver)