文件名称:18-divide-8-divider
介绍说明--下载内容均来自于网络,请自行研究使用
从ASM状态图可以看出,在state=0时,初始化参数,如果开始信号有效则载入被除数与除数,接着进入state=1状态,首先判断被除数寄存器的高九位是否大于除数,如果是则产生溢出信号,并回到此状态;否则被除数寄存器向左移一位,并进入state=2状态,同样先判断被除数寄存器的高九位是否大于除数,如果是则被数高九位减去除,并被除数最后一位置为1,并回到此状态;否则被除数寄存器向左移一位,并进入state=3状态, 同样先判断被除数寄存器的高六位是否大于除数,如果是则被数高九位减去除,并被除数最后一位置为1,并回到此状态;否则被除数寄存器向左移一位,并进入state=4状态,此时判断被除数寄存器的高9位是否大于除数,如果是则被数高九位减去除,并被除数最后一位置为1,并回到此状态;否则输出商res与余数yushu.,并回到state=0状态,等待下一个开始信号。-From state chart can be seen by ASM, state = 0, the initialization parameters, if the starting signal effectively is loaded with the divisor, then enter dividend state = 1 state, the first judge whether high dividend register more than nine by 0.14585278, if have spilling signal, and return to the state Otherwise dividend registers, and enter the move to the left, a state = 2 state, also be judged on whether the high dividend register more than nine by 0.14585278, if is number nine, and subtract except high dividend last position is 1, and return to the state Otherwise dividend registers, and enter the move to the left, a state = 3 state, also be judged on whether the high dividend register more than six by 0.14585278, if is number nine, and subtract except high dividend last position is 1, and return to the state Otherwise dividend registers, and enter the move to the left, a state = 4 state, at this time the judge dividend registers high 9 are outweighed by 0.14585278, if is numbe
(系统自动生成,下载前可以参看下载内容)
下载文件列表
18 divide 8 divider.docx