CSYE 7374: IoT Embedded System
Posted lyapyth
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CSYE 7374: IoT Embedded System相关的知识,希望对你有一定的参考价值。
CSYE 7374: IoT Embedded Systems
Assignment 2
Due on 2/5/20
1) Given the following C update function, what does the FSM look like ? Assume push and
pop are input pure signals and the return value of the function is a pure output signal called
output. In addition write down the description of this FSM as a 5-tuple.
typedef enum
{
STATE_A = 0,
STATE_B,
STATE_C,
STATE_D
} state_t;
typedef enum
{
PRESENT = 0,
ABSENT
} signal_t;
signal_t update(state_t *state, signal_t push, signal_t pop)
{
if (push == PRESENT && pop == ABSENT && *state < STATE_D)
{
if (*state == STATE_A)
{
*state = STATE_B;
}
else if (*state == STATE_B)
{
*state = STATE_C;
}
else if (*state == STATE_C)
{
*state = STATE_D;
}
return PRESENT;
}
else if (*state == STATE_D && push == ABSENT && pop == PRESENT)
{
*state = STATE_A;
return PRESENT;
}
return ABSENT;
}
2) Given:
1
Formally write down the description of this FSM as a 5-tuple:
(States,Inputs, Outputs, update, initialState)
Then write a C update that describes the FSM. Note that the function will have two outputs
and a single input. This is exactly the opposite to the FSM shown in the previous exercise
(two inputs and one output).
3) Given:
Is this true or false ? Give supporting argument:
“The output will eventually be a constant 0, or it will eventually be a constant 1. That
is, for some n ∈ N, after the n
th reaction, either the output will be 0 in every subsequent
reaction, or it will be 1 in every subsequent reaction.”
如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp
以上是关于CSYE 7374: IoT Embedded System的主要内容,如果未能解决你的问题,请参考以下文章
Performance measurements for hypervisors on embedded ARM processors
Driver:com.mysql.jdbc.Driver@2b7374f8 为 URL 返回 null