Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ERROR:Xst:528 - Multi-source in Unit <diviseur> on signal <endOfCalculations>; this signal is connected to multiple drivers.
- dataPath:process(clk,reset)
- begin
- if reset='1' then quotient<=(others=>'0');
- rest<=(others=>'0');
- operand<=(others=>'0');
- fin<='0';
- else
- if rising_edge(clk) then
- if loadDivisorInReg='1' then divisor<=load; end if;
- if loadDividenedInReg='1' then dividened<=load; end if;
- if initializeOperand='1' then operand<="0000000"÷ned(7);end if;
- if runResult='1' then substractionResult<=operand-divisor;end if;
- if runQuotient='1' then quotient<=quotient(6 downto 0)&(not(substractionResult(7)));end if;
- if runOperand='1' then
- if substractionResult(7)='1' then
- operand<=operand(6 downto 0) ÷ned(7);
- dividened<=dividened(6 downto 0) &'0';
- else
- operand<=substractionResult(6 downto 0) &'0';
- end if;
- if count="111" then count<=(others=>'0');endOfDivisionFlag<='1';
- else count <= count+1; endOfDivisionFlag<='0';
- end if;
- end if;
- if (endOfCalculations='1') then rest<=operand;end if;
- end if;
- end if;
- end process dataPath;
- -- control signals
- -- loading divisor
- loadDivisorInReg<= '1' when state=E0 else '0';
- -- loading dividened
- loadDividenedInReg<= '1' when state=E1 else '0';
- -- initializing the operand
- initializeOperand <= '1' when state=E3 else '0';
- -- run substraction result
- runResult<= '1' when state=E4 else '0';
- -- run quotient
- runQuotient<= '1' when state=E5 else '0';
- -- find operand
- runOperand<= '1' when state=E6 else '0';
- -- end of division
- endOfCalculations<='1' when (state=E7) else '0';
Add Comment
Please, Sign In to add comment