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 nonplayercharacters 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 datapath:
Outputs
triputs
Inputs to th
Health the health of the NPCs is high of stored health points or low Breakable a comparison of NPCs strength being stronger or weaker than the enemy. Enemy enemy is present health of enemy or not present
Outputs to the datapath:
Roll Enemy when patrolling a roll is done to determine if enemy has shown up all other modes this should be off Roll ttack on when attacking, defending, and retreating modes to roll for attack damage to the enemy, and off when patrolling. Roll Damage on when attacking, defending, and retreating modes to roll for combat damage to the NPCs and off 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
zero The controller will output a to the Roll Enemy output each cycle while patrolling and a
die roll greater than will result in a on the enemy input next cycle. The controller should also
output a to roll for attack and a for roll for damage.
If the enemy input is a the NPCs will move to an attacking mode if the breakable input is a
and the health input is a The NPCs will remain in an attacking mode if enemy is present,
the enemies are breakable and the NPCs health is high Each cycle in attacking the
controller outputs a to not roll for enemy, a to roll for attack, and a to roll for damage. The
NPCs move back to patrolling if the enemy is killed enemy input is The NPCs move to
defending if breakable input is a and health input is a or if breakable input is a and health
input is a They move to retreating if breakable input is a and health input is a
If the NPCs are in a defending mode, they remain defending if only one of breakable input is
or health input is Each cycle in defending the controller outputs a to not roll for enemy, a
to roll for attack, and a to roll for damage. The NPCs move back to patrolling if the enemy is
killed enemy input is The NPCs can move back to attacking if breakable input is a and
health input is a They move to retreating if both breakable input is a and health input is a
If the NPCs are in a retreating mode, they remain retreating if both the breakable input is and
the health input is Each cycle in retreating the controller outputs a to not roll for enemy, a
to roll for attack, and a to roll for damage. The NPCs move back to patrolling if the enemy is
killed enemy input is The NPCs can move back to defending if either the breakable input is
a or health input is a and back to attacking if both breakable and health are s
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
zero The controller will output a to the Roll Enemy output each cycle while patrolling and a
die roll greater than will result in a on the enemy input next cycle. The controller should also
output a to roll for attack and a for roll for damage.
If the enemy input is a the NPCs will move to an attacking mode if the breakable input is a
and the health input is a The NPCs will remain in an attacking mode if enemy is present,
the enemies are breakable and the NPCs health is high Each cycle in attacking the
controller outputs a to not roll for enemy, a to roll for attack, and a to roll for damage. The
NPCs move back to patrolling if the enemy is killed enemy input is The NPCs move to
defending if breakable input is a and health input is a or if breakable input is a and health
input is a They move to retreating if breakable input is a and health input is a
If the NPCs are in a defending mode, they remain defending if only one of breakable input is
or health input is Each cycle in defending the controller outputs a to not roll for enemy, a
to roll for attack, and a to roll for damage. The NPCs move back to patrolling if the enemy is
killed enemy input is The NPCs can move back to attacking if breakable input is a and
health in
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
