Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

state machine

Altera_Forum
Honored Contributor II
1,243 Views

i have a array of signed 16 integer data(8,7,-1,1,5,6,2---),i want to design a state machine in vhdl with three state,in first state i need to calculate the number of ones,in 2nd state number of zeros and finally count other number. how can i start

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
507 Views

defining your states is probably a good start: 

 

type state_t is (count_ones, count_zeros, count_others);
0 Kudos
Altera_Forum
Honored Contributor II
507 Views

thanks 

can u elaborate more
0 Kudos
Altera_Forum
Honored Contributor II
507 Views

Ill leave the rest of your homework up to you. When you actually get stuck - come back here with further specific questions. We're not here to do your assignment for you.

0 Kudos
Reply