順序邏輯的實現
讓我們用實際電路來實現一個簡化的狀態轉換錶。我們可以從很多教材中了解到如何實現狀態轉換錶:
- 將邏輯變量分配給輸入和狀態。
- 計算應用函數。
- 從狀態設備的激勵表創建輸入函數。
- 使用 DONTCARE 簡化輸入功能和輸出功能。
在我們的布爾代數計算中,我們只需要這樣:
- 分配邏輯變量和狀態設備。
所有內部計算都是自動化的。
[table]=StateTransition()
{
transitions
{
1: [1] -> 1/1'b0, [2] -> 2/1'b0;
2: [1] -> 2/1'b1, [2] -> 3/1'b0;
3: [1] -> 3/1'b0, [2] -> 1/1'b1;
}
implementation
{
inputs
{
// the format:
// input-index ':' binary value of the inputs
1: 1'b0;
2: 1'b1;
// in this example, we say 1 bit is assigned for the two inputs.
}
states
{
// the format:
// state-index ':' binary value for the state
1: 2'b01;
2: 2'b10;
3: 2'b11;
// in this example, we say assign 2 bits for the states.
}
statedevices
{
// the format:
// state-index ':' state-device-name '=' definition-of-the-excitation ';'
1: "JK-FF" ; // for first bit
2: "D-FF" ; // for second bit
// known-state-device-name : "SR-FF", "JK-FF", "T-FF", "D-FF" ;
}
}
}
[digital_system] = Sequential.Implementation(table);
Print(digital_system);
/*
結果應該是 :
digital_system = DigitalSystem()
{
outputs
{
[r1] = AndOr(){ 1,2,3; -1,2,-3; }
}
states
{
state(1)
{
variable = 2;
statedevice = "JK-FF";
inputto.J = AndOr(){ 1; }
inputto.K = AndOr(){ 1,3; }
g1 = AndOr(){ -1; -3; }
g2 = AndOr(){ 1; }
F = AndOr(){ -1,2; 2,-3; 1,-2,3; }
}
state(2)
{
variable = 3;
statedevice = "D-FF";
inputto.D = AndOr(){ 1,2; 1,-3; -1,3; }
g1 = AndOr(){ -1; 2; }
g2 = AndOr(){ 1; }
F = AndOr(){ 1,2; -1,3; }
}
}
statedevices
{
}
}
*/
IsInverse IsNegativeUnateFunctionTo IsPositiveFunction IsSymmetricFunction BDD AbsoluteExpression MaxValue TwoComplement binaryioset() bool() ToOrAnd ToROBDD Eq Minus MantissaToPositiveNumber RadixToIndex To2LayerNand Save ShortestInputsForDistinguishTwoStates AutoAssignInputAndStateVariables ToStateTransitionTable ToDigitalSystem Fast SimpleInner StateDeviceName TimingChart ShrinkLogicFunction Substitute var() Zero
The website is simply translated by using the Google Translate. Please inform us if you find the wrong/funny/weird translation.