順序邏輯的霍夫曼簡化

對於定義良好的狀態轉換錶,霍夫曼簡化是簡化狀態轉換的常用算法。

[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;
    }
  }
}

*/



MatchLogicFunction Analysis IsPositiveUnateFunctionTo IsSymmetricFunction IsThresholdFunction AndXor ToAndOr ToOrAnd ToDiagram ToPOS Dimacs FeedbackDiagram LogicScript minterm() Nor RadixFromIndex Or Realization To2LayerAndXor ShortestInputsForTransition StateVariables ToFeedbackSystem Compatibility FullTable SimpleCover string RandomGenerate Utility ComputeDONTCARE Zero

搜索本網站 :

 
Buy website traffic cheap