Question: I need help! You will be building a controller for a dedicated processor that controls a single to squad of non - player - characters

I need help!
You will be building a controller for a dedicated processor that controls a single to squad of non-player-characters (NPC). The NPCs patrol an area looking for enemy. When enemy are detected the controller determines if the NPCs should attack the enemies, defend against the enemies, or retreat. The control interacts with the following data-path:
Outputs
triputs
Inputs to th
Health - the health of the NPCs is high (1)(>50% of stored health points) or low (0). Breakable - a comparison of NPCs strength being stronger (1) or weaker (0) than the enemy. Enemy - enemy is present (1)(health of enemy >0) or not present (0).
Outputs to the data-path:
Roll Enemy - when patrolling a roll is done (1) to determine if enemy has shown up, all other modes this should be off (0). Roll ttack - on (1) when attacking, defending, and retreating modes to roll for attack damage to the enemy, and off (0) when patrolling. Roll Damage - on (1) when attacking, defending, and retreating modes to roll for combat damage to the NPCs, and off (0) when patroling.
Other
Healing - NPCs roll to heal each round regardless of mode, but not to exceed max points.
Requirements:
The NPCs start in a patrolling mode and continue patrolling as long as the enemy input is 0
(zero). The controller will output a 1 to the Roll Enemy output each cycle while patrolling and a
die roll greater than 5 will result in a 1 on the enemy input next cycle. The controller should also
output a 0 to roll for attack and a 0 for roll for damage.
If the enemy input is a 1, the NPCs will move to an attacking mode if the breakable input is a 1
and the health input is a 1. The NPCs will remain in an attacking mode if enemy (1) is present,
the enemies are breakable (1), and the NPCs health is high (1). Each cycle in attacking the
controller outputs a 0 to not roll for enemy, a 1 to roll for attack, and a 1 to roll for damage. The
NPCs move back to patrolling if the enemy is killed (enemy input is 0). The NPCs move to
defending if breakable input is a 0 and health input is a 1, or if breakable input is a 1 and health
input is a 0. They move to retreating if breakable input is a 0 and health input is a 0.
If the NPCs are in a defending mode, they remain defending if only one of breakable input is 0
or health input is 0. Each cycle in defending the controller outputs a 0 to not roll for enemy, a 1
to roll for attack, and a 1 to roll for damage. The NPCs move back to patrolling if the enemy is
killed (enemy input is 0). The NPCs can move back to attacking if breakable input is a 1 and
health input is a 1. They move to retreating if both breakable input is a 0 and health input is a 0.
If the NPCs are in a retreating mode, they remain retreating if both the breakable input is 0 and
the health input is 0. Each cycle in retreating the controller outputs a 0 to not roll for enemy, a 1
to roll for attack, and a 1 to roll for damage. The NPCs move back to patrolling if the enemy is
killed (enemy input is 0). The NPCs can move back to defending if either the breakable input is
a 1 or health input is a 1, and back to attacking if both breakable and health are 1s.
Tasks:
This is a Moore FSM
a) Show a legend for your analysis with abbreviations, descriptions, and bit values for
states, inputs, and outputs.
b) Draw a state diagram and label all states, inputs, and outputs.
c) Build a state table with current states, next states, and outputs.
d) Use Karnaugh maps to derive simplified expressions for the next states and outputs
e) Draw a FSM circuit for the controller.
Requirements:
The NPCs start in a patrolling mode and continue patrolling as long as the enemy input is 0
(zero). The controller will output a 1 to the Roll Enemy output each cycle while patrolling and a
die roll greater than '5' will result in a 1 on the enemy input next cycle. The controller should also
output a 0 to roll for attack and a 0 for roll for damage.
If the enemy input is a 1, the NPCs will move to an attacking mode if the breakable input is a 1
and the health input is a 1. The NPCs will remain in an attacking mode if enemy (1) is present,
the enemies are breakable (1), and the NPCs health is high (1). Each cycle in attacking the
controller outputs a 0 to not roll for enemy, a 1 to roll for attack, and a 1 to roll for damage. The
NPCs move back to patrolling if the enemy is killed (enemy input is 0). The NPCs move to
defending if breakable input is a 0 and health input is a 1, or if breakable input is a 1 and health
input is a 0. They move to retreating if breakable input is a 0 and health input is a 0.
If the NPCs are in a defending mode, they remain defending if only one of breakable input is 0
or health input is 0. Each cycle in defending the controller outputs a 0 to not roll for enemy, a 1
to roll for attack, and a 1 to roll for damage. The NPCs move back to patrolling if the enemy is
killed (enemy input is 0). The NPCs can move back to attacking if breakable input is a 1 and
health in
I need help! You will be building a controller

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!