• 状态图绘制软件的使用---Gvedit


    状态图绘制软件的使用---Gvedit

    1.编写状态图文本

    digraph finite_state_machine {
        rankdir=LR;
        size="40,15"
        node [shape = doublecircle]; INIT_STATE FAIL_STATE;
        node [shape = circle];
        INIT_STATE -> ASSERT_RESETS_STATE [label = "init_period_done=1"];
        INIT_STATE -> INIT_STATE [label = "init_period_done=0"];
        DRP_REQ_FULL_STATE -> DRP_WAIT_STATE;
        DRP_REQ_NO_PLL_STATE -> DRP_WAIT_STATE;
        DRP_WAIT_STATE -> DRP_CHECK_STATE;
        DRP_CHECK_STATE -> ASSERT_RESETS_STATE [label = "drp_busy_in=0"];
        DRP_CHECK_STATE -> RETRY2_STATE [label = "drp_busy_in=1&reset_timeout=1"];
        DRP_CHECK_STATE -> DRP_CHECK_STATE [label = "drp_busy_in=1&reset_timeout=0"];
        ASSERT_RESETS_STATE -> ASSERT_RESETS_STATE [label = "(~refclk_stable_s | full_reset | gtrxreset_in)=1"];
        ASSERT_RESETS_STATE -> RELEASE_PLLRESET_STATE [label = "(~refclk_stable_s | full_reset | gtrxreset_in=0)"];
        RELEASE_PLLRESET_STATE -> PLL_LOCKED_STATE [label = "pll_lock_s"];
        RELEASE_PLLRESET_STATE -> RETRY_STATE [label = "pll_lock_s=0&plllock_timeout=1"];
        RELEASE_PLLRESET_STATE -> RELEASE_PLLRESET_STATE [label = "pll_lock_s=0&plllock_timeout=0"];
        PLL_LOCKED_STATE -> WAIT_RESET_DONEX_STATE;
        WAIT_RESET_DONEX_STATE -> WAIT_RESET_DONE_STATE [label = "rxresetdone_s=0"];
        WAIT_RESET_DONEX_STATE -> RETRY_STATE [label = "rxresetdone=1&reset_timeout=1"];
        WAIT_RESET_DONEX_STATE -> WAIT_RESET_DONEX_STATE [label = "rxresetdone_s=1&reset_timeout=0"];
        WAIT_RESET_DONE_STATE -> DONE_STATE [label = "rxresetdone_s=1"];
        WAIT_RESET_DONE_STATE -> RETRY_STATE [label = "rxresetdone_s=0&reset_timeout=1"];
        WAIT_RESET_DONE_STATE -> WAIT_RESET_DONE_STATE [label = "rxresetdone_s=0&reset_timeout=0"];
        DONE_STATE -> DRP_REQ_FULL_STATE [label = "full_reset=1"];
        DONE_STATE -> DRP_REQ_NO_PLL_STATE [label = "full_reset=0&gtrxreset_in=1"];
        DONE_STATE -> DONE_STATE [label = "full_reset=0&gtrxreset_in=0"];
        RETRY_STATE -> CHECK_RETRIES_STATE;
        CHECK_RETRIES_STATE -> FAIL_STATE [label = "max_retries=1"];
        CHECK_RETRIES_STATE -> WAIT_RESET_DONE_STATE [label = "max_retries=0 &(post_config | pll_lock_s) = 1"];
        CHECK_RETRIES_STATE -> RELEASE_PLLRESET_STATE [label = "max_retries=0&(post_config | pll_lock_s) = 0"];
        RETRY2_STATE -> CHECK_RETRIES2_STATE;
        CHECK_RETRIES2_STATE -> FAIL_STATE [label = "max_retries=1"];
        CHECK_RETRIES2_STATE -> DRP_CHECK_STATE [label = "max_retries=0"];
        FAIL_STATE -> DRP_REQ_FULL_STATE [label = "full_reset=1"];
        FAIL_STATE -> FAIL_STATE [label = "full_reset=0"];
    }

    运行结果为:

  • 相关阅读:
    撕裂寂寞
    创业中的“孙子兵法”
    生命的颜色占卜
    常常激励我们的36句话
    创建自己的3D虚拟身体!
    富人和穷人的八大差异
    有时,孤单是一种享受
    JavaScript类
    上网的十条基本礼节
    程序设计中的感悟
  • 原文地址:https://www.cnblogs.com/chensimin1990/p/7050137.html
Copyright © 2020-2023  润新知