順序邏輯的霍夫曼簡化
對於定義良好的狀態轉換錶,霍夫曼簡化是簡化狀態轉換的常用算法。
[table]=StateTransition()
{
transitions
{
1: [1] -> 1/1'b0, [2] -> 3/1'b0;
2: [1] -> 2/1'b1, [2] -> 4/1'b0;
3: [1] -> 3/1'b1, [2] -> 5/1'b0;
4: [1] -> 4/1'b0, [2] -> 1/1'b1;
5: [1] -> 5/1'b0, [2] -> 1/1'b1;
}
}
[simtable]=Simplification.HuffmanMealy(table);
Print("result:");
Print(simtable);
/*
結果應該是 :
result:
StateTransition()
{
transitions
{
1: [1] -> 1/1'b0, [2] -> 3/1'b0;
2: [1] -> 2/1'b1, [2] -> 4/1'b0;
3: [1] -> 3/1'b1, [2] -> 5/1'b0;
4: [1] -> 4/1'b0, [2] -> 1/1'b1;
5: [1] -> 5/1'b0, [2] -> 1/1'b1;
}
simplification
{
tabletype = "well-defined" ;
algorithm = "equivalance" ;
grouping
{
1:1;
2:2,3;
3:4,5;
}
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;
}
}
}
*/
Advanced IsBlankFunction IsParityFunction IsUnateFunctionTo ToBinary OneComplement binaryioset Convert ToShannonTree DiagramGateName Email Eq FeedbackSystem Minus Nor MantissaToPositiveInteger PositiveDecimalToMantissa PositiveNumberToMantissa Radixes object() Or To2LayerOrAnd To2LayerAndOr Backwardly ToFeedbackSystem Compatibility Canonical Full RandomGenerate Zero
The website is simply translated by using the Google Translate. Please inform us if you find the wrong/funny/weird translation.